1 #ifndef CARMA_MONITOR_MONITORSUBSYSTEM_H
2 #define CARMA_MONITOR_MONITORSUBSYSTEM_H
28 class MonitorPointSet;
29 class SystemFrameBuffer;
71 SystemFrameBuffer * buffer = 0,
75 bool onlyDEFAULT =
true );
262 static std::string
makeName(
const std::string& name,
int number);
330 void writeWithoutResettingValidities();
350 void allocateAllMonitorPoints( );
353 const int maxMonitorPoints_;
354 const int maxSamples_;
double getStartScriberWriteTime() const
Time the last write was received on the ScriberPublisher.
void startAutoWriter(double delay) const
method to configure and start the auto-write thread.
bool autoWriterIsAlive() const
Test whether the auto-writer thread is alive (running).
double getReceiveTime() const
Get the mjd when the frame was received by the ACC.
ARCHIVE_PRIORITY
Archiving priority.
double getFrameTime() const
Get the mjd associated with the frame.
MonitorSubsystem(const std::string &subsystemName, SystemFrameBuffer *buffer=0, int maxMonitorPoints=600, int maxSamples=1800, ARCHIVE_PRIORITY archivePriority=NORMAL, bool onlyDEFAULT=true)
Constructor base subsystem configuration The derived class object must be configure() after construct...
bool isSubsystem() const
Check if the component is a MonitorSubsystem.
int maxSamples() const
Return the size of the storage allocated for monitor samples.
double getScriberWriteTime() const
Time this frame of data was written to the subsystem IPQ.
A class that manages the sets of monitor points for a monitor subsystem.
int getFrameCount() const
Get the frame count for the last read frame.
void stopAutoWriter() const
Stop the auto-write thread.
void resetValidity()
Reset validity flags of all data.
bool readNewestConditionalCopy()
If new data is available it is copied from the queue into the monitor system.
Data should be archived by default when performance and bandwidth allow.
An abstract base class used to support the common functionality of a MonitorSystem and a MonitorSubsy...
bool readNewest()
Reads in the newest data from the IPQ into the local set of monitor points.
double getPublishTime() const
Get the mjd when the frame was published by the subsystem.
double getScriberWriteDelay() const
Offset from the half-second for writing this subsystem frame to the (local) subsystem IPQ...
double getEndWriteTime() const
Time the last monitor point set write was finished.
MonitorPointSet & getMonitorPointSet()
Get the monitor point set.
double getLastWriterDelay() const
The next few methods measure performance of monitor data transport.
Monitor system container interface definition.
unsigned int read()
Reads oldest unread data from the IPQ into the local set of monitor points.
double getLastWriteTime() const
Time (MJD) of the last write to the ScriberPublisher.
bool configure()
Configure does the complete setup of a monitor subsystem The steps are:
virtual ~MonitorSubsystem()
Destructor.
static std::string transportHeaderToString()
Dumps transport statistics table header, with legends for columns.
double getStartWriteTime() const
Time the last monitor point set write was started.
A lookup class for mapping names and IDs.
virtual void createHierarchy()=0
Create all typed monitor points and hierarchy Every subsystem must define this.
void write()
Write out the monitor point data values.
bool isCurrent() const
Returns true if the monitor subsystem contains data that is current.
MonitorPointSet & monitorPointSet()
Get reference to the underlying storage.
int maxMonitorPoints() const
Return the size of the storage allocated for monitor points.
void updateFrameAverage()
Average and ave validity is computed and set for each monitor point over all samples in the frame...
static std::string makeName(const std::string &name, int number)
Form a name string that is a root followed by an integer, e.g.
virtual std::string transportStatisticsToString(bool canonical=false) const
Dumps transport statistics as a table, with write delays, and transport/write times printed out as do...
Abstract MonitorSubsystem base class.