LRAUV  revA
ArgDataElement Class Reference

Adds methods to a SimpleDataElement appropriate for a mission script Arg value. More...

#include <ArgDataElement.h>

Inheritance diagram for ArgDataElement:
Collaboration diagram for ArgDataElement:

Public Member Functions

 ArgDataElement (const ElementURI &name, DataValue *initialValue)
 
virtual ~ArgDataElement ()
 
virtual void registerWrite (DataWriter &writer, bool changed)
 
- Public Member Functions inherited from SimpleDataElement
 SimpleDataElement (const ElementURI &name, DataValue *initialValue, float accuracy)
 Constructor for a "Simple" DataElement. More...
 
virtual ~SimpleDataElement ()
 Destructor. More...
 
virtual DataValuegetDataValue (void) const
 Get the DataValue for this DataElement. More...
 
virtual float getAccuracy (const Unit &unit) const throw ( UninitializedException )
 Get the current DataElement accuracy. More...
 
virtual float setAccuracy (const Unit &unit, float accuracy)
 Set the current DataElement accuracy Implements the pure virtual from DataElement. More...
 
- Public Member Functions inherited from DataElement
virtual ~DataElement ()
 Destructor. More...
 
DataReaderfindReader (const ElementURI &uri)
 Returns the DataReader associated with this DataElement and the specified ElementURI. More...
 
DataWriterfindWriter (const ElementURI &uri)
 Returns the DataWriter associated with this DataElement and the specified ElementURI. More...
 
const ElementURIgetUri (void) const
 Get the full ElementURI for the DataElement. More...
 
virtual const TimestampgetTimestamp () const
 Returns the timestamp of last write. More...
 
virtual bool isUnavailable (void) const
 Is the element "unavailable". More...
 
virtual bool isInvalid (void) const
 Is the element "invalid". More...
 
virtual bool isOwnersFailed (void) const
 
bool setUnavailable (bool unavailable, DataWriter *notifier)
 Set the element's unavailable flag. More...
 
bool setUnavailable (bool unavailable, Component *notifier)
 
bool setInvalid (bool invalid, DataWriter *notifier)
 Set the element's invalid flag. More...
 
bool setInvalid (bool invalid, Component *notifier)
 
virtual void setTimestamp (const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Sets the timestamp of last write Used if a more acurate timestamp is available. More...
 
virtual bool isOrphaned (void) const
 Returns the value of the element's "orphand" flag. More...
 
virtual bool isOwnersActive (void) const
 
virtual bool isActivatable (void) const
 Indicates if the element is capable of being "active". More...
 
virtual bool isActive (void) const
 Indicates if the element is "active". More...
 
bool isBest (DataAccessor::RequestStrategy strategy=DataAccessor::MIN_ERROR) const
 Indicates if the element is the "best" of a set of measurements that feed into a universal. More...
 
const UnitgetUnit (void) const
 Returns the Unit associated with this data element or NULL if no Unit is associated. More...
 
virtual bool isUniversal () const
 
void registerUniversal (UniversalDataElement *abstract)
 Indicates this DataElement should participate in the selection process for the given Universal. More...
 
UniversalDataElementgetUniversal (void) const
 Returns the universal data element registered to this data element. More...
 
void registerReader (DataReader *reader)
 Add the given DataReader to the list of readers for this DataElement. More...
 
void unregisterReader (DataReader *reader)
 Remove the given DataReader from the list of reader for this DataElement. More...
 
unsigned int readerCount () const
 The number of readers currently registered to this DataElement. More...
 
bool hasReaders (void) const
 Does this DataElement have any readers? More...
 
bool isDataRequested ()
 Returns true if one of the registered readers is requesting data. More...
 
bool isImplemented ()
 Returns true if there is a non-failed "implementor" reader of this element. More...
 
void registerWriter (DataWriter *writer)
 Add the given writer to the list of registered writers for this DataElement. More...
 
void unregisterWriter (DataWriter *writer)
 Remove the given writer from the list of registered writers for this DataElement. More...
 
unsigned int writerCount () const
 Number of writers registered to this DataElement. More...
 
bool hasWriters (void) const
 Does this DataElement have any writers? More...
 
virtual void registerRead (DataReader &reader)
 
void registerChangePending (DataWriter *writer)
 
void registerChangeDone (Component *notifier)
 
void registerChangeDone (void)
 
virtual float getWrittenAccuracy (const Unit &unit) const
 Returns the accuracy at the time of the last write;. More...
 
virtual bool setAccuracy (DataWriter &writer, const Unit &unit, const float accuracy)
 Set just the accuracy. More...
 
virtual const UnitgetBaseUnit ()
 The base unit that all writers and readers must use when accessing this value. More...
 
virtual size_t getTypeSize ()
 The base size that all writers must specify. More...
 
virtual bool wasTouchedSinceLastRun (const Component *component)
 Returns true if the value was touched since the last run of the indicated component. More...
 
float getPower ()
 Power used by the component that owns this element. More...
 
float getError ()
 Error in measurements. More...
 
float getLatency ()
 Latency involved in requesting a measurement. More...
 
float getFrequency ()
 Frequency of measurements possible. More...
 
void setPower (float power)
 Power used by the component that owns this element. More...
 
void setLatency (float latency)
 Latency involved in requesting a measurement. More...
 
void setFrequency (float frequency)
 Frequency of measurements possible. More...
 
virtual bool get (DataReader &reader, const Unit &unit, bool &readTo) throw ( UninitializedException )
 
virtual bool get (DataReader &reader, const Unit &unit, unsigned char &readTo) throw ( UninitializedException )
 
virtual bool get (DataReader &reader, const Unit &unit, double &readTo) throw ( UninitializedException )
 
virtual bool get (DataReader &reader, const Unit &unit, float &readTo) throw ( UninitializedException )
 
virtual bool get (DataReader &reader, const Unit &unit, int &readTo) throw ( UninitializedException )
 
virtual bool get (DataReader &reader, DataValue &readTo) throw ( UninitializedException )
 
virtual const double asDouble (DataReader &reader, const Unit &unit) throw ( UninitializedException )
 
virtual const int asInt (DataReader &reader, const Unit &unit) throw ( UninitializedException )
 
virtual const Str asString (DataReader &reader, const Unit &unit) throw ( UninitializedException )
 
virtual bool set (DataWriter &writer, const Unit &unit, const bool value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool set (DataWriter &writer, const Unit &unit, const unsigned char value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool set (DataWriter &writer, const Unit &unit, const double value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool set (DataWriter &writer, const Unit &unit, const float value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool set (DataWriter &writer, const Unit &unit, const int value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool set (DataWriter &writer, const DataValue &value, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set functions set int value. More...
 
virtual bool setWithAccuracy (DataWriter &writer, const Unit &unit, const bool value, const float accuracy, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set w/ Accuracy functions. More...
 
virtual bool setWithAccuracy (DataWriter &writer, const Unit &unit, const unsigned char value, const float accuracy, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set w/ Accuracy functions. More...
 
virtual bool setWithAccuracy (DataWriter &writer, const Unit &unit, const double value, const float accuracy, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set w/ Accuracy functions. More...
 
virtual bool setWithAccuracy (DataWriter &writer, const Unit &unit, const int value, const float accuracy, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set w/ Accuracy functions. More...
 
virtual bool setWithAccuracy (DataWriter &writer, const DataValue &value, const float accuracy, const Timestamp &timestamp=Timestamp::NOT_SET_TIME)
 Set w/ Accuracy functions. More...
 

Private Types

typedef SimpleDataElement super
 

Additional Inherited Members

- Static Public Attributes inherited from DataElement
static const float NO_ACCURACY = 3.25e30
 Defines an accuracy quantity which means "no accuracy specified" typically means "don't use" i.e. More...
 
- Protected Member Functions inherited from SimpleDataElement
virtual float getBaseAccuracy () const
 Returns the accuracy in base, unscaled SI units. More...
 
virtual void setDataValue (DataValue *dataValue)
 
- Protected Member Functions inherited from DataElement
 DataElement (const ElementURI &name, const Unit *baseUnit, size_t typeSize)
 Protected constructor for base class. More...
 
bool setWrittenAccuracy ()
 Called before set commands to update the written accuracy Returns true if the written accuracy has changed. More...
 
virtual void setBaseUnit (const Unit *baseUnit)
 
virtual void setTypeSize (const size_t typeSize)
 
- Protected Attributes inherited from SimpleDataElement
DataValuevalue_
 The DataValue for this DataElement. More...
 
float accuracy_
 The accuracy for this DataElement. More...
 
- Protected Attributes inherited from DataElement
ElementURI name_
 The DataElement ElementURI. More...
 
UniversalDataElementuniversal_
 Queue of UniversalElements which this DataElement "participates in". More...
 
DataWriternotifier_
 The data writer responsable for notifying this element's Universal data element that a change is pending. More...
 
FlexArray< DataWriter * > writers_
 List of all registered DataWriters. More...
 
FlexArray< DataReader * > readers_
 List of all registered DataReaders. More...
 
bool unavailable_
 The "unavailable" flag is actually a simple boolean which is set by the user or by the DataElement itself. More...
 
bool invalid_
 The "invalid" flag is actually a simple boolean which is set by the user or by the DataElement itself. More...
 
bool wasOrphaned_
 Indicates that the element was previously orphaned. More...
 
Mutex mutex_
 Mutex for thread-safing an instance of DataElement. More...
 
float writtenAccuracy_
 Accuracy of last written value. More...
 
Timestamp timestamp_
 Timestamp of last write. More...
 
bool hasBeenSet_
 Flag – false until the first call to set done. More...
 
const UnitbaseUnit_
 The base unit that all writers and readers must use when accessing this value. More...
 
size_t typeSize_
 The base size that all writers must specify. More...
 
float power_
 Power used by the component that owns this element. More...
 
float latency_
 Latency involved in requesting a measurement. More...
 
float frequency_
 Frequency of measurements possible. More...
 

Detailed Description

Adds methods to a SimpleDataElement appropriate for a mission script Arg value.

Member Typedef Documentation

Constructor & Destructor Documentation

ArgDataElement::ArgDataElement ( const ElementURI name,
DataValue initialValue 
)
ArgDataElement::~ArgDataElement ( )
virtual

Member Function Documentation

void ArgDataElement::registerWrite ( DataWriter writer,
bool  changed 
)
virtual

The documentation for this class was generated from the following files: