CARMA C++
|
A monitor system device, used in the construction of monitor points and containers that are based on physical devices. More...
#include <carma/monitor/MonitorDevice.h>
Public Member Functions | |
PhysicalDevice & | getPhysicalDevice () const |
Get the physical device. More... | |
std::string | getPhysicalDeviceName () const |
Get the physical device name, if one exists. More... | |
MonitorDevice (const std::string &name) | |
Constructor. More... | |
MonitorDevice (const std::string &name, PhysicalDevice &physicalDevice) | |
Constructor. More... | |
void | setPhysicalDevice (PhysicalDevice &physicalDevice) |
Set the physical device. More... | |
virtual | ~MonitorDevice () |
Destructor. More... | |
![]() | |
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... | |
MonitorComponent * | getComponentPtr (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... | |
MonitorPoint & | getFirstMonitorPoint () |
Recursively find the first monitor point in this container. More... | |
MonitorPoint & | getMonitorPoint (const std::string &name, bool caseSensitive) const |
Get a monitor point by name (hierarchical name OK). More... | |
MonitorPoint & | getMonitorPoint (tagIDType tagID) const |
Get a monitor point by tagID. More... | |
MonitorPoint * | getMonitorPointPtr (const std::string &name, bool caseSensitive) const |
MonitorPoint * | getMonitorPointPtr (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... | |
![]() | |
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... | |
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 std::string | transportStatisticsToString (bool canonical=false) const |
Dump end-toe-end transport statistics (if available). More... | |
virtual | ~MonitorComponent () |
Destructor. More... | |
Additional Inherited Members | |
![]() | |
enum | ARCHIVE_PRIORITY { VITAL, USEFUL, NORMAL, DEBUG, VERBOSE, DEFAULT, DONTARCHIVE } |
Archiving priority. More... | |
![]() | |
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... | |
![]() | |
virtual void | setLocalMonitorPointAttributes () |
Set attributes of all monitor points held directly by this container. More... | |
![]() | |
static Child | findDescendant (const MonitorContainer &rootContainer, const ::std::string &name, bool caseSensitive) |
![]() | |
bool | debug_ |
![]() | |
std::ostream & | operator<< (std::ostream &os, const MonitorComponent &component) |
A monitor system device, used in the construction of monitor points and containers that are based on physical devices.
Definition at line 32 of file MonitorDevice.h.
carma::monitor::MonitorDevice::MonitorDevice | ( | const std::string & | name | ) |
Constructor.
name | MonitorDevice name |
carma::monitor::MonitorDevice::MonitorDevice | ( | const std::string & | name, |
PhysicalDevice & | physicalDevice | ||
) |
Constructor.
name | MonitorDevice name |
physicalDevice | physical device |
|
virtual |
Destructor.
PhysicalDevice& carma::monitor::MonitorDevice::getPhysicalDevice | ( | ) | const |
Get the physical device.
|
virtual |
Get the physical device name, if one exists.
Reimplemented from carma::monitor::MonitorComponent.
void carma::monitor::MonitorDevice::setPhysicalDevice | ( | PhysicalDevice & | physicalDevice | ) |
Set the physical device.
physicalDevice | pointer to the physical device for this sense point |