![]() |
ChimeraTK-DeviceAccess 03.25.00
|
#include <VariableDistributor.h>
Inheritance diagram for ChimeraTK::async::VariableDistributor< SourceType >:
Collaboration diagram for ChimeraTK::async::VariableDistributor< SourceType >:Public Member Functions | |
| VariableDistributor (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< SubDomain< SourceType > > parent, boost::shared_ptr< Domain > asyncDomain) | |
| template<typename UserType > | |
| std::unique_ptr< AsyncVariable > | createAsyncVariable (AccessorInstanceDescriptor const &descriptor) |
| std::unique_ptr< AsyncVariable > | createAsyncVariable (AccessorInstanceDescriptor const &) |
Public Member Functions inherited from ChimeraTK::async::SourceTypedAsyncAccessorManager< SourceType > | |
| VersionNumber | distribute (SourceType, VersionNumber version) |
| Distribute the given data to the subsribers. | |
| virtual bool | prepareIntermediateBuffers () |
| Implement this function in case there is a step between setting the source buffer and filling the user buffers. | |
| AsyncAccessorManager (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< Domain > asyncDomain) | |
Public Member Functions inherited from ChimeraTK::async::AsyncAccessorManager | |
| AsyncAccessorManager (boost::shared_ptr< DeviceBackend > backend, boost::shared_ptr< Domain > asyncDomain) | |
| virtual | ~AsyncAccessorManager ()=default |
| template<typename UserType > | |
| boost::shared_ptr< AsyncNDRegisterAccessor< UserType > > | subscribe (RegisterPath name, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags) |
| Request a new subscription. | |
| void | unsubscribe (TransferElementID id) |
| This function must only be called from the destructor of the AsyncNDRegisterAccessor which is created in the subscribe function! | |
| void | sendException (const std::exception_ptr &e) |
| Send an exception to all accessors. | |
Public Attributes | |
| boost::shared_ptr< SubDomain< SourceType > > | _parent |
Additional Inherited Members | |
Protected Member Functions inherited from ChimeraTK::async::AsyncAccessorManager | |
| DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (createAsyncVariable, std::unique_ptr< AsyncVariable >(AccessorInstanceDescriptor const &)) | |
| virtual void | asyncVariableMapChanged (TransferElementID) |
| This virtual function lets derived classes react on subscribe / unsubscribe. | |
| void | unsubscribeImpl (TransferElementID id) |
| Internal helper function to avoid code duplication. | |
Protected Attributes inherited from ChimeraTK::async::SourceTypedAsyncAccessorManager< SourceType > | |
| SourceType | _sourceBuffer |
| VersionNumber | _version {nullptr} |
Protected Attributes inherited from ChimeraTK::async::AsyncAccessorManager | |
| std::map< TransferElementID, std::unique_ptr< AsyncVariable > > | _asyncVariables |
| boost::shared_ptr< DeviceBackend > | _backend |
| boost::shared_ptr< Domain > | _asyncDomain |
| std::list< TransferElementID > | _delayedUnsubscriptions |
| If an unsubscription request is coming in while iterating the _asyncVariables container, we have to remember it and do it afterwards. | |
Static Protected Attributes inherited from ChimeraTK::async::AsyncAccessorManager | |
| static thread_local AsyncAccessorManager * | _isHoldingDomainLock {nullptr} |
| We have to remember that we are holding the domain lock before we lock a weak pointer to an AsyncNDRegisterAccessor inside the AsyncVariable to resolve a race conditon: If all other owners go out of scope while we are distributing data or exceptions, releasing the weak pointer will call unsubscribe(). | |
Definition at line 13 of file VariableDistributor.h.
| ChimeraTK::async::VariableDistributor< SourceType >::VariableDistributor | ( | boost::shared_ptr< DeviceBackend > | backend, |
| boost::shared_ptr< SubDomain< SourceType > > | parent, | ||
| boost::shared_ptr< Domain > | asyncDomain | ||
| ) |
Definition at line 61 of file VariableDistributor.h.
| std::unique_ptr< AsyncVariable > ChimeraTK::async::VariableDistributor< std::nullptr_t >::createAsyncVariable | ( | AccessorInstanceDescriptor const & | ) |
Definition at line 72 of file VariableDistributor.h.
| std::unique_ptr< AsyncVariable > ChimeraTK::async::VariableDistributor< SourceType >::createAsyncVariable | ( | AccessorInstanceDescriptor const & | descriptor | ) |
| boost::shared_ptr<SubDomain<SourceType> > ChimeraTK::async::VariableDistributor< SourceType >::_parent |
Definition at line 21 of file VariableDistributor.h.