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

Carma monitor system. More...

#include <carma/monitor/MonitorSystem.h>

Inheritance diagram for carma::monitor::CarmaMonitorSystem:
carma::monitor::MonitorSystem carma::monitor::MonitorSystemContainer carma::monitor::MonitorContainer carma::monitor::MonitorComponent carma::monitor::FinalCarmaMonitorSystem carma::monitor::RawCarmaMonitorSystem

Public Member Functions

 CarmaMonitorSystem ()
 Full monitor system with all subsystems. More...
 
 CarmaMonitorSystem (const RawCarmaMonitorSystem &raw)
 Full monitor system with all subsystems. More...
 
void synchronize (const CarmaMonitorSystem &src)
 Method to synchronize this object with another CarmaMonitorSystem object. More...
 
- Public Member Functions inherited from carma::monitor::MonitorSystem
std::string addTransportTimesAsString (std::ostringstream o) const
 Dumps transport statistics as a table, with write delays, and transport/write times printed out as doubles, with fixed precision. More...
 
AlarmSubsystem & alarm () const
 Get reference to the alarm subsystem. More...
 
AntennaCommon & antennaCommon (int index) const
 Get reference to an AntennaCommon container in an ovro or bima or sza subsystem. More...
 
AstroSubsystem & astro () const
 Get reference to an Astro container. More...
 
BimaSubsystem & bima (int index) const
 Get reference to a bima antenna subsystem. More...
 
C3gDataflowSubsystem & c3gDataflow (const int index) const
 
C3gMax23PipelineSubsystemc3gMax23Pipeline () const
 Get reference to carma 23 station 3g correlator pipeline. More...
 
C3gMax8PipelineSubsystemc3gMax8Pipeline () const
 Get reference to carma 8 station 3g correlator pipeline. More...
 
C3gRemapperSubsystem & c3gRemapper (const int index) const
 
Carma3GBandSubsystem & carma3gBand (const int index) const
 Get reference to a CARMA3G correlator band subsystem. More...
 
CarmaSlcBandSubsystem & carmaSlcBand (const int index) const
 Get reference to a spectral line correlator band subsystem. More...
 
CentralIfSubsystem & centralIf () const
 Get reference to the centalIF subsystem. More...
 
ControlSubsystemcontrol () const
 Get reference to the control subsystem. More...
 
DataflowSubsystem & dataflow () const
 Get reference to the control subsystem. More...
 
DelayEngineSubsystem & delay () const
 Get reference to the delay engine subsystem. More...
 
FaultSubsystem & fault () const
 Get reference to fault subsystem. More...
 
size_t getActualMonitorSystemSize () const
 Capacity usage related method - returns actual size used in bytes across all subsystems. More...
 
long getActualNumMonitorPoints () const
 Capacity usage related method - returns actual # of monitor points across all subsystems. More...
 
long getActualNumMonitorPoints (const MonitorValueType type) const
 Capacity usage related method - returns actual # of monitor points of type. More...
 
long getActualNumMonitorSamples () const
 Capacity related method - returns actual # of monitor samples across all subsystems. More...
 
long getActualNumMonitorSamples (MonitorValueType type) const
 Capacity related method - returns actual # of monitor samples of type <pretype across all subsystems. More...
 
long getActualNumMultiSampleMonitorPoints () const
 Capacity usage related method - returns actual # of monitor points with multiple samples across all subsystems. More...
 
long getActualNumSubsystems () const
 Capacity usage related method - returns actual number of subsystems allocated. More...
 
size_t getAllocatedMonitorSystemSize () const
 Capacity usage related method - returns total size allocated in bytes across all subsystems. More...
 
long getAllocatedNumMonitorPoints () const
 Capacity usage related method - returns allocated monitor point capacity across all subsystems. More...
 
long getAllocatedNumMonitorSamples () const
 Capacity related method - returns total monitor sample capacity across all subsystems. More...
 
long getAllocatedNumSubsystems () const
 Capacity usage related method - returns total number of subsystems allocated. More...
 
