|
Orocos Real-Time Toolkit
2.9.0
|
A class which provides locked/protected access to one typed element of data. More...
#include <rtt/base/DataObjectLocked.hpp>
Public Types | |
| typedef T | DataType |
| The type of the data. More... | |
| typedef boost::shared_ptr< DataObjectInterface< T > > | shared_ptr |
| Used for shared_ptr management. More... | |
Public Member Functions | |
| DataObjectLocked () | |
| Construct an uninitialized DataObjectLocked. More... | |
| DataObjectLocked (param_t initial_value) | |
| Construct a DataObjectLocked with initial value. More... | |
| virtual FlowStatus | Get (reference_t pull, bool copy_old_data=true) const |
| Get a copy of the Data of this data object. More... | |
| virtual value_t | Get () const |
| Get a copy of the data of this data object. More... | |
| virtual bool | Set (param_t push) |
| Set the data to a certain value. More... | |
| virtual bool | data_sample (param_t sample, bool reset) |
| Provides a data sample to initialize this data object. More... | |
| virtual value_t | data_sample () const |
| Reads back a data sample. More... | |
| virtual void | clear () |
| Clears any data stored by this data object, so that any subsequent Get() without a new Set() will return NoData. More... | |
A class which provides locked/protected access to one typed element of data.
It allows multiple read/write requests using a single lock. This is the in any case threadsafe implementation, and can be blocking in situations where you do not want that.
Definition at line 57 of file DataObjectLocked.hpp.
| typedef T RTT::base::DataObjectLocked< T >::DataType |
The type of the data.
Definition at line 90 of file DataObjectLocked.hpp.
|
inherited |
Used for shared_ptr management.
Definition at line 68 of file DataObjectInterface.hpp.
|
inline |
Construct an uninitialized DataObjectLocked.
Definition at line 78 of file DataObjectLocked.hpp.
|
inline |
Construct a DataObjectLocked with initial value.
Definition at line 84 of file DataObjectLocked.hpp.
|
inlinevirtual |
Clears any data stored by this data object, so that any subsequent Get() without a new Set() will return NoData.
Implements RTT::base::DataObjectInterface< T >.
Definition at line 137 of file DataObjectLocked.hpp.
References RTT::NoData.
|
inlinevirtual |
Provides a data sample to initialize this data object.
As such enough storage space can be allocated before the actual writing begins.
| sample | the data sample |
| reset | enforce reinitialization even if this operation clears the stored data. |
Implements RTT::base::DataObjectInterface< T >.
Definition at line 117 of file DataObjectLocked.hpp.
References RTT::NoData.
|
inlinevirtual |
Reads back a data sample.
Implements RTT::base::DataObjectInterface< T >.
Definition at line 132 of file DataObjectLocked.hpp.
|
inlinevirtual |
Get a copy of the Data of this data object.
| pull | A copy of the data. |
| copy_old_data | If true, also copy the data if the data object has not been updated since the last call. |
Implements RTT::base::DataObjectInterface< T >.
Definition at line 92 of file DataObjectLocked.hpp.
References RTT::NewData, and RTT::OldData.
|
inlinevirtual |
Get a copy of the data of this data object.
Implements RTT::base::DataObjectInterface< T >.
Definition at line 104 of file DataObjectLocked.hpp.
|
inlinevirtual |
Set the data to a certain value.
| push | The data which must be set. |
Implements RTT::base::DataObjectInterface< T >.
Definition at line 110 of file DataObjectLocked.hpp.
References RTT::NewData.
1.8.11