#include <MamdaTradeChecker.h>
Name | |
---|---|
MamdaTradeChecker(MamaQueue * queue, MamdaCheckerHandler * handler, MamaSource * source, const char * symbol, mama_f64_t intervalSeconds) | |
~MamdaTradeChecker() | |
void | checkSnapShotNow() |
mama_u32_t | getSuccessCount() const |
mama_u32_t | getInconclusiveCount() const |
mama_u32_t | getFailureCount() const |
class Wombat::MamdaTradeChecker;
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.
MamdaTradeChecker(
MamaQueue * queue,
MamdaCheckerHandler * handler,
MamaSource * source,
const char * symbol,
mama_f64_t intervalSeconds
)
Constructor
~MamdaTradeChecker()
Desctructor.
void 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 getSuccessCount() const
Return: The number of successful checks.
mama_u32_t getInconclusiveCount() const
Return: The number of inconclusive checks.
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 getFailureCount() const
Return: The number of failed checks.
Return the number of failed checks. This should be zero, of course.
Updated on 2023-03-31 at 15:29:58 +0100