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

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>

Inheritance diagram for carma::monitor::MonitorDevice:
carma::monitor::MonitorContainer carma::monitor::MonitorComponent

Public Member Functions

PhysicalDevicegetPhysicalDevice () 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...
 
- 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...
 
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

- 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...
 
- Protected Member Functions inherited from carma::monitor::MonitorContainer
virtual void setLocalMonitorPointAttributes ()
 Set attributes of all monitor points held directly by this container. 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

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.

Constructor & Destructor Documentation

carma::monitor::MonitorDevice::MonitorDevice ( const std::string &  name)

Constructor.

Parameters
nameMonitorDevice name
carma::monitor::MonitorDevice::MonitorDevice ( const std::string &  name,
PhysicalDevice physicalDevice 
)

Constructor.

Parameters
nameMonitorDevice name
physicalDevicephysical device
virtual carma::monitor::MonitorDevice::~MonitorDevice ( )
virtual

Destructor.

Member Function Documentation

PhysicalDevice& carma::monitor::MonitorDevice::getPhysicalDevice ( ) const

Get the physical device.

std::string carma::monitor::MonitorDevice::getPhysicalDeviceName ( ) const
virtual

Get the physical device name, if one exists.

Returns
the physical device name, or a zero length string if there is none

Reimplemented from carma::monitor::MonitorComponent.

void carma::monitor::MonitorDevice::setPhysicalDevice ( PhysicalDevice physicalDevice)

Set the physical device.

Parameters
physicalDevicepointer to the physical device for this sense point

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