Classes Files

Wombat::MamdaQuoteChecker

More…

#include <MamdaQuoteChecker.h>

Public Functions

  Name
  MamdaQuoteChecker(MamaQueue * queue, MamdaCheckerHandler * handler, MamaSource * source, const char * symbol, mama_f64_t intervalSeconds)
  ~MamdaQuoteChecker()
void checkSnapShotNow()
mama_u32_t getSuccessCount() const
mama_u32_t getInconclusiveCount() const
mama_u32_t getFailureCount() const

Detailed Description

class Wombat::MamdaQuoteChecker;

MamdaQuoteChecker is a class that provides quotes sanity checking by periodically requesting snapshots of the quotes from the publisher and comparing that with an quotes being maintained in real time. This class is purely for testing purposes, to test for possible configuration or programming errors in the quotes publisher and in MAMDA quotes 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.

Public Functions Documentation

function MamdaQuoteChecker

MamdaQuoteChecker(
    MamaQueue * queue,
    MamdaCheckerHandler * handler,
    MamaSource * source,
    const char * symbol,
    mama_f64_t intervalSeconds
)

function ~MamdaQuoteChecker

~MamdaQuoteChecker()

Desctructor.

function checkSnapShotNow

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.

function getSuccessCount

mama_u32_t getSuccessCount() const

Return: The number of successful checks.

function getInconclusiveCount

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.

function getFailureCount

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