![]() |
ChimeraTK-DeviceAccess 03.25.00
|
Inheritance diagram for CountingDecorator< T >:
Collaboration diagram for CountingDecorator< T >:Public Member Functions | |
| CountingDecorator (const boost::shared_ptr< ChimeraTK::TransferElement > &target, bool _fakeLowLevel=false) | |
| void | doPreRead (TransferType type) override |
| Backend specific implementation of preRead(). | |
| void | doPostRead (TransferType type, bool hasNewData) override |
| Backend specific implementation of postRead(). | |
| void | doPreWrite (TransferType type, VersionNumber versionNumber) override |
| Backend specific implementation of preWrite(). | |
| void | doPostWrite (TransferType type, VersionNumber versionNumber) override |
| Backend specific implementation of postWrite(). | |
| void | doReadTransferSynchronously () override |
| Implementation version of readTransfer() for synchronous reads. | |
| bool | doWriteTransfer (ChimeraTK::VersionNumber versionNumber) override |
| Implementation version of writeTransfer(). | |
| std::vector< boost::shared_ptr< ChimeraTK::TransferElement > > | getHardwareAccessingElements () override |
| Obtain the underlying TransferElements with actual hardware access. | |
| void | replaceTransferElement (boost::shared_ptr< TransferElement > newElement) override |
| Search for all underlying TransferElements which are considered identical (see sameRegister()) with the given TransferElement. | |
| std::list< boost::shared_ptr< TransferElement > > | getInternalElements () override |
| Obtain the full list of TransferElements internally used by this TransferElement. | |
| bool | mayReplaceOther (const boost::shared_ptr< TransferElement const > &other) const override |
| Check whether the TransferElement can be used in places where the TransferElement "other" is currently used, e.g. | |
| void | resetCounters () |
Public Member Functions inherited from ChimeraTK::NDRegisterAccessorDecorator< T > | |
| NDRegisterAccessorDecorator (const boost::shared_ptr< ChimeraTK::NDRegisterAccessor< T > > &target) | |
| bool | doWriteTransfer (ChimeraTK::VersionNumber versionNumber) override |
| Implementation version of writeTransfer(). | |
| bool | doWriteTransferDestructively (ChimeraTK::VersionNumber versionNumber) override |
| Implementation version of writeTransferDestructively(). | |
| void | doReadTransferSynchronously () override |
| Implementation version of readTransfer() for synchronous reads. | |
| void | doPreRead (TransferType type) override |
| Backend specific implementation of preRead(). | |
| bool | isReadOnly () const override |
| Check if transfer element is read only, i.e. | |
| bool | isReadable () const override |
| Check if transfer element is readable. | |
| bool | isWriteable () const override |
| Check if transfer element is writeable. | |
| std::vector< boost::shared_ptr< ChimeraTK::TransferElement > > | getHardwareAccessingElements () override |
| Obtain the underlying TransferElements with actual hardware access. | |
| std::list< boost::shared_ptr< TransferElement > > | getInternalElements () override |
| Obtain the full list of TransferElements internally used by this TransferElement. | |
| void | setPersistentDataStorage (boost::shared_ptr< ChimeraTK::PersistentDataStorage > storage) override |
| Associate a persistent data storage object to be updated on each write operation of this ProcessArray. | |
| void | setInReadAnyGroup (ReadAnyGroup *rag) override |
| Set the ReadAnyGroup of which this TransferElement is part of. | |
| void | replaceTransferElement (boost::shared_ptr< ChimeraTK::TransferElement > newElement) override |
| boost::shared_ptr< NDRegisterAccessor< T > > | decorateDeepInside (std::function< boost::shared_ptr< NDRegisterAccessor< T > >(const boost::shared_ptr< NDRegisterAccessor< T > > &)> factory) override |
| Decorate the innermost TransferElement of the stack of decorators or decorator-like accessors. | |
| void | setExceptionBackend (boost::shared_ptr< DeviceBackend > exceptionBackend) override |
| Set the backend to which the exception has to be reported. | |
| void | interrupt () override |
| Return from a blocking read immediately and throw boost::thread_interrupted. | |
Public Attributes | |
| bool | fakeLowLevel |
| size_t | nPreRead {0} |
| size_t | nPostRead {0} |
| size_t | nPreWrite {0} |
| size_t | nPostWrite {0} |
| size_t | nRead {0} |
| size_t | nReadNonBlocking {0} |
| size_t | nReadLatest {0} |
| size_t | nWrite {0} |
Additional Inherited Members | |
Protected Member Functions inherited from ChimeraTK::NDRegisterAccessorDecorator< T > | |
| void | initFromTarget (const boost::shared_ptr< ChimeraTK::NDRegisterAccessor< T > > &target) |
Definition at line 666 of file testTransferGroup.cpp.
|
inline |
Definition at line 669 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Backend specific implementation of postRead().
postRead() will call this function, but it will make sure that it gets called only once per transfer.
No actual communication may be done. Hence, no runtime_error exception may be thrown by this function. Also it must be acceptable to call this function while the device is closed or not functional (see isFunctional()) and no exception is thrown.
Notes for backend implementations:
Reimplemented from ChimeraTK::TransferElement.
Definition at line 682 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Backend specific implementation of postWrite().
postWrite() will call this function, but it will make sure that it gets called only once per transfer.
No actual communication may be done. Hence, no runtime_error exception may be thrown by this function. Also it must be acceptable to call this function while the device is closed or not functional (see isFunctional()) and no exception is thrown.
Reimplemented from ChimeraTK::TransferElement.
Definition at line 692 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Backend specific implementation of preRead().
preRead() will call this function, but it will make sure that it gets called only once per transfer.
No actual communication may be done. Hence, no runtime_error exception may be thrown by this function. Also it must be acceptable to call this function while the device is closed or not functional (see isFunctional()) and no exception is thrown.
Reimplemented from ChimeraTK::TransferElement.
Definition at line 677 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Backend specific implementation of preWrite().
preWrite() will call this function, but it will make sure that it gets called only once per transfer.
No actual communication may be done. Hence, no runtime_error exception may be thrown by this function. Also it must be acceptable to call this function while the device is closed or not functional (see isFunctional()) and no exception is thrown.
Reimplemented from ChimeraTK::TransferElement.
Definition at line 687 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Implementation version of readTransfer() for synchronous reads.
This function must be implemented by the backend. For the functional description read the documentation of readTransfer().
Implementation notes:
Implements ChimeraTK::TransferElement.
Definition at line 697 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Implementation version of writeTransfer().
This function must be implemented by the backend. For the functional description read the documentation of writeTransfer().
Implementation notes:
Implements ChimeraTK::TransferElement.
Definition at line 702 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Obtain the underlying TransferElements with actual hardware access.
If this transfer element is directly reading from / writing to the hardware, it will return a list just containing a shared pointer of itself.
Note: Avoid using this in application code, since it will break the abstraction!
Implements ChimeraTK::TransferElement.
Definition at line 707 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Obtain the full list of TransferElements internally used by this TransferElement.
The function is recursive, i.e. elements used by the elements returned by this function are also added to the list. It is guaranteed that the directly used elements are first in the list and the result from recursion is appended to the list.
Example: A decorator would return a list with its target TransferElement followed by the result of getInternalElements() called on its target TransferElement.
If this TransferElement is not using any other element, it should return an empty vector. Thus those elements which return a list just containing themselves in getHardwareAccessingElements() will return an empty list here in getInternalElements().
Note: Avoid using this in application code, since it will break the abstraction!
Implements ChimeraTK::TransferElement.
Definition at line 726 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Check whether the TransferElement can be used in places where the TransferElement "other" is currently used, e.g.
to merge the two transfers. This function must be used in replaceTransferElement() by implementations which use other TransferElements, to determine if a used TransferElement shall be replaced with the TransferElement "other".
The purpose of this function is not to determine if at any point in the hierarchy an replacement could be done. This function only works on a single level. It is not used by the TransferGroup to determine replaceTransferElement() whether shall be used (it is always called). Instead this function can be used by decorators etc. inside their implementation of replaceTransferElement() to determine if they might swap their implementation(s).
Note for decorators and similar implementations: This function must not be decorated. It should only return true if this should actually be replaced with other in the call to replaceTransferElement() one level up in the hierarchy. If the replacement should be done further down in the hierarchy, simply return false. It should only return if other is fully identical to this (i.e. behaves identical in all situations but might be another instance).
If "other" is identical to the object where mayReplaceOther() is called, mayReplaceOther returns 'false', as the object may not be replaced with a copy-decorated version of itself (see TransferElement Spec. B12.1.5.1).
Reimplemented from ChimeraTK::TransferElement.
Definition at line 735 of file testTransferGroup.cpp.
|
inlineoverridevirtual |
Search for all underlying TransferElements which are considered identical (see sameRegister()) with the given TransferElement.
These TransferElements are then replaced with the new element. If no underlying element matches the new element, this function has no effect.
Reimplemented from ChimeraTK::TransferElement.
Definition at line 716 of file testTransferGroup.cpp.
|
inline |
Definition at line 746 of file testTransferGroup.cpp.
| bool CountingDecorator< T >::fakeLowLevel |
Definition at line 757 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nPostRead {0} |
Definition at line 759 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nPostWrite {0} |
Definition at line 761 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nPreRead {0} |
Definition at line 758 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nPreWrite {0} |
Definition at line 760 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nRead {0} |
Definition at line 762 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nReadLatest {0} |
Definition at line 764 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nReadNonBlocking {0} |
Definition at line 763 of file testTransferGroup.cpp.
| size_t CountingDecorator< T >::nWrite {0} |
Definition at line 765 of file testTransferGroup.cpp.