OpenMAMA
Wombat::MamdaTradeChecker Class Reference

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.
 ~MamdaTradeChecker ()
 Desctructor.
void checkSnapShotNow ()
 Perform an ad hoc snapshot check now.
mama_u32_t getSuccessCount () const
mama_u32_t getInconclusiveCount () const
 Return the nmber of inconclusive counts.
mama_u32_t getFailureCount () const
 Return the number of failed checks.

Detailed Description

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.

Constructor & Destructor Documentation

Wombat::MamdaTradeChecker::MamdaTradeChecker ( MamaQueue *  queue,
MamdaCheckerHandler handler,
MamaSource *  source,
const char *  symbol,
mama_f64_t  intervalSeconds 
)

Constructor.

Wombat::MamdaTradeChecker::~MamdaTradeChecker ( )

Desctructor.

Member Function Documentation

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
Returns
The number of successful checks.
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.

Returns
The number of inconclusive checks.
mama_u32_t Wombat::MamdaTradeChecker::getFailureCount ( ) const

Return the number of failed checks.

This should be zero, of course.

Returns
The number of failed checks.

The documentation for this class was generated from the following file:


© 2012 Linux Foundation