CARMA C++
|
Class representing a data sample for a MonitorPoint. More...
#include <carma/monitor/MonitorPointSample.h>
Public Member Functions | |
void | allocate (ushort headerOffset, ushort iSample) |
Associates this sample with a monitor point represented by a MonitorPointHeader at offset headerOffset within the subsystem frame containing this sample. More... | |
void | clear (bool deallocate=false) |
Clears all flags and (optionally) deallocates the sample so the sample is no longer associated with a monitor point. More... | |
void | clearBlankingFlags () |
Method to clear blanking flag value of the monitor sample. More... | |
void | clearFlags () |
Method to clear validity and blanking/flagging flag values of the monitor sample. More... | |
void | clearValidityFlags () |
Method to clear validity flag value of the monitor sample. More... | |
void | fillInTransportSample (CORBA::ULong metaIdx, MonitorSampleValues &outSamples, MonitorValueType mvt, tagIDType tagId, int sampleIndex) const |
This method and MonitorPointSample:;getTransportedSample are transport related methods. More... | |
uchar | getBlankingFlags () const |
Method to return blanking flag value of the monitor sample. More... | |
MonitorValue & | getMonitorValue () const |
Method to get monitor sample value as a union. More... | |
MonitorSampleValue & | getSample () const |
Returns a reference to the internal MonitorSampleValue structure. More... | |
ushort | getSampleNumber () const |
Method to return sample number asscoiated with this MonitorPointSample. More... | |
void | getTransportedSample (CORBA::ULong metaIdx, const MonitorSampleValues &inValues, int headerOffset) |
This method and MonitorPointSample::fillInTransportSample are transport related methods. More... | |
uchar | getValidityFlags () const |
Method to return validity flag value of the monitor sample. More... | |
MonitorPointSample (MonitorSampleValue &sample, int index=-1, MonitorPointSet *set=0) | |
Constructor - takes the base level structure, index to the corresponding monitor point's header information and a pointer to the enclosing MonitorPointSet which is non-NULL when in a subsystem. More... | |
MonitorPointSample & | operator= (const MonitorPointSample &rhs) |
Assignment operator. More... | |
void | setBlankingFlags (uchar flags) |
Method to set blanking flag value of the monitor sample. More... | |
void | setKnownSaneValidityFlags (uchar saneFlags, bool markMpAsModified=true) |
void | setMonitorValueAndKnownSaneValidityFlags (char value, uchar saneFlags) |
Method to set monitor sample value as a char. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (short value, uchar saneFlags) |
Method to set monitor sample value as a short. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (long value, uchar saneFlags) |
Method to set monitor sample value as a long. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (bool value, uchar saneFlags) |
Method to set monitor sample value as a bool. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (float value, uchar saneFlags) |
Method to set monitor sample value as a float. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (double value, uchar saneFlags) |
Method to set monitor sample value as a double. More... | |
void | setMonitorValueAndKnownSaneValidityFlags (const float value[2], uchar saneFlags) |
Method to set monitor sample value as a complex. More... | |
void | setSampleNumber (ushort iSample) |
Method to set sample number associated with this MonitorPointSample. More... | |
void | setTransportValue (MonitorValueType valueType, TransportMonitorValue &value) const |
Sets monitor point sample value to be transported using value from this sample. More... | |
void | setValidityFlags (uchar flags) |
Method to set validity flag value of the monitor sample. More... | |
void | setValueSerialNoAndKnownSaneValidityFlags (long value, uchar saneFlags) |
Method to set monitor sample value as a serial number. More... | |
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. More... | |
~MonitorPointSample () | |
Destructor. More... | |
Protected Member Functions | |
MonitorValue & | getValue () const |
Returns internal union structure containingv the value of the monitor point sample. More... | |
Class representing a data sample for a MonitorPoint.
Manages access to low level storage structures and handles the bookkeeping.
Definition at line 79 of file MonitorPointSample.h.
|
explicit |
Constructor - takes the base level structure, index to the corresponding monitor point's header information and a pointer to the enclosing MonitorPointSet which is non-NULL when in a subsystem.
sample | MonitorSampleValue& reference to MonitorSampleValue structure |
index | int offset of monitor point header that represents the monitor point to which this sample is assigned. |
set | MonitorPointSet* const pointer to MonitorPointSet that contains and manages storage for monitor point and this assigned sample. |
Definition at line 496 of file MonitorPointSample.h.
carma::monitor::MonitorPointSample::~MonitorPointSample | ( | ) |
Destructor.
Definition at line 508 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::allocate | ( | ushort | headerOffset, |
ushort | iSample | ||
) |
Associates this sample with a monitor point represented by a MonitorPointHeader at offset headerOffset within the subsystem frame containing this sample.
A MonitorPointSample is allocated if o dummy != 0 && o MonitorPoint::numSamples() == 1 && iSample != 0
headerOffset | ushort offset of MonitorPointHeader within the subsystem frame that manages the storage for this sample. |
iSample | ushort sample number of the sample asssigned to the monitor point represented by headerOffset. Sample numbers start with 1. |
Definition at line 618 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::clear | ( | bool | deallocate = false | ) |
Clears all flags and (optionally) deallocates the sample so the sample is no longer associated with a monitor point.
which has values assigned from MonitorPointSample rhs.
deallocate | bool true if sample must be de-allocated. |
Definition at line 605 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::clearBlankingFlags | ( | ) |
Method to clear blanking flag value of the monitor sample.
The blanking/flagging value is set to MonitorPoint::UNDETERMINED.
Definition at line 583 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::clearFlags | ( | ) |
Method to clear validity and blanking/flagging flag values of the monitor sample.
The blanking/flagging value is cleared using MonitorPointSample::clearBlankingFlags and the validity is cleared using MonitorPointSample::clearValidityFlags.
Definition at line 597 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::clearValidityFlags | ( | ) |
Method to clear validity flag value of the monitor sample.
The blanking/flagging value is set to MonitorPoint::INVALID_NO_DATA.
Definition at line 590 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::fillInTransportSample | ( | CORBA::ULong | metaIdx, |
MonitorSampleValues & | outSamples, | ||
MonitorValueType | mvt, | ||
tagIDType | tagId, | ||
int | sampleIndex | ||
) | const |
This method and MonitorPointSample:;getTransportedSample are transport related methods.
These are methods provided to make transport of monitor data convenient. Loads monitor point sample data from this sample into a TransportMonitorSample so its ready to be transported out.
outSample | TransportMonitorSample& sample to be transported out |
mvt | MonitorValueType type of the monitor sample |
carma::monitor::uchar carma::monitor::MonitorPointSample::getBlankingFlags | ( | ) | const |
Method to return blanking flag value of the monitor sample.
The value is numerically equal to the value of one of the enum constants of the enum type MonitorPoint::BLANKING_FLAGGING.
Definition at line 541 of file MonitorPointSample.h.
carma::monitor::MonitorValue & carma::monitor::MonitorPointSample::getMonitorValue | ( | ) | const |
Method to get monitor sample value as a union.
Definition at line 527 of file MonitorPointSample.h.
carma::monitor::MonitorSampleValue & carma::monitor::MonitorPointSample::getSample | ( | ) | const |
Returns a reference to the internal MonitorSampleValue structure.
Definition at line 562 of file MonitorPointSample.h.
unsigned short carma::monitor::MonitorPointSample::getSampleNumber | ( | ) | const |
Method to return sample number asscoiated with this MonitorPointSample.
Value is returned as an unsigned short, which restricts the number of samples to a maximum of 65536 per monitor point
Definition at line 548 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::getTransportedSample | ( | CORBA::ULong | metaIdx, |
const MonitorSampleValues & | inValues, | ||
int | headerOffset | ||
) |
This method and MonitorPointSample::fillInTransportSample are transport related methods.
These are methods provided to make transport of monitor data convenient. Retrieves sample data from a TransportMonitorSample structure and loads it into this MonitorPointSample.
valueType | const MonitorValueType type of the monitor sample |
inSample | const TransportMonitorSample& transported sample data to be loaded into this sample. |
headerOffset | const int offset of MonitorPointHeader for the monitor point associated with this sample. Offset is measured as an index within the SubsystemFrame containing this sample. |
iSample | const ushort sample number of transported sample == monitor point sample number. |
carma::monitor::uchar carma::monitor::MonitorPointSample::getValidityFlags | ( | ) | const |
Method to return validity flag value of the monitor sample.
The value is numerically equal to the value of one of the enum constants of the enum type MonitorPoint::VALIDITY.
Definition at line 534 of file MonitorPointSample.h.
|
protected |
Returns internal union structure containingv the value of the monitor point sample.
Discriminating the union requires the monitor points value type, which has to be obtained from the corresponing monitor point header.
Definition at line 569 of file MonitorPointSample.h.
carma::monitor::MonitorPointSample & carma::monitor::MonitorPointSample::operator= | ( | const MonitorPointSample & | rhs | ) |
Assignment operator.
Returns a reference to this MonitorPointSample, which has values assigned from MonitorPointSample rhs.
rhs | MonitorPointSample& reference to MonitorPointSample to assign from. |
Definition at line 514 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::setBlankingFlags | ( | uchar | flags | ) |
Method to set blanking flag value of the monitor sample.
The value should be numerically equal to the value of one of the enum constants of the enum type MonitorPoint::BLANKING_FLAGGING.
flags | uchar blanking/flagging value assigned to monitor point sample. |
Definition at line 576 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | char | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a char.
value | value expressed as a char. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | short | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a short.
value | value expressed as a short. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | long | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a long.
value | value expressed as a long. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | bool | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a bool.
value | value expressed as a bool. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | float | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a float.
value | value expressed as a float. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | double | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a double.
value | value expressed as a double. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setMonitorValueAndKnownSaneValidityFlags | ( | const float | value[2], |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a complex.
value | value expressed as a complex. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setSampleNumber | ( | ushort | iSample | ) |
Method to set sample number associated with this MonitorPointSample.
Value is set as an unsigned short, which restricts the number of samples to a maximum of 65536 per monitor point
iSample | unsigned short representing the monitor point sample number. |
Definition at line 555 of file MonitorPointSample.h.
void carma::monitor::MonitorPointSample::setTransportValue | ( | MonitorValueType | valueType, |
TransportMonitorValue & | value | ||
) | const |
Sets monitor point sample value to be transported using value from this sample.
Convenience method.
valueType | MonitorValueType type of monitor point sample value |
value | TransportMonitorValue& transport structure into which this sample's value will be written. |
void carma::monitor::MonitorPointSample::setValidityFlags | ( | uchar | flags | ) |
Method to set validity flag value of the monitor sample.
The value should be numerically equal to the value of one of the enum constants of the enum type MonitorPoint::VALIDITY. If within a subsystem, then it marks the corresponding monitor point as modified and ready for transport.
flags | uchar validity value assigned to monitor point sample. |
void carma::monitor::MonitorPointSample::setValueSerialNoAndKnownSaneValidityFlags | ( | long | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a serial number.
value | value expressed as a serial number. |
saneFlags | validity flags which are already known to be "sane". |
void carma::monitor::MonitorPointSample::setValueStringChunkAndKnownSaneValidityFlags | ( | const MonitorValueStringChunk & | value, |
uchar | saneFlags | ||
) |
Method to set monitor sample value as a string chunk and already "sane" validity flags at the same.
value | value expressed as a string chunk. |
saneFlags | validity flags which are already known to be "sane". |