CARMA C++
CanMonitorCondition.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CANBUS_CANMONITORCONDITION_H
2 #define SZA_ANTENNA_CANBUS_CANMONITORCONDITION_H
3 
11 #include "carma/szautil/DataType.h"
13 
14 namespace sza {
15  namespace antenna {
16  namespace canbus {
17 
22  public:
23 
27  CanMonitorCondition(unsigned packetCount = defaultPacketCount_,
28  unsigned stablePacketCount = defaultStablePacketCount_,
29  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
30 
52  unsigned packetCount = defaultPacketCount_,
53  unsigned stablePacketCount = defaultStablePacketCount_,
54  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
55 
62  unsigned packetCount = defaultPacketCount_,
63  unsigned stablePacketCount = defaultStablePacketCount_,
64  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
65 
66 
67  // Equivalent setTo() methods to the constructor versions
68 
69  void setTo(unsigned packetCount = defaultPacketCount_,
70  unsigned stablePacketCount = defaultStablePacketCount_,
71  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
72 
73  void setTo(sza::util::DataTypeTruthFn fn,
75  unsigned packetCount = defaultPacketCount_,
76  unsigned stablePacketCount = defaultStablePacketCount_,
77  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
78 
79  void setTo(sza::util::DataTypeTruthFn fn,
82  unsigned packetCount = defaultPacketCount_,
83  unsigned stablePacketCount = defaultStablePacketCount_,
84  unsigned giveUpPacketCount = defaultGiveUpPacketCount_);
85 
86  void operator=(const CanMonitorCondition& condition);
87 
91  virtual ~CanMonitorCondition();
92 
93  // Return true if the condition is satisfied by the passed value
94 
95  bool isSatisfiedBy(sza::util::DataType& dataType);
96 
100  void checkPacketCount(unsigned packetCount, unsigned stablePacketCount,
101  unsigned giveUpPacketCount);
102 
104  sza::util::DataType op1_;
105  sza::util::DataType op2_;
106 
107  unsigned packetCount_;
108  unsigned stablePacketCount_;
109  unsigned giveUpPacketCount_;
110 
111  static const unsigned defaultPacketCount_ = 1;
112  static const unsigned defaultStablePacketCount_ = 0;
113  static const unsigned defaultGiveUpPacketCount_ = 20;
114 
115  }; // End class CanMonitorCondition
116 
117  } // End namespace canbus
118  } // End namespace antenna
119 } // End namespace sza
120 
121 
122 
123 #endif // End #ifndef SZA_ANTENNA_CANBUS_CANMONITORCONDITION_H
A class for managing operations on DataType objects which return booleans.
Tagged: Tue Jun 22 22:32:16 UTC 2004.
A class for handling a condition for a monitor point.
void checkPacketCount(unsigned packetCount, unsigned stablePacketCount, unsigned giveUpPacketCount)
Check the packet count to see if it makes sense.
virtual ~CanMonitorCondition()
Destructor.
CanMonitorCondition(unsigned packetCount=defaultPacketCount_, unsigned stablePacketCount=defaultStablePacketCount_, unsigned giveUpPacketCount=defaultGiveUpPacketCount_)
Constructor for no condition.
Tagged: Mon Oct 25 18:41:34 PDT 2004.
Enumerate data types.
Definition: DataType.h:28