MamdaTradeChecker is a class that provides trades sanity checking by periodically requesting snapshots of the trades from the publisher and comparing that with an trades being maintained in real time. More...
#include <MamdaTradeChecker.h>
Public Member Functions | |
MamdaTradeChecker (MamaQueue *queue, MamdaCheckerHandler *handler, MamaSource *source, const char *symbol, mama_f64_t intervalSeconds) | |
Constructor. More... | |
~MamdaTradeChecker () | |
Desctructor. More... | |
void | checkSnapShotNow () |
Perform an ad hoc snapshot check now. More... | |
mama_u32_t | getSuccessCount () const |
mama_u32_t | getInconclusiveCount () const |
Return the nmber of inconclusive counts. More... | |
mama_u32_t | getFailureCount () const |
Return the number of failed checks. More... | |
MamdaTradeChecker is a class that provides trades sanity checking by periodically requesting snapshots of the trades from the publisher and comparing that with an trades being maintained in real time.
This class is purely for testing purposes, to test for possible configuration or programming errors in the trades publisher and in MAMDA trades management code.
The developer registers a handler that contains callbacks for successful, inconclusive and failure events. The developer also provides an interval representing the frequency of the snapshot checks. The first check will take place at some random point in time between zero and the interval.
Wombat::MamdaTradeChecker::MamdaTradeChecker | ( | MamaQueue * | queue, |
MamdaCheckerHandler * | handler, | ||
MamaSource * | source, | ||
const char * | symbol, | ||
mama_f64_t | intervalSeconds | ||
) |
Constructor.
Wombat::MamdaTradeChecker::~MamdaTradeChecker | ( | ) |
Desctructor.
void Wombat::MamdaTradeChecker::checkSnapShotNow | ( | ) |
Perform an ad hoc snapshot check now.
This may be useful if the checking is to be performed by some external trigger event.
mama_u32_t Wombat::MamdaTradeChecker::getSuccessCount | ( | ) | const |
mama_u32_t Wombat::MamdaTradeChecker::getInconclusiveCount | ( | ) | const |
Return the nmber of inconclusive counts.
An attempt to check the order book may be inconclusive if the order book sequence numbers do not match up.
mama_u32_t Wombat::MamdaTradeChecker::getFailureCount | ( | ) | const |
Return the number of failed checks.
This should be zero, of course.