|
| OneDRegisterAccessor (boost::shared_ptr< NDRegisterAccessor< UserType >> impl) |
| Create accessor from pointer to implementation. More...
|
|
| OneDRegisterAccessor () |
| Placeholder constructer, to allow late initialisation of the accessor, e.g. More...
|
|
UserType & | operator[] (unsigned int element) |
| Get or set buffer content by [] operator. More...
|
|
unsigned int | getNElements () |
| Return number of elements/samples in the register. More...
|
|
iterator | begin () |
|
const_iterator | begin () const |
|
const_iterator | cbegin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
const_iterator | cend () const |
|
reverse_iterator | rbegin () |
|
const_reverse_iterator | rbegin () const |
|
const_reverse_iterator | crbegin () const |
|
reverse_iterator | rend () |
|
const_reverse_iterator | rend () const |
|
const_reverse_iterator | crend () const |
|
void | swap (std::vector< UserType > &x) noexcept |
| Swap content of (cooked) buffer with std::vector. More...
|
|
OneDRegisterAccessor< UserType > & | operator= (const std::vector< UserType > &x) |
| Copy content of (cooked) buffer from std::vector. More...
|
|
| operator const std::vector< UserType > & () |
| Convert content of (cooked) buffer into std::vector. More...
|
|
UserType * | data () |
| Return a direct pointer to the memory buffer storng the elements. More...
|
|
template<typename COOKED_TYPE > |
COOKED_TYPE | getAsCooked (unsigned int sample) |
| Get the cooked values in case the accessor is a raw accessor (which does not do data conversion). More...
|
|
template<typename COOKED_TYPE > |
void | setAsCooked (unsigned int sample, COOKED_TYPE value) |
| Set the cooked values in case the accessor is a raw accessor (which does not do data conversion). More...
|
|
void | writeIfDifferent (const std::vector< UserType > &newValue, VersionNumber versionNumber=VersionNumber{nullptr}, DataValidity validity=DataValidity::ok) |
| Convenience function to set and write new value if it differes from the current value. More...
|
|
| NDRegisterAccessorAbstractor ()=default |
| Create an uninitialised abstractor - just for late initialisation. More...
|
|
| NDRegisterAccessorAbstractor (const NDRegisterAccessorAbstractor &)=default |
| Declare that we want the default copy constructor although we delete the assigmnent operator. More...
|
|
void | replace (const NDRegisterAccessorAbstractor< UserType > &newAccessor) |
| Assign a new accessor to this NDRegisterAccessorAbstractor. More...
|
|
void | replace (boost::shared_ptr< NDRegisterAccessor< UserType >> newImpl) |
| Alternative signature of replace() with the same functionality, used when a pointer to the implementation has been obtained directly (instead of a NDRegisterAccessorAbstractor). More...
|
|
const NDRegisterAccessorAbstractor & | operator= (const NDRegisterAccessorAbstractor &rightHandSide) const =delete |
| Prevent copying by operator=, since it will be confusing (operator= may also be overloaded to access the content of the buffer!) More...
|
|
boost::shared_ptr< NDRegisterAccessor< UserType > > | getImpl () |
|
| TransferElementAbstractor (boost::shared_ptr< TransferElement > impl) |
| Construct from TransferElement implementation. More...
|
|
| TransferElementAbstractor ()=default |
| Create an uninitialised abstractor - just for late initialisation. More...
|
|
const std::string & | getName () const |
| Returns the name that identifies the process variable. More...
|
|
const std::string & | getUnit () const |
| Returns the engineering unit. More...
|
|
const std::string & | getDescription () const |
| Returns the description of this variable/register. More...
|
|
const std::type_info & | getValueType () const |
| Returns the std::type_info for the value type of this transfer element. More...
|
|
AccessModeFlags | getAccessModeFlags () const |
| Return the AccessModeFlags for this TransferElement. More...
|
|
void | read () |
| Read the data from the device. More...
|
|
bool | readNonBlocking () |
| Read the next value, if available in the input buffer. More...
|
|
bool | readLatest () |
| Read the latest value, discarding any other update since the last read if present. More...
|
|
ChimeraTK::VersionNumber | getVersionNumber () const |
| Returns the version number that is associated with the last transfer (i.e. More...
|
|
bool | write (ChimeraTK::VersionNumber versionNumber={}) |
| Write the data to device. More...
|
|
bool | writeDestructively (ChimeraTK::VersionNumber versionNumber={}) |
| Just like write(), but allows the implementation to destroy the content of the user buffer in the process. More...
|
|
bool | isReadOnly () const |
| Check if transfer element is read only, i.e. More...
|
|
bool | isReadable () const |
| Check if transfer element is readable. More...
|
|
bool | isWriteable () const |
| Check if transfer element is writeable. More...
|
|
std::vector< boost::shared_ptr< TransferElement > > | getHardwareAccessingElements () |
| Obtain the underlying TransferElements with actual hardware access. More...
|
|
std::list< boost::shared_ptr< TransferElement > > | getInternalElements () |
| Obtain the full list of TransferElements internally used by this TransferElement. More...
|
|
const boost::shared_ptr< TransferElement > & | getHighLevelImplElement () |
| Obtain the highest level implementation TransferElement. More...
|
|
bool | isInitialised () const |
| Return if the accessor is properly initialised. More...
|
|
void | replace (const TransferElementAbstractor &newAccessor) |
| Assign a new accessor to this TransferElementAbstractor. More...
|
|
void | replace (boost::shared_ptr< TransferElement > newImpl) |
| Alternative signature of relace() with the same functionality, used when a pointer to the implementation has been obtained directly (instead of a TransferElementAbstractor). More...
|
|
void | replaceTransferElement (const boost::shared_ptr< TransferElement > &newElement) |
| Search for all underlying TransferElements which are considered identical (see mayReplaceOther()) with the given TransferElement. More...
|
|
void | setPersistentDataStorage (boost::shared_ptr< ChimeraTK::PersistentDataStorage > storage) |
| Associate a persistent data storage object to be updated on each write operation of this ProcessArray. More...
|
|
TransferElementID | getId () const |
| Obtain unique ID for the actual implementation of this TransferElement. More...
|
|
void | setDataValidity (DataValidity valid=DataValidity::ok) |
| Set the current DataValidity for this TransferElement. More...
|
|
DataValidity | dataValidity () const |
| Return current validity of the data. More...
|
|
void | interrupt () |
| Return from a blocking read immediately and throw boost::thread_interrupted. More...
|
|
template<typename UserType>
class ChimeraTK::OneDRegisterAccessor< UserType >
Accessor class to read and write registers transparently by using the accessor object like a vector of the type UserType.
Conversion to and from the UserType will be handled by a data converter matching the register description in the map (if applicable). Obtain the accessor using the Device::getBufferingRegisterAccessor() function.
Note: Transfers between the device and the internal buffer need to be triggered using the read() and write() functions before reading from resp. after writing to the buffer using the operators.
- Examples
- accessor1D.cpp.
Definition at line 20 of file OneDRegisterAccessor.h.