fesa-core
7.0.0
|
The framework's abstraction of a multiplexed property's data It provides access to the underlying CMW context. More...
#include <PropertyData.h>
Public Member Functions | |
PropertyData () | |
PropertyData (cmw::data::Data &data) | |
PropertyData (std::auto_ptr< cmw::data::Data > data) | |
PropertyData (const cmw::rda3::common::AcquiredData &acquiredData, RequestType::RequestType requestType=RequestType::GET) | |
const std::string & | getCycleName () const |
Get the name of the cycle. More... | |
void | setCycleName (const std::string &name) |
Set the name of the cycle. More... | |
timestamp_ns | getCycleStamp () const |
Get the stamp of the cycle. More... | |
void | setCycleStamp (timestamp_ns stamp) |
Set the stamp of the cycle. More... | |
timestamp_ns | getAcqStamp () const |
Get the stamp of the acquisition. More... | |
void | setAcqStamp (timestamp_ns stamp) |
Set the stamp of the acquisition. More... | |
timestamp_ns | getSetStamp () const |
Get the set stamp of the setting, or 0 if it is unknown. More... | |
void | setSetStamp (timestamp_ns stamp) |
Set the set stamp of the setting. More... | |
ContextData::ContextType | getContextType () const |
void | setContextType (ContextData::ContextType contextType) |
RequestType::RequestType | getRequestType () const |
void | setRequestType (RequestType::RequestType requestType) |
std::auto_ptr < cmw::rda3::common::AcquiredContext > | getAcquiredContext () const |
UpdateType::UpdateType | getUpdateType () const |
const ContextData & | getContextData () const |
void | setContextData (const ContextData &context) |
Public Member Functions inherited from fesa::ServerData | |
const cmw::data::Data & | getCMWData () const |
Get the underlying CMW data STD: Not sure we can do everything w/o this member function, e.g. set with ProxyInterface. Needed for ServerAction to return it to property and CallbackGetSet. Needed by ProxyInterface to give it to CMW. More... | |
std::auto_ptr< cmw::data::Data > | releaseCMWData () |
void | checkOutgoingDataConsistency () const |
Check consistency of outgoing data. Ensure validity of the value items. More... | |
Protected Member Functions | |
virtual bool | areItemsAvailable () const |
Check that all the input value items are present in the data. The check is necessary when partial setting of a property is not allowed. More... | |
virtual std::string | getUnavailableItemName () const |
virtual void | checkItemsTypes () const |
Check if the types of the items in the data are the expected ones. More... | |
virtual void | checkOnlyValidItemsAvailable () const |
Check if any of the items in the data are not valid items from the design. More... | |
virtual void | checkIncomingItemsValues () const |
Check if the values of the items in the data belong to the allowed sets, e.g. the value is in the range between the minimal and the maximal value, the value of an enumeration type is one of the enumerated values. More... | |
Protected Member Functions inherited from fesa::ServerData | |
ServerData (std::auto_ptr< cmw::data::Data > data) | |
bool | isItemAvailable (const std::string &name) const |
Check if a value item is available in the data. More... | |
void | checkOnlyTheseItemsAvailable (const std::set< std::string > &validNames) const |
template<class T > | |
void | set (const std::string &name, T value) |
Set a scalar value item. More... | |
void | set (const std::string &name, const char *value, std::size_t maxLength) |
Set a string value item. More... | |
void | setArray (const std::string &name, const char *const *value, const StringArraySize &size) |
Set a string array value item. More... | |
void | setArray2D (const std::string &name, const char *const *value, const StringArray2DSize &size) |
Set a string 2D array value item. The array must be allocated contiguously. FESA doesn't support 2D arrays of strings. More... | |
void | setDiscreteFunction (const std::string &name, const ImmutableFunction &value, std::size_t maxSize) |
Set a discrete function value item. More... | |
void | setDiscreteFunctionList (const std::string &name, const ImmutableFunctionList &value, std::size_t maxNFunctions, std::size_t maxNPoints) |
Set a discrete function list value item. More... | |
const char * | getString (const std::string &name, std::size_t maxLength) const |
Get a string value item. More... | |
const char *const * | getStringArray (const std::string &name, StringArraySize &size) const |
Get a string array value item. More... | |
const char *const * | getStringArray2D (const std::string &name, StringArray2DSize &size) const |
Get a string 2D array value item. More... | |
ImmutableFunction | getDiscreteFunction (const std::string &name, ArraySize &size) const |
Get a function value item. More... | |
ImmutableFunctionList | getDiscreteFunctionList (const std::string &name, Array2DSize &size) const |
Get a function-list value item. More... | |
void | checkItemType (const std::string &name, const std::string &expectedType) const |
Check if the type of the item in the data is the expected one. More... | |
template<class T > | |
void | checkItemValue (const std::string &name) const |
Check if the value of the item in the data belong to the allowed set, e.g. the value is in the range between the minimal and the maximal value, the value of an enumeration type is one of the enumerated values. More... | |
template<class T > | |
void | setArray (const std::string &name, const T *value, const ArraySize &size) |
Set an array value item. More... | |
template<class T > | |
void | setArray2D (const std::string &name, const T *value, const Array2DSize &size) |
Set an 2D array value item. The array must be allocated contiguously. More... | |
template<class T > | |
T | get (const std::string &name) const |
Get a scalar value item. More... | |
template<class T > | |
const T * | getArray (const std::string &name, ArraySize &size) const |
Get an array value item. More... | |
template<class T > | |
const T * | getArray2D (const std::string &name, Array2DSize &size) const |
Get a 2D array value item. More... | |
The framework's abstraction of a multiplexed property's data It provides access to the underlying CMW context.
fesa::PropertyData::PropertyData | ( | ) |
Constructor. Allocates a cmw::data::Data object.
|
explicit |
Constructor. Keeps a reference to the Data object, no copy is performed.
data | the Data object to use |
|
explicit |
Constructor that takes ownership of the passed data object.
data | the Data object to use |
FesaException | if data points to NULL |
|
explicit |
This constructor copies the data and the context from acquiredData. Meant to be used with the result of a call to rda3's AccessPoint::get().
acquiredData | object containing the data to copy |
requestType | the request type to set |
|
protectedvirtual |
Check that all the input value items are present in the data. The check is necessary when partial setting of a property is not allowed.
Implements fesa::ServerData.
|
protectedvirtual |
Check if the values of the items in the data belong to the allowed sets, e.g. the value is in the range between the minimal and the maximal value, the value of an enumeration type is one of the enumerated values.
FesaException | if the values of the items in the data are not the allowed ones |
Implements fesa::ServerData.
|
protectedvirtual |
Check if the types of the items in the data are the expected ones.
FesaException | if the types of the items in the data are not the expected ones |
Implements fesa::ServerData.
|
protectedvirtual |
Check if any of the items in the data are not valid items from the design.
FesaException | if the names of the items in the data are unexpected |
Reimplemented from fesa::ServerData.
int64_t fesa::PropertyData::getAcqStamp | ( | ) | const |
Get the stamp of the acquisition.
std::auto_ptr< cmw::rda3::common::AcquiredContext > fesa::PropertyData::getAcquiredContext | ( | ) | const |
Creates and returns a CMW AcquiredContext object from the ContextData.
const ContextData & fesa::PropertyData::getContextData | ( | ) | const |
Returns the ContextData associated to this object.
ContextData::ContextType fesa::PropertyData::getContextType | ( | ) | const |
Returns the Context type associated to this object.
const std::string & fesa::PropertyData::getCycleName | ( | ) | const |
Get the name of the cycle.
maxLength | The maximal length of the cycle name's string |
FesaException | if the length of the string is longer than the maximal one |
int64_t fesa::PropertyData::getCycleStamp | ( | ) | const |
Get the stamp of the cycle.
RequestType::RequestType fesa::PropertyData::getRequestType | ( | ) | const |
Returns the RequestType associated to this object. Only meaningful for Get requests.
timestamp_ns fesa::PropertyData::getSetStamp | ( | ) | const |
Get the set stamp of the setting, or 0 if it is unknown.
|
protectedvirtual |
Returns the name of the first item that is not available for a property.
FesaException | if all items are available |
Implements fesa::ServerData.
UpdateType::UpdateType fesa::PropertyData::getUpdateType | ( | ) | const |
Returns the UpdateType associated to this object. Only meaningful for Get requests.
void fesa::PropertyData::setAcqStamp | ( | timestamp_ns | stamp | ) |
Set the stamp of the acquisition.
stamp | The stamp of the acquisition |
void fesa::PropertyData::setContextData | ( | const ContextData & | context | ) |
Sets the ContextData of this object. Should only be used by the Property or ServerAction objects. The given context is copied.
void fesa::PropertyData::setContextType | ( | ContextData::ContextType | contextType | ) |
Sets the ContextType associated to this object.
void fesa::PropertyData::setCycleName | ( | const std::string & | name | ) |
Set the name of the cycle.
name | The name of the cycle |
FesaException | if the length of the string is longer than the maximal one |
void fesa::PropertyData::setCycleStamp | ( | timestamp_ns | stamp | ) |
Set the stamp of the cycle.
stamp | The stamp of the cycle |
void fesa::PropertyData::setRequestType | ( | RequestType::RequestType | requestType | ) |
Sets the RequestType of this object. Should only be used by the Property or ServerAction objects.
void fesa::PropertyData::setSetStamp | ( | timestamp_ns | stamp | ) |
Set the set stamp of the setting.
stamp | The set stamp of the setting |