CARMA C++
|
A class for handling a condition for a monitor point. More...
#include <carma/szautil/MonitorCondition.h>
Public Member Functions | |
void | checkPacketCount (unsigned packetCount, unsigned stablePacketCount, unsigned giveUpPacketCount) |
Check the packet count to see if it makes sense. More... | |
std::string | format (std::string ®) |
Format this condition. More... | |
bool | isDelta () |
bool | isSatisfiedBy (sza::util::DataType &dataType) |
double | max () |
double | min () |
MonitorCondition (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for no condition. More... | |
MonitorCondition (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for a single-valued condition. More... | |
MonitorCondition (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, sza::util::DataType op2, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for a dual-valued condition. More... | |
unsigned | nFrame () |
void | operator= (const MonitorCondition &condition) |
void | setTo (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
void | setTo (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
void | setTo (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, sza::util::DataType op2, bool delta=false, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
virtual | ~MonitorCondition () |
Destructor. More... | |
Public Attributes | |
bool | first_ |
sza::util::DataTypeTruthFn | fn_ |
unsigned | giveUpPacketCount_ |
bool | isDeltaCondition_ |
sza::util::DataType | last_ |
sza::util::DataType | op1_ |
sza::util::DataType | op2_ |
unsigned | packetCount_ |
unsigned | stablePacketCount_ |
Static Public Attributes | |
static const unsigned | defaultGiveUpPacketCount_ = 20 |
static const unsigned | defaultPacketCount_ = 1 |
static const unsigned | defaultStablePacketCount_ = 0 |
A class for handling a condition for a monitor point.
Definition at line 20 of file MonitorCondition.h.
sza::util::MonitorCondition::MonitorCondition | ( | unsigned | packetCount = defaultPacketCount_ , |
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for no condition.
Matches any condition.
sza::util::MonitorCondition::MonitorCondition | ( | sza::util::DataTypeTruthFn | fn, |
sza::util::DataType | op1, | ||
bool | delta = false , |
||
unsigned | packetCount = defaultPacketCount_ , |
||
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for a single-valued condition.
op | operator to check with |
delta | If true, check the delta of this value |
packetCount | start checking when the packet count after issuing this condition reaches this count. |
stablePacketCount | After we start checking, the condition must hold true for this many consecutive packets before we will report it as true |
giveUpPacketCount | If the condition has not become true this many packets after we start checking, give up (0 == keep trying forever) |
sza::util::MonitorCondition::MonitorCondition | ( | sza::util::DataTypeTruthFn | fn, |
sza::util::DataType | op1, | ||
sza::util::DataType | op2, | ||
bool | delta = false , |
||
unsigned | packetCount = defaultPacketCount_ , |
||
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for a dual-valued condition.
|
virtual |
Destructor.
void sza::util::MonitorCondition::checkPacketCount | ( | unsigned | packetCount, |
unsigned | stablePacketCount, | ||
unsigned | giveUpPacketCount | ||
) |
Check the packet count to see if it makes sense.
std::string sza::util::MonitorCondition::format | ( | std::string & | reg | ) |
Format this condition.