int getCarma3gBandCount () const
 Get the number of carma3g bands. More...
 
int getCarmaSlcBandCount () const
 Get the number of carmaSlcBands. More...
 
MonitorSubsystemgetChildSubsystem (int index) const
 Get underlying subsystem by index. More...
 
double getCollatorWriteDelay () const
 Delay offset (in seconds) from the corrected UTC half-second when the System frame is written to IPQ on the ACC. More...
 
double getCollatorWriteTime () const
 MJD when this system frame was actually written to the IPQ. More...
 
size_t getCountedMonitorSystemSize () const
 Capacity usage related method - returns total size counted, in bytes across all subsystems. More...
 
long getCountedNumMonitorPoints () const
 Capacity usage related method - returns number of monitor points present across all subsystems - number is obtained by iterating over all monitor points, so method is likely to be expensive. More...
 
long getCountedNumMonitorSamples () const
 Capacity related method - returns number of monitor samples counted across all subsystems. More...
 
double getFinalWriteTime () const
 Gets MJD when this system frame was actually read by the fault system. More...
 
virtual int getFrameCount () const
 Get the frame count for the last read frame. More...
 
size_t getMaxMonitorSystemSize () const
 Capacity usage related method - returns total size allocated in bytes across all subsystems. More...
 
long getMaxNumMonitorPoints () const
 Capacity usage related method - returns total allocated monitor point capacity across all subsystems. More...
 
long getMaxNumMonitorSamples () const
 Capacity related method - returns total allocated monitor sample capacity across all subsystems. More...
 
long getNumValidSubsystems () const
 Returns number of valid subsystems. More...
 
double getRawReadTime () const
 Gets MJD when this system frame was actually read by the fault system. More...
 
SystemFrameBuffer & getSystemFrameBuffer () const
 Get the underlying SystemFrameBuffer. More...
 
size_t getTotalMonitorSystemSize () const
 Capacity related method - returns total size available in bytes across all subsystems. More...
 
long getTotalNumMonitorPoints () const
 Capacity related method - returns total monitor point capacity across all subsystems. More...
 
long getTotalNumMonitorSamples () const
 Capacity related method - returns total monitor sample capacity across all subsystems. More...
 
long getTotalNumSubsystems () const
 Capacity related method - returns total subsystem capacity. More...
 
int getWbcBandCount () const
 Get the number of wbcBands. More...
 
ImrSubsystem & imr () const
 Get reference to imr subsystem. More...
 
bool isCurrent () const
 Returns true if the monitor subsystem contains data that is current. More...
 
LineLengthSubsystem & lineLength () const
 Get reference to the lineLength subsystem. More...
 
LoberotatorSubsystem & loberotator () const
 Get reference to the loberotator subsystem. More...
 
LoRefSubsystem & loRef () const
 Get reference to the LOref subsystem. More...
 
MasterClockSubsystem & masterclock () const
 Get reference to the masterclock subsystem. More...
 
 MonitorSystem (const std::string &systemName, long nSubsystems, long nMonitorPoints, long nSamples, int queueDepth=SubsystemFrameBuffer::kDefaultQueueDepth)
 Constructor base subsystem configuration. More...
 
OpacityMonitorSubsystem & opacityMonitor () const
 Get reference to the opacityMonitor subsystem. More...
 
OvroSubsystem & ovro (int index) const
 Get reference to ovro antenna subsystem. More...
 
PhaseMonitorSubsystem & phaseMonitor () const
 Get reference to the phase monitor subsystem. More...
 
ProjectDatabaseManagerSubsystem & projectDatabaseManager () const
 Get reference to the projectdatabase manager subsystem. More...
 
virtual unsigned int read ()
 Reads oldest unread data from the IPQ into the local set of monitor points. More...
 
virtual bool readNewest ()
 Reads in the newest data from the IPQ into the local set of monitor points. More...
 
virtual bool readNewestConditionalCopy ()
 If new data is available it is copied from the queue into the monitor system. More...
 
