My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::MonitorCondition Class Reference

#include <MonitorCondition.h>

Public Member Functions

 MonitorCondition (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
 MonitorCondition (gcp::util::DataTypeTruthFn fn, gcp::util::DataType op1, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
 MonitorCondition (gcp::util::DataTypeTruthFn fn, gcp::util::DataType op1, gcp::util::DataType op2, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
void setTo (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
void setTo (gcp::util::DataTypeTruthFn fn, gcp::util::DataType op1, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
void setTo (gcp::util::DataTypeTruthFn fn, gcp::util::DataType op1, gcp::util::DataType op2, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
 
void operator= (const MonitorCondition &condition)
 
std::string format (std::string &reg)
 
virtual ~MonitorCondition ()
 
bool isSatisfiedBy (gcp::util::DataType &dataType)
 
void checkPacketCount (unsigned packetCount, unsigned stablePacketCount, unsigned giveUpPacketCount)
 
bool isDelta ()
 
unsigned nFrame ()
 
double min ()
 
double max ()
 

Public Attributes

gcp::util::DataTypeTruthFn fn_
 
gcp::util::DataType op1_
 
gcp::util::DataType op2_
 
bool isDeltaCondition_
 
bool first_
 
gcp::util::DataType last_
 
unsigned packetCount_
 
unsigned stablePacketCount_
 
unsigned giveUpPacketCount_
 

Static Public Attributes

static const unsigned defaultPacketCount_ = 1
 
static const unsigned defaultStablePacketCount_ = 0
 
static const unsigned defaultGiveUpPacketCount_ = 20
 

Detailed Description

A class for handling a condition for a monitor point.

Constructor & Destructor Documentation

MonitorCondition::MonitorCondition ( unsigned  packetCount = defaultPacketCount_,
unsigned  stablePacketCount = defaultStablePacketCount_,
unsigned  giveUpPacketCount = defaultGiveUpPacketCount_ 
)

Constructor for no condition. Matches any condition.

Constructor for no condition

MonitorCondition::MonitorCondition ( gcp::util::DataTypeTruthFn  fn,
gcp::util::DataType  op1,
bool  delta = false,
unsigned  packetCount = defaultPacketCount_,
unsigned  stablePacketCount = defaultStablePacketCount_,
unsigned  giveUpPacketCount = defaultGiveUpPacketCount_ 
)

Constructor for a single-valued condition.

Parameters
opoperator to check with
deltaIf true, check the delta of this value
packetCountstart checking when the packet count after issuing this condition reaches this count.
stablePacketCountAfter we start checking, the condition must hold true for this many consecutive packets before we will report it as true
giveUpPacketCountIf the condition has not become true this many packets after we start checking, give up (0 == keep trying forever)

Constructor for a single-valued condition

MonitorCondition::MonitorCondition ( gcp::util::DataTypeTruthFn  fn,
gcp::util::DataType  op1,
gcp::util::DataType  op2,
bool  delta = false,
unsigned  packetCount = defaultPacketCount_,
unsigned  stablePacketCount = defaultStablePacketCount_,
unsigned  giveUpPacketCount = defaultGiveUpPacketCount_ 
)

Constructor for a dual-valued condition

MonitorCondition::~MonitorCondition ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

void MonitorCondition::checkPacketCount ( unsigned  packetCount,
unsigned  stablePacketCount,
unsigned  giveUpPacketCount 
)

Check the packet count to see if it makes sense

....................................................................... Check the packet count to see if it makes sense

std::string MonitorCondition::format ( std::string &  reg)

Format this condition

bool MonitorCondition::isSatisfiedBy ( gcp::util::DataType dataType)

....................................................................... Check if a value satisfies the requested condition


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