12 #ifndef CARMA_MONITOR_MONITOR_POINT_SAMPLE_H
13 #define CARMA_MONITOR_MONITOR_POINT_SAMPLE_H
17 #include "carma/corba/corba.h"
19 #include "carma/monitor/monitorframe.h"
26 struct TransportMonitorValue;
27 struct TransportMonitorSample;
62 uchar getValidityFlags( )
const;
63 uchar getBlankingFlags( )
const;
67 struct MonitorValueStringChunk {
72 class MonitorPointSet;
183 const MonitorValueStringChunk & value,
270 void setKnownSaneValidityFlags( uchar saneFlags,
271 bool markMpAsModified =
true );
323 void allocate (ushort headerOffset, ushort iSample);
332 void clear (
bool deallocate =
false);
357 MonitorSampleValues & outSamples,
360 int sampleIndex )
const;
383 const MonitorSampleValues & inValues,
398 TransportMonitorValue& value )
const;
429 const TransportMonitorValue & value );
457 const char * fileName = __FILE__,
458 int lineNum = __LINE__ );
461 const std::ostringstream & errStream,
462 const char * fileName = __FILE__,
463 int lineNum = __LINE__ );
468 const char * fileName = __FILE__,
469 int lineNum = __LINE__ );
474 const char * fileName = __FILE__,
475 int lineNum = __LINE__ );
481 inline carma::monitor::uchar
482 carma::monitor::MonitorSampleValue::getValidityFlags( )
const
484 return validityFlags;
488 inline carma::monitor::uchar
489 carma::monitor::MonitorSampleValue::getBlankingFlags( )
const
491 return blankingFlags;
516 if (
this != &rhs ) {
517 sample_.value = rhs.sample_.value;
518 sample_.blankingFlags = rhs.sample_.blankingFlags;
519 sample_.validityFlags = rhs.sample_.validityFlags;
529 return sample_.value;
533 inline carma::monitor::uchar
536 return sample_.validityFlags;
540 inline carma::monitor::uchar
543 return sample_.blankingFlags;
547 inline unsigned short
550 return sample_.iSample;
557 sample_.iSample = iSample;
571 return sample_.value;
578 sample_.blankingFlags = flags;
585 sample_.blankingFlags = 0;
592 sample_.validityFlags = 0;
599 sample_.blankingFlags = 0;
600 sample_.validityFlags = 0;
607 sample_.blankingFlags = 0;
608 sample_.validityFlags = 0;
619 const ushort iSample )
621 sample_.blankingFlags = 0;
622 sample_.validityFlags = 0;
623 sample_.dummy = (headerOffset & 0x00FF);
624 sample_.iSample = iSample;
628 #endif // CARMA_MONITOR_MONITOR_POINT_SAMPLE_H
short MonitorValueType
Enumeration of possible types for monitor point values.
ushort getSampleNumber() const
Method to return sample number asscoiated with this MonitorPointSample.
MonitorPointSample & operator=(const MonitorPointSample &rhs)
Assignment operator.
This is the include file for Carma exception handling utilities.
Class representing a data sample for a MonitorPoint.
void setValueStringChunkAndKnownSaneValidityFlags(const MonitorValueStringChunk &value, uchar saneFlags)
Method to set monitor sample value as a string chunk and already "sane" validity flags at the same...
A class that manages the sets of monitor points for a monitor subsystem.
MonitorValue & getMonitorValue() const
Method to get monitor sample value as a union.
MonitorValue & getValue() const
Returns internal union structure containingv the value of the monitor point sample.
uchar getValidityFlags() const
Method to return validity flag value of the monitor sample.
void clear(bool deallocate=false)
Clears all flags and (optionally) deallocates the sample so the sample is no longer associated with a...
void setSampleNumber(ushort iSample)
Method to set sample number associated with this MonitorPointSample.
void allocate(ushort headerOffset, ushort iSample)
Associates this sample with a monitor point represented by a MonitorPointHeader at offset headerOffse...
void getTransportedSample(CORBA::ULong metaIdx, const MonitorSampleValues &inValues, int headerOffset)
This method and MonitorPointSample::fillInTransportSample are transport related methods.
MonitorPointSample(MonitorSampleValue &sample, int index=-1, MonitorPointSet *set=0)
Constructor - takes the base level structure, index to the corresponding monitor point's header infor...
Structure for storing monitor point sample, including value.
void clearBlankingFlags()
Method to clear blanking flag value of the monitor sample.
void clearFlags()
Method to clear validity and blanking/flagging flag values of the monitor sample. ...
Base exception class for managing carma errors.
Exception class thrown when an invalid sample is detected.
uchar getBlankingFlags() const
Method to return blanking flag value of the monitor sample.
void setValueSerialNoAndKnownSaneValidityFlags(long value, uchar saneFlags)
Method to set monitor sample value as a serial number.
MonitorSampleValue & getSample() const
Returns a reference to the internal MonitorSampleValue structure.
~MonitorPointSample()
Destructor.
type definitions for monitor system
void setTransportValue(MonitorValueType valueType, TransportMonitorValue &value) const
Sets monitor point sample value to be transported using value from this sample.
void setBlankingFlags(uchar flags)
Method to set blanking flag value of the monitor sample.
Union of all possible types of monitor sample values.
void clearValidityFlags()
Method to clear validity flag value of the monitor sample.
void setValidityFlags(uchar flags)
Method to set validity flag value of the monitor sample.
void setMonitorValueAndKnownSaneValidityFlags(char value, uchar saneFlags)
Method to set monitor sample value as a char.
void fillInTransportSample(CORBA::ULong metaIdx, MonitorSampleValues &outSamples, MonitorValueType mvt, tagIDType tagId, int sampleIndex) const
This method and MonitorPointSample:;getTransportedSample are transport related methods.