virtual bool readNewestIfStale ()
 Reads in data from the IPQ into the local set of monitor points if data is stale, that is, !isCurrent(). More...
 
void resetQueue ()
 Moves read pointer beyond top of queue so a read will block until the next write. More...
 
void resetTimes ()
 Resets collator write time - call clearAllTimes to conform to name of similar routine in ::carma:monitor::MonitorSubsystem and allows for more times to be added. More...
 
void setFinalWriteTime (double mjdTimestamp)
 Sets MJD when this system frame was actually read by the fault system. More...
 
void setFinalWriteTime ()
 
void setRawReadTime (double mjdTimestamp)
 Sets MJD when this system frame was actually read by the fault system. More...
 
void setRawReadTime ()
 
SignalPathSubsystem & signalPath () const
 Get reference to the signal path subsystem. More...
 
SlDataflowSubsystem & slDataflow (const int index) const
 
SldcSubsystem & sldc () const
 Get reference to the spectral line downconverter subsystem. More...
 
SlPipelineSubsystemslPipeline () const
 Get reference to the spectral line pipeline subsystem. More...
 
SlRemapperSubsystem & slRemapper (const int index) const
 
SystemFrameBuffer & systemFrameBuffer () const
 Get reference to the underlying storage. More...
 
SystemStatusSubsystem & systemStatus () const
 Get reference to the system status subsystem. More...
 
SzaSubsystem & sza (int index) const
 Get reference to sza antenna subsystem. More...
 
TestSubsystem & test () const
 Get reference to the test subsystem. More...
 
virtual std::string transportStatisticsToString (bool canonical=false) const
 Dumps transport statistics as a table, with write delays, and transport/write times printed out as doubles, with fixed precision. More...
 
VlbiSubsystem & vlbi () const
 Get reference to the vlbi subsystem. More...
 
WbcBandSubsystem & wbcBand (const int index) const
 Get reference to a wideband correlator band subsystem. More...
 
WbDataflowSubsystem & wbDataflow (const int index) const
 
WbdcSubsystem & wbdc () const
 Get reference to wideband downconverter subsystem. More...
 
WbPipelineSubsystemwbPipeline () const
 Get reference to the wideband line pipeline subsystem. More...
 
WbRemapperSubsystem & wbRemapper (const int index) const
 
WeatherSubsystem & weather () const
 Get reference to the weather subsystem. More...
 
virtual void write ()
 Write out the monitor point data values. More...
 
virtual ~MonitorSystem ()
 Destructor. More...
 
- Public Member Functions inherited from carma::monitor::MonitorSystemContainer
bool isActive ()
 Checks to see if this system is actively receiving data. More...
 
 MonitorSystemContainer (const std::string &systemName)
 Constructor base subsystem configuration. More...
 
virtual ~MonitorSystemContainer ()
 Destructor. More...
 
- Public Member Functions inherited from carma::monitor::MonitorContainer
void add (MonitorComponent &component)
 Add a subcomponent to this container A reference is kept to this subcomponent, so the caller is responsible for managing the lifecycle of the subcomponent; this container simply expects that it be available for access. More...
 
const Child & getChild (int index) const
 Get reference to child monitor component by index. More...
 
::std::vector< Child > getChildVec () const
 Get a vector of monitor components contained by this component. More...
 
MonitorComponentgetComponentPtr (const ::std::string &name, bool caseSensitive) const
 Get a contained monitor component by hierarchical name The hierarchical name starts below this container and consist of dot (".") separated components. More...
 
MonitorPointgetFirstMonitorPoint ()
 Recursively find the first monitor point in this container. More...
 
MonitorPointgetMonitorPoint (const std::string &name, bool caseSensitive) const
 Get a monitor point by name (hierarchical name OK). More...
 
MonitorPointgetMonitorPoint (tagIDType tagID) const
 Get a monitor point by tagID. More...
 
MonitorPointgetMonitorPointPtr (const std::string &name, bool caseSensitive) const
 
MonitorPointgetMonitorPointPtr (tagIDType tagID) const
 
int getNumChildren () const
 Get the number of monitor components contained by this component. More...
 
virtual int getNumContainerChildren () const
 Get the number of child monitor containers contained by this component. More...
 
virtual int getNumContainerDescendants () const
 Get the number of child monitor containers contained by this component and it's children. More...
 
virtual int getNumDescendants () const
 Get the total number of monitor components contained by this component and it's children. More...
 
int getNumMonitorPoints (bool recurse=false) const
 Get the number of monitor points. More...
 
int getNumMonitorPoints ()
 Get the total number of monitor points in this container. More...
 
int getNumSamples ()
 Get the total number of samples in this container. More...
 
bool hasAllData () const
 See if all MPs in this component and below have data samples. More...
 
virtual ::std::string hierarchyToString (bool canonical=false, bool verbose=false, bool value=true, int sampleIndex=0, int indent=0, int levels=-1) const
 Dump this and all contained monitor components to a string. More...
 
virtual ::std::string hierarchyToStringAverage (bool canonical=false, bool verbose=false, bool value=true, int indent=0, int levels=-1) const
 Dump this and all contained monitor components to a string. More...
 
virtual void hierarchyToVector (::std::vector< ::std::string > &hierarchyList, bool canonical=false, bool verbose=false, int sampleIndex=0) const
 Dump this and all contained monitor component strings into a map hierarchy. More...
 
virtual std::string leafToString (bool verbose=false, bool value=true, int sampleIndex=0) const
 Dump all leaf nodes below this component to a string. More...
 
 MonitorContainer (const ::std::string &name)
 Constructor. More...
 
virtual ::std::string monitorPointTags (bool untagged=false) const
 Write list of monitor points and their tagIDs to a string, one monitor point per line. More...
 
virtual bool operator== (const MonitorComponent &component) const
 Compares this monitor container for equality to the one passed. More...
 
void setArchivePriority (const MonitorComponent::ARCHIVE_PRIORITY priority, bool onlyDEFAULT=true)
 Recursively set the archive priority of all monitor points below. More...
 
virtual void setCanonicalName (const std::string &parents)
 Recursively set the canonical component name for this and all below. More...
 
virtual void setMonitorPointAttributes ()
 Set attributes of all monitor points held anywhere in the hierarchy within (and below) this container. More...
 
void setNoData () const
 Recursively mark all data samples as INVALID_NO_DATA. More...
 
void setPersistent (bool persistent)
 Set the persistent attribute for the value of a MonitorPoint, or in the case of a container for its descendants (recursively). More...
 
void setValidity (MonitorPoint::VALIDITY validity)
 Recursively set validity for all samples of all monitor points below this container. More...
 
std::string toString (bool canonicalName=false, bool verbose=false, bool value=true, int sampleIndex=0, int indent=0) const
 Write this monitor component to a string. More...
 
std::string toStringAverage (bool canonicalName=false, bool verbose=false, bool value=true, int indent=0) const
 Write this monitor component to a string, using frame average values. More...
 
 ~MonitorContainer ()
 Destructor. More...
 
- Public Member Functions inherited from carma::monitor::MonitorComponent
const std::string & getCanonicalName () const
 Get the canonical component name. More...
 
virtual const std::string & getDescription () const
 Get the verbose description of the monitor component. More...
 
virtual const std::string & getLongName () const
 Get the long name of the monitor component. More...
 
virtual const std::string & getName () const
 Get the component name (leaf part of canonical name). More...
 
virtual std::string getPhysicalDeviceName () const
 Get the physical device name, if one exists. More...
 
std::string getPhysicalDeviceString () const
 Get the physical device name, if one exists, enclosed in parentheses. More...
 
std::string getPhysicalName () const
 Get the physical name, which is location.device.component or if there is no associated physical device it is just component name. More...
 
virtual const std::string & getShortName () const
 Get the short name of the monitor component. More...
 
virtual bool isMonitorPoint () const
 Identifies this component as a MonitorPoint or any derivative Should be over-ridden by the MonitorPoint class; others that don't derive from MP can use this default implementation. More...
 
virtual bool isSubsystem () const
 Check if the component is a MonitorSubsystem. More...
 
 MonitorComponent (const std::string &name)
 Constructor. More...
 
bool operator!= (const MonitorComponent &component) const
 Checks if components are not equal. More...
 
void setDescription (const std::string &text)
 Set the verbose description of the monitor component. More...
 
void setLongName (const std::string &name)
 Set the long name of the monitor component. More...
 
void setName (const std::string &name)
 Set the leaf part of the canonical name of the monitor component. More...
 
void setShortName (const std::string &name)
 Set the short name of the monitor component. More...
 
void setShortName (const std::string &name, int index)
 Set the short name of the monitor component, with an index appended. More...
 
virtual ~MonitorComponent ()
 Destructor. More...
 

Protected Member Functions

 CarmaMonitorSystem (std::string name, int queueDepth)
 Full monitor system with all subsystems. More...
 
- Protected Member Functions inherited from carma::monitor::MonitorSystem
SubsystemFramegetChildSubsystemFrame (int index) const
 
- Protected Member Functions inherited from carma::monitor::MonitorContainer
virtual void setLocalMonitorPointAttributes ()
 Set attributes of all monitor points held directly by this container. More...
 

Additional Inherited Members

- Public Types inherited from carma::monitor::MonitorComponent
enum  ARCHIVE_PRIORITY {
  VITAL, USEFUL, NORMAL, DEBUG,
  VERBOSE, DEFAULT, DONTARCHIVE
}
 Archiving priority. More...
 
- Static Public Member Functions inherited from carma::monitor::MonitorComponent
static std::string archivePriorityToString (MonitorComponent::ARCHIVE_PRIORITY priority)
 Get a string representation for an archive priority. More...
 
static std::string convertAllLower (std::string name)
 Convert a name to all lower case. More...
 
- Static Protected Member Functions inherited from carma::monitor::MonitorContainer
static Child findDescendant (const MonitorContainer &rootContainer, const ::std::string &name, bool caseSensitive)
 
- Protected Attributes inherited from carma::monitor::MonitorComponent
bool debug_
 

Detailed Description

Carma monitor system.

This instance of the CMS is written by the faultSystem after frame collation. It consists of all subsystems though they may not have been synchronized properly yet. Most programs written in the ACC will use this class.

Definition at line 737 of file MonitorSystem.h.

Constructor & Destructor Documentation

carma::monitor::CarmaMonitorSystem::CarmaMonitorSystem ( std::string  name,
int  queueDepth 
)
protected

Full monitor system with all subsystems.

Parameters
nameof the system
queueDepthDepth of underlying IPQ.
carma::monitor::CarmaMonitorSystem::CarmaMonitorSystem ( )

Full monitor system with all subsystems.

carma::monitor::CarmaMonitorSystem::CarmaMonitorSystem ( const RawCarmaMonitorSystem raw)
explicit

Full monitor system with all subsystems.

Parameters
rawRawCarmaMonitorSystem object used to construct this - resulting object is clone of raw.

Member Function Documentation

void carma::monitor::CarmaMonitorSystem::synchronize ( const CarmaMonitorSystem src)

Method to synchronize this object with another CarmaMonitorSystem object.

Both objects must be commensurate, which means that both objects support the same max # of subsystems, max total # of monitor points and max total # of samples. If the two are not commensurate, then this method throws a carma::util::ErrorException.

Precondition
this.maxNumSubsystemFrames == src.maxNumSubsystemFrames && this.maxTotalMonitorPoints == src.maxTotalMonitorPoints && this.maxTotalSamples == src.maxTotalSamples
Postcondition
this == src
Precondition
this.maxNumSubsystemFrames != src.maxNumSubsystemFrames || this.maxTotalMonitorPoints != src.maxTotalMonitorPoints || this.maxTotalSamples != src.maxTotalSamples
Postcondition
exception carma::util::ErrorException
Parameters
srcconst CarmaMonitorSystem object - this object must be synchronized with src
Returns
none
Exceptions
carma::util::ErrorException

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