1 #ifndef CARMA_MONITOR_SANITYCHECKS_H
2 #define CARMA_MONITOR_SANITYCHECKS_H
12 void logBadValidityFlags( uchar vf,
13 const MonitorPoint * mp,
15 const char * context );
17 void logBadValidityFlags( uchar vf,
21 const char * context );
24 const MonitorPoint * mp,
26 const char * context );
29 uchar sanityCheckValidityFlags( uchar vf,
30 const MonitorPoint * mp,
32 const char * context );
34 uchar sanityCheckValidityFlags( uchar vf,
38 const char * context );
42 const MonitorPoint * mp,
44 const char * context );
51 inline carma::monitor::uchar
52 carma::monitor::sanityCheckValidityFlags(
54 const MonitorPoint *
const mp,
56 const char *
const context )
58 if ( vf >= MonitorPoint::MAX_VALIDITY ) {
59 logBadValidityFlags( vf, mp, fix, context );
62 return MonitorPoint::INVALID_NO_DATA;
70 inline carma::monitor::uchar
71 carma::monitor::sanityCheckValidityFlags(
73 const tagIDType tagId,
74 const int sampleIndex,
76 const char *
const context )
78 if ( vf >= MonitorPoint::MAX_VALIDITY ) {
79 logBadValidityFlags( vf, tagId, sampleIndex, fix, context );
82 return MonitorPoint::INVALID_NO_DATA;
91 carma::monitor::sanityCheckValidity(
92 const MonitorPoint::VALIDITY validity,
93 const MonitorPoint *
const mp,
95 const char *
const context )
97 if ( static_cast< uchar >( validity ) >= MonitorPoint::MAX_VALIDITY ) {
98 logBadValidity( validity, mp, fix, context );
101 return MonitorPoint::INVALID_NO_DATA;
VALIDITY
Validity states of the data value.
Abstract base class for all monitor points.
type definitions for monitor system