CARMA C++
|
A class for handling a condition for a monitor point. More...
#include <carma/antenna/sza/antenna/canbus/CanMonitorCondition.h>
Public Member Functions | |
CanMonitorCondition (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for no condition. More... | |
CanMonitorCondition (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for a single-valued condition. More... | |
CanMonitorCondition (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, sza::util::DataType op2, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) | |
Constructor for a dual-valued condition. More... | |
void | checkPacketCount (unsigned packetCount, unsigned stablePacketCount, unsigned giveUpPacketCount) |
Check the packet count to see if it makes sense. More... | |
bool | isSatisfiedBy (sza::util::DataType &dataType) |
void | operator= (const CanMonitorCondition &condition) |
void | setTo (unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
void | setTo (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
void | setTo (sza::util::DataTypeTruthFn fn, sza::util::DataType op1, sza::util::DataType op2, unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_) |
virtual | ~CanMonitorCondition () |
Destructor. More... | |
Public Attributes | |
sza::util::DataTypeTruthFn | fn_ |
unsigned | giveUpPacketCount_ |
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 21 of file CanMonitorCondition.h.
sza::antenna::canbus::CanMonitorCondition::CanMonitorCondition | ( | unsigned | packetCount = defaultPacketCount_ , |
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for no condition.
Matches any condition.
sza::antenna::canbus::CanMonitorCondition::CanMonitorCondition | ( | sza::util::DataTypeTruthFn | fn, |
sza::util::DataType | op1, | ||
unsigned | packetCount = defaultPacketCount_ , |
||
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for a single-valued condition.
op | operator to check with |
val | value to check |
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::antenna::canbus::CanMonitorCondition::CanMonitorCondition | ( | sza::util::DataTypeTruthFn | fn, |
sza::util::DataType | op1, | ||
sza::util::DataType | op2, | ||
unsigned | packetCount = defaultPacketCount_ , |
||
unsigned | stablePacketCount = defaultStablePacketCount_ , |
||
unsigned | giveUpPacketCount = defaultGiveUpPacketCount_ |
||
) |
Constructor for a dual-valued condition.
|
virtual |
Destructor.
void sza::antenna::canbus::CanMonitorCondition::checkPacketCount | ( | unsigned | packetCount, |
unsigned | stablePacketCount, | ||
unsigned | giveUpPacketCount | ||
) |
Check the packet count to see if it makes sense.