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

ThresholdHandler contains methods to deal with setting thresholds via mpml file. More...

#include <carma/monitor/ThresholdHandler.h>

Inherits HandlerBase.

Public Member Functions

void characters (const XMLCh *const chars, const unsigned int length)
 parse data between <element> and </element> tags More...
 
void endElement (const XMLCh *const name)
 parses end tag. More...
 
void error (const SAXParseException &ex)
 SAX ErrorHandler method for notification of a recoverable parser error. More...
 
void fatalError (const SAXParseException &ex)
 SAX ErrorHandler method for reporting fatal errors. More...
 
void processContainer (AttributeList &attributes)
 process the <Container> and <Device> elements More...
 
void processPoint (AttributeList &attributes)
 process the <MonitorPoint>, <ControlPoint>, <SoftPoint> elements More...
 
void processSubsystem (AttributeList &attributes)
 process the <Subsystem> element More...
 
void setThreshold (const char *canonicalName, const char *mpType, const char *thresholdName, const char *value)
 method for setting a threshold More...
 
void setThresholds (const ElementInfoStruct &subsystemInfo, const std::vector< ElementInfoStruct > &containerInfo, const PointInfoStruct &mpInfo, const char *thresholdName, const char *value)
 method for setting thresholds (setThreshold actually sets thresholds; this method expands all the names if there are multiple counts of a given subsystem/container/point) More...
 
void startElement (const XMLCh *const name, AttributeList &attributes)
 parse start tag, including attributes More...
 
 ThresholdHandler (carma::monitor::MonitorSystemWithThreshold *system)
 constructor More...
 
void warning (const SAXParseException &ex)
 SAX ErrorHandler method for notification of a warning. More...
 

Detailed Description

ThresholdHandler contains methods to deal with setting thresholds via mpml file.

The actual setting of thresholds is done by passing a pointer to a carma::monitor::MonitorSystemWithThreshold object, but the ThresholdHandler parses the mpml and makes the necessary calls.

Definition at line 31 of file ThresholdHandler.h.

Constructor & Destructor Documentation

carma::monitor::ThresholdHandler::ThresholdHandler ( carma::monitor::MonitorSystemWithThreshold system)

constructor

Parameters
systema pointer to a MonitorSystemWithThreshold object

Member Function Documentation

void carma::monitor::ThresholdHandler::characters ( const XMLCh *const  chars,
const unsigned int  length 
)

parse data between <element> and </element> tags

Parameters
charsThe characters needing parsing
lengthThe number of characters to use from chars
void carma::monitor::ThresholdHandler::endElement ( const XMLCh *const  name)

parses end tag.

use this to avoid parsing whitespace or other data not contained within an element

Parameters
nameThe name of the element
void carma::monitor::ThresholdHandler::error ( const SAXParseException &  ex)

SAX ErrorHandler method for notification of a recoverable parser error.

Parameters
exexception
void carma::monitor::ThresholdHandler::fatalError ( const SAXParseException &  ex)

SAX ErrorHandler method for reporting fatal errors.

Parameters
exexception
void carma::monitor::ThresholdHandler::processContainer ( AttributeList &  attributes)

process the <Container> and <Device> elements

Parameters
attributesxml attributes contained in the element tag
void carma::monitor::ThresholdHandler::processPoint ( AttributeList &  attributes)

process the <MonitorPoint>, <ControlPoint>, <SoftPoint> elements

Parameters
attributesxml attributes contained in the element tag
void carma::monitor::ThresholdHandler::processSubsystem ( AttributeList &  attributes)

process the <Subsystem> element

Parameters
attributesxml attributes contained in the element tag
void carma::monitor::ThresholdHandler::setThreshold ( const char *  canonicalName,
const char *  mpType,
const char *  thresholdName,
const char *  value 
)

method for setting a threshold

Parameters
canonicalNamefull canonical name for monitor point
mpTypedata type of the monitor point (ie: float, int, etc)
thresholdNamethreshold name (ie: errhi, warnlo, etc)
valuevalue for threshold being set
void carma::monitor::ThresholdHandler::setThresholds ( const ElementInfoStruct &  subsystemInfo,
const std::vector< ElementInfoStruct > &  containerInfo,
const PointInfoStruct &  mpInfo,
const char *  thresholdName,
const char *  value 
)

method for setting thresholds (setThreshold actually sets thresholds; this method expands all the names if there are multiple counts of a given subsystem/container/point)

Parameters
subsystemInfoinformation about subsystem (name, count)
containerInfovector containing the info (name, count) of all containers (and sub-containers)
mpInfoinformation about monitor point (name, count, type)
thresholdNamethreshold name (ie: errhi, warnlo, etc)
valuevalue for threshold being set
void carma::monitor::ThresholdHandler::startElement ( const XMLCh *const  name,
AttributeList &  attributes 
)

parse start tag, including attributes

Parameters
nameThe name of the element
attributesList of specified or default attributes
void carma::monitor::ThresholdHandler::warning ( const SAXParseException &  ex)

SAX ErrorHandler method for notification of a warning.


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