CARMA C++
carma::monitor::FrameSubscriber Class Reference

A class that accepts named events from a Push supplier. More...

#include <carma/monitor/FrameSubscriber.h>

Public Member Functions

 FrameSubscriber (double delayInS, bool rawMode)
 Constructor This constructor is used if this FrameSubscriber is to use the default ORB and clean up and shut it down when this FrameSubscriber is destroyed. More...
 
void operator() (const carma::monitor::TransportSubsystemFrame &tsf)
 Process a TransportSubsystemFrame. More...
 
void setFirstFireTime (double firstFireTimeMJD)
 
void writeMonitorSystemToIPQ (double currentFireTimeMJD, double delayInSeconds, int clearDelayInFrames)
 Write monitor system to IPQ. More...
 
 ~FrameSubscriber ()
 Destructor. More...
 

Protected Member Functions

void printTimes (double timestamps[], int numTimes) const
 Called by push_structured_event. More...
 

Detailed Description

A class that accepts named events from a Push supplier.

This is the basis for event driven clients, which wish to to block on "receive" call until an event arrives and process it. NotificationConsumer provides a "callback" model, whereas FrameSubscriber provides a "block and wait for event" model.

Definition at line 81 of file FrameSubscriber.h.

Constructor & Destructor Documentation

carma::monitor::FrameSubscriber::FrameSubscriber ( double  delayInS,
bool  rawMode 
)

Constructor This constructor is used if this FrameSubscriber is to use the default ORB and clean up and shut it down when this FrameSubscriber is destroyed.

In other words, the programmer wants the ORB shutdown when this FrameSubscriber is destroyed.

Parameters
delayInSThe FrameSubscriber keeps a map of monitor systems (yes, monitor systems!) so that
rawModeTrue if the monitor systems should be instances of RawMonitorSystems, false if they should be CarmaMonitorSystems. No default.
carma::monitor::FrameSubscriber::~FrameSubscriber ( )

Destructor.

Member Function Documentation

void carma::monitor::FrameSubscriber::operator() ( const carma::monitor::TransportSubsystemFrame tsf)
void carma::monitor::FrameSubscriber::printTimes ( double  timestamps[],
int  numTimes 
) const
protected

Called by push_structured_event.

Prints performance data when debug (trace) is on.

Parameters
timestampsarray of doubles containing timestamps recorded as doubles using carma::util::Time::MJD()
numTimesint representing the number of timestamps in the array
timestamps
See Also
carma::util::Time::MJD()
void carma::monitor::FrameSubscriber::writeMonitorSystemToIPQ ( double  currentFireTimeMJD,
double  delayInSeconds,
int  clearDelayInFrames 
)

Write monitor system to IPQ.

Precondition
setFirstFireTime must be called prior

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