39 #ifndef ORO_CHANNEL_DATA_ELEMENT_HPP 40 #define ORO_CHANNEL_DATA_ELEMENT_HPP 42 #include "../base/ChannelElement.hpp" 43 #include "../base/DataObjectInterface.hpp" 44 #include "../ConnPolicy.hpp" 62 : data(sample), policy(policy) {}
78 return data->
Get(sample, copy_old_data);
110 return "ChannelDataElement";
virtual WriteStatus write(param_t sample)
Update the data sample stored in this element.
boost::call_traits< T >::param_type param_t
boost::shared_ptr< DataObjectInterface< T > > shared_ptr
Used for shared_ptr management.
virtual void clear()
Clears any data stored by the channel.
virtual WriteStatus data_sample(param_t sample, bool reset=true)
Provides a data sample to initialize this connection.
virtual void clear()
Resets the stored sample.
FlowStatus
Returns the status of a data flow read operation.
virtual FlowStatus Get(reference_t pull, bool copy_old_data=true) const =0
Get a copy of the Data of this data object.
base::ChannelElement< T >::value_t value_t
ChannelDataElement(typename base::DataObjectInterface< T >::shared_ptr sample, const ConnPolicy &policy=ConnPolicy())
A connection policy object describes how a given connection should behave.
virtual bool data_sample(param_t sample, bool reset=true)=0
Provides a data sample to initialize this data object.
virtual bool signal()
Signals that there is new data available on this channel By default, the channel element forwards the...
A typed version of ChannelElementBase.
virtual const ConnPolicy * getConnPolicy() const
Returns a pointer to the ConnPolicy that has been used to construct the underlying data object...
boost::call_traits< T >::reference reference_t
virtual value_t data_sample()
virtual std::string getElementName() const
Returns the class name of this element.
A connection element that stores a single data sample.
virtual FlowStatus read(reference_t sample, bool copy_old_data)
Reads the last sample given to write()
virtual bool Set(param_t push)=0
Set the data to a certain value.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual value_t data_sample()
base::ChannelElement< T >::param_t param_t
WriteStatus
Returns the status of a data flow write operation.
base::ChannelElement< T >::reference_t reference_t
virtual void clear()=0
Clears any data stored by this data object, so that any subsequent Get() without a new Set() will ret...