ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
ChimeraTK::DeviceManager Class Reference

Implements access to a ChimeraTK::Device. More...

#include <DeviceManager.h>

+ Inheritance diagram for ChimeraTK::DeviceManager:
+ Collaboration diagram for ChimeraTK::DeviceManager:

Classes

struct  RecoveryGroup
 The shared state of a group of DeviceManagers which are recovering together. More...
 

Public Member Functions

 DeviceManager (Application *application, const std::string &deviceAliasOrCDD)
 Create DeviceManager which handles device exceptions and performs the recovery.
 
 DeviceManager (DeviceManager &&other)=delete
 
DeviceManageroperator= (DeviceManager &&other)=delete
 
void reportException (const std::string &errMsg)
 Use this function to report an exception.
 
void prepare () override
 Prepare the execution of the module.
 
void mainLoop () override
 Wrapper around the actual main loop implementation to add unsubscribing from the barrier to allow a clean application termination.
 
void mainLoopImpl ()
 This functions tries to open the device and set the deviceError.
 
DataValidity getDataValidity () const override
 Return the data validity flag.
 
void incrementDataFaultCounter () override
 Set the data validity flag to fault and increment the fault counter.
 
void decrementDataFaultCounter () override
 Decrement the fault counter and set the data validity flag to ok if the counter has reached 0.
 
void addInitialisationHandler (std::function< void(ChimeraTK::Device &)> initialisationHandler)
 Add initialisation handlers to the device.
 
void addRecoveryAccessor (boost::shared_ptr< RecoveryHelper > recoveryAccessor)
 Add a TransferElement to the list DeviceModule::writeRecoveryOpen.
 
uint64_t writeOrder ()
 Each call to this function gives a unique number.
 
boost::shared_lock< boost::shared_mutex > getRecoverySharedLock ()
 Returns a shared lock for the DeviceModule::recoveryMutex.
 
void waitForInitialValues ()
 Wait for initial values coming from the device.
 
std::list< EntityOwner * > getInputModulesRecursively (std::list< EntityOwner * > startList) override
 Use pointer to the module as unique identifier.
 
size_t getCircularNetworkHash () const override
 Get the ID of the circular dependency network (0 if none).
 
const std::string & getDeviceAliasOrURI () const
 Return associated device alias resp.
 
std::vector< VariableNetworkNodegetNodesList () const
 Create and return list of VariableNetworkNodes for all device registers.
 
DevicegetDevice ()
 Return the underlying ChimeraTK::Device object.
 
void terminate () override
 Terminate the module.
 
- Public Member Functions inherited from ChimeraTK::ApplicationModule
 ApplicationModule (ModuleGroup *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})
 Create ApplicationModule and register it with its owner.
 
 ApplicationModule ()=default
 Default constructor: Allows late initialisation of modules (e.g.
 
 ApplicationModule (ApplicationModule &&other) noexcept
 Move operation with the move constructor.
 
ApplicationModuleoperator= (ApplicationModule &&other) noexcept
 Move assignment.
 
 ~ApplicationModule () override
 Destructor.
 
void run () override
 Execute the module.
 
ModuleType getModuleType () const override
 Return the module type of this module, or in case of a VirtualModule the module type this VirtualModule was derived from.
 
VersionNumber getCurrentVersionNumber () const override
 Return the current version number which has been received with the last push-type read operation.
 
size_t getDataFaultCounter () const
 Get the Number of inputs which report DataValidity::faulty.
 
void setCurrentVersionNumber (VersionNumber versionNumber) override
 Set the current version number.
 
void setCircularNetworkHash (size_t circularNetworkHash)
 Set the ID of the circular dependency network.
 
ChimeraTK::Model::ApplicationModuleProxy getModel ()
 Return the application model proxy representing this module.
 
void unregisterModule (Module *module) override
 Unregister another module as a sub-module.
 
Logger::StreamProxy logger (Logger::Severity severity)
 Convenicene function to obtain a logger stream with the given Severity.
 
- Public Member Functions inherited from ChimeraTK::VariableGroup
 VariableGroup (VariableGroup *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})
 Constructor: Create VariableGroup register it with its owner.
 
 VariableGroup ()=default
 Default constructor: Allows late initialisation of VariableGroups (e.g.
 
 VariableGroup (VariableGroup &&other) noexcept
 Move constructor.
 
 VariableGroup (const VariableGroup &other) noexcept=delete
 
VariableGroupoperator= (VariableGroup &&other) noexcept
 Move assignment.
 
VariableGroupoperator= (const VariableGroup &other) noexcept=delete
 
ModuleType getModuleType () const override
 Return the module type of this module, or in case of a VirtualModule the module type this VirtualModule was derived from.
 
ChimeraTK::Model::VariableGroupProxy getModel ()
 Return the application model proxy representing this module.
 
std::string getVirtualQualifiedName () const override
 
void unregisterModule (Module *module) override
 Unregister another module as a sub-module.
 
- Public Member Functions inherited from ChimeraTK::Module
 Module (EntityOwner *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})
 Constructor: Create Module by the given name with the given description and register it with its owner.
 
 Module ()=default
 Default constructor: Allows late initialisation of modules (e.g.
 
 ~Module () override
 Destructor.
 
 Module (Module &&other) noexcept
 Move constructor.
 
Moduleoperator= (Module &&other) noexcept
 Move assignment operator.
 
virtual void postConstruct ()
 Hook function called on all Modules of an Application after the Application constructor is complete but before the PV connections are being finalised.
 
ChimeraTK::ReadAnyGroup readAnyGroup ()
 Create a ChimeraTK::ReadAnyGroup for all readable variables in this Module.
 
void readAll (bool includeReturnChannels=false)
 Read all readable variables in the group.
 
void readAllNonBlocking (bool includeReturnChannels=false)
 Just call readNonBlocking() on all readable variables in the group.
 
void readAllLatest (bool includeReturnChannels=false)
 Just call readLatest() on all readable variables in the group.
 
void writeAll (bool includeReturnChannels=false)
 Just call write() on all writable variables in the group.
 
void writeAllDestructively (bool includeReturnChannels=false)
 Just call writeDestructively() on all writable variables in the group.
 
std::string getQualifiedName () const override
 Get the fully qualified name of the module instance, i.e.
 
std::string getFullDescription () const override
 Obtain the full description including the full description of the owner.
 
void setOwner (EntityOwner *newOwner)
 Set a new owner.
 
EntityOwnergetOwner () const
 
VersionNumber getCurrentVersionNumber () const override
 Return the current version number which has been received with the last push-type read operation.
 
void setCurrentVersionNumber (VersionNumber version) override
 Set the current version number.
 
DataValidity getDataValidity () const override
 Return the data validity flag.
 
void incrementDataFaultCounter () override
 Set the data validity flag to fault and increment the fault counter.
 
void decrementDataFaultCounter () override
 Decrement the fault counter and set the data validity flag to ok if the counter has reached 0.
 
std::list< EntityOwner * > getInputModulesRecursively (std::list< EntityOwner * > startList) override
 Use pointer to the module as unique identifier.
 
size_t getCircularNetworkHash () const override
 Get the ID of the circular dependency network (0 if none).
 
ModulefindApplicationModule ()
 Find ApplicationModule owner.
 
void disable ()
 Disable the module such that it is not part of the Application.
 
- Public Member Functions inherited from ChimeraTK::EntityOwner
 EntityOwner (std::string name, std::string description, std::unordered_set< std::string > tags={})
 Constructor: Create EntityOwner by the given name with the given description.
 
 EntityOwner ()
 Default constructor just for late initialisation.
 
virtual ~EntityOwner ()=default
 Virtual destructor to make the type polymorphic.
 
 EntityOwner (EntityOwner &&other) noexcept
 Move constructor.
 
 EntityOwner (const EntityOwner &other)=delete
 
EntityOwneroperator= (EntityOwner &&other) noexcept
 Move assignment operator.
 
EntityOwneroperator= (const EntityOwner &other)=delete
 
const std::string & getName () const
 Get the name of the module instance.
 
std::string getQualifiedNameWithType () const
 Get the fully qualified name of the module instance, followed by the C++ data type (in pointy brackets)
 
const std::string & getDescription () const
 Get the description of the module instance.
 
std::list< VariableNetworkNodegetAccessorList () const
 Obtain the list of accessors/variables directly associated with this instance.
 
std::list< Module * > getSubmoduleList () const
 Obtain the list of submodules associated with this instance.
 
std::list< VariableNetworkNodegetAccessorListRecursive () const
 Obtain the list of accessors/variables associated with this instance and any submodules.
 
std::list< Module * > getSubmoduleListRecursive () const
 Obtain the list of submodules associated with this instance and any submodules.
 
void registerAccessor (VariableNetworkNode accessor)
 Called inside the constructor of Accessor: adds the accessor to the list.
 
void unregisterAccessor (const VariableNetworkNode &accessor)
 Called inside the destructor of Accessor: removes the accessor from the list.
 
void registerModule (Module *module, bool addTags=true)
 Register another module as a sub-module.
 
void addTag (const std::string &tag)
 Add a tag to all Application-type nodes inside this group.
 
void dump (const std::string &prefix="", std::ostream &stream=std::cout) const
 Print the full hierarchy to given stream.
 
bool hasReachedTestableMode ()
 Check whether this module has declared that it reached the testable mode.
 
template<typename T >
std::string constant (T value)
 Create a variable name which will be automatically connected with a constant value.
 

Public Attributes

VoidOutput deviceBecameFunctional {this, "deviceBecameFunctional", ""}
 A trigger that indicated that the device just became available again an error (in contrast to the error status which is also send when the device goes away).
 

Protected Member Functions

VersionNumber getExceptionVersionNumber ()
 Use this function to read the exception version number.
 
std::string stageToString (RecoveryGroup::RecoveryStage stage)
 Helper function for better error messages.
 
- Protected Member Functions inherited from ChimeraTK::ApplicationModule
void mainLoopWrapper ()
 Wrapper around mainLoop(), to execute additional tasks in the thread before entering the main loop.
 
std::string className ()
 Name of the module class, used for logging and debugging purposes.
 

Protected Attributes

Device _device
 
std::string _deviceAliasOrCDD
 
Application_owner {nullptr}
 
StatusWithMessage _deviceError {this, "status", "Error status of the device"}
 A VariableGroup for exception status and message.
 
cppext::future_queue< std::string > _errorQueue {5}
 Queue used for communication between reportException() and the moduleThread.
 
boost::shared_mutex _errorMutex
 Mutex to protect deviceHasError.
 
VersionNumber _exceptionVersionNumber
 Version number of the last exception.
 
bool _deviceHasError {true}
 The error flag whether the device is functional.
 
std::list< boost::shared_ptr< RecoveryHelper > > _recoveryHelpers
 List of TransferElements to be written after the device has been recovered.
 
std::list< std::function< void(ChimeraTK::Device &)> > _initialisationHandlers
 
boost::shared_mutex _recoveryMutex
 Mutex for writing the DeviceModule::writeRecoveryOpen.
 
bool _isHoldingInitialValueLatch {true}
 Latch to halt accessors until initial values can be received.
 
boost::latch _initialValueLatch {1}
 
std::atomic< int64_t > _synchronousTransferCounter {0}
 
std::atomic< uint64_t > _writeOrderCounter {0}
 
std::list< RegisterPath > _writeRegisterPaths
 
std::list< RegisterPath > _readRegisterPaths
 
std::shared_ptr< RecoveryGroup_recoveryGroup
 
- Protected Attributes inherited from ChimeraTK::ApplicationModule
boost::thread _moduleThread
 The thread executing mainLoop()
 
VersionNumber _currentVersionNumber {nullptr}
 Version number of last push-type read operation - will be passed on to any write operations.
 
std::atomic< size_t > _dataFaultCounter {0}
 Number of inputs which report DataValidity::faulty.
 
size_t _circularNetworkHash {0}
 Unique ID for the circular dependency network.
 
detail::CircularDependencyDetectionRecursionStopper _recursionStopper
 Helper needed to stop the recursion when detecting circular dependency networks.
 
ChimeraTK::Model::ApplicationModuleProxy _model
 
- Protected Attributes inherited from ChimeraTK::VariableGroup
ChimeraTK::Model::VariableGroupProxy _model
 
- Protected Attributes inherited from ChimeraTK::Module
EntityOwner_owner {nullptr}
 Owner of this instance.
 
- Protected Attributes inherited from ChimeraTK::EntityOwner
std::string _name
 The name of this instance.
 
std::string _description
 The description of this instance.
 
std::list< VariableNetworkNode_accessorList
 List of accessors owned by this instance.
 
std::list< Module * > _moduleList
 List of modules owned by this instance.
 
std::unordered_set< std::string > _tags
 List of tags to be added to all accessors and modules inside this module.
 
std::atomic< bool > _testableModeReached {false}
 Flag used by the testable mode to identify whether a thread within the EntityOwner has reached the point where the testable mode lock is acquired.
 

Friends

struct detail::CircularDependencyDetector
 
template<typename UserType >
class ExceptionHandlingDecorator
 

Additional Inherited Members

- Public Types inherited from ChimeraTK::EntityOwner
enum class  ModuleType {
  ApplicationModule , ModuleGroup , VariableGroup , ControlSystem ,
  Device , Invalid
}
 
- Static Public Member Functions inherited from ChimeraTK::Module
static ConfigReaderappConfig ()
 Obtain the ConfigReader instance of the application.
 
- Static Public Attributes inherited from ChimeraTK::EntityOwner
static constexpr std::string_view namePrefixConstant {"/@CONST@"}
 Prefix for constants created by constant().
 

Detailed Description

Implements access to a ChimeraTK::Device.

Definition at line 23 of file DeviceManager.h.

Constructor & Destructor Documentation

◆ DeviceManager() [1/2]

ChimeraTK::DeviceManager::DeviceManager ( Application application,
const std::string &  deviceAliasOrCDD 
)

Create DeviceManager which handles device exceptions and performs the recovery.

Definition at line 21 of file DeviceManager.cc.

◆ DeviceManager() [2/2]

ChimeraTK::DeviceManager::DeviceManager ( DeviceManager &&  other)
delete

Member Function Documentation

◆ addInitialisationHandler()

void ChimeraTK::DeviceManager::addInitialisationHandler ( std::function< void(ChimeraTK::Device &)>  initialisationHandler)

Add initialisation handlers to the device.

Initialisation handlers are called after the device has been opened, or after the device is recovering from an error (i.e. an accessor has thrown an exception and Device::isFunctional() returns true afterwards).

You can add multiple handlers. They are executed in the sequence in which they are registered. If a handler has been registered in the constructor, it is called first.

The handler function is called from the DeviceManager thread (not from the thread with the accessor that threw the exception). It is handed a pointer to the instance of the DeviceManager where the handler was registered. The handler function may throw a ChimeraTK::runtime_error, so you don't have to catch errors thrown when accessing the Device inside the handler. After a handler has thrown an exception, the following handlers are not called. The DeviceModule will wait until the Device reports isFunctional() again and retry. The exception is reported to other modules and the control system.

Notice: Especially in network based devices which do not hold a permanent connection, it is not always possible to predict whether the next read()/write() will succeed. In this case the Device will always report isFunctional() and one just has to retry. In this case the DeviceModule will start the initialisation sequence every 500 ms.

Definition at line 440 of file DeviceManager.cc.

◆ addRecoveryAccessor()

void ChimeraTK::DeviceManager::addRecoveryAccessor ( boost::shared_ptr< RecoveryHelper recoveryAccessor)

Add a TransferElement to the list DeviceModule::writeRecoveryOpen.

This list will be written during a recovery, after the constant accessors DeviceModule::writeAfterOpen are written. This is locked by a unique_lock. You can get a shared_lock with getRecoverySharedLock().

Definition at line 446 of file DeviceManager.cc.

◆ decrementDataFaultCounter()

void ChimeraTK::DeviceManager::decrementDataFaultCounter ( )
overridevirtual

Decrement the fault counter and set the data validity flag to ok if the counter has reached 0.

This function will be called by all input accessors when receiving the an ok update if the previous update was faulty. The caller of this function must ensure that calles to this function are paired to a previous call to incrementDataFaultCounter().

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 497 of file DeviceManager.cc.

◆ getCircularNetworkHash()

size_t ChimeraTK::DeviceManager::getCircularNetworkHash ( ) const
overridevirtual

Get the ID of the circular dependency network (0 if none).

This information is only available after the Application has finalised all connections.

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 484 of file DeviceManager.cc.

◆ getDataValidity()

DataValidity ChimeraTK::DeviceManager::getDataValidity ( ) const
inlineoverridevirtual

Return the data validity flag.

If any This function will be called by all output accessors in their write functions.

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 55 of file DeviceManager.h.

◆ getDevice()

Device & ChimeraTK::DeviceManager::getDevice ( )
inline

Return the underlying ChimeraTK::Device object.

Definition at line 138 of file DeviceManager.h.

◆ getDeviceAliasOrURI()

const std::string & ChimeraTK::DeviceManager::getDeviceAliasOrURI ( ) const
inline

Return associated device alias resp.

URI

Definition at line 128 of file DeviceManager.h.

◆ getExceptionVersionNumber()

VersionNumber ChimeraTK::DeviceManager::getExceptionVersionNumber ( )
protected

Use this function to read the exception version number.

It is locking the variable mutex correctly for you.

Definition at line 149 of file DeviceManager.cc.

◆ getInputModulesRecursively()

std::list< EntityOwner * > ChimeraTK::DeviceManager::getInputModulesRecursively ( std::list< EntityOwner * >  startList)
overridevirtual

Use pointer to the module as unique identifier.

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 470 of file DeviceManager.cc.

◆ getNodesList()

std::vector< VariableNetworkNode > ChimeraTK::DeviceManager::getNodesList ( ) const

Create and return list of VariableNetworkNodes for all device registers.

Definition at line 55 of file DeviceManager.cc.

◆ getRecoverySharedLock()

boost::shared_lock< boost::shared_mutex > ChimeraTK::DeviceManager::getRecoverySharedLock ( )

Returns a shared lock for the DeviceModule::recoveryMutex.

This locks writing the list DeviceModule::writeRecoveryOpen, during a recovery.

Definition at line 458 of file DeviceManager.cc.

◆ incrementDataFaultCounter()

void ChimeraTK::DeviceManager::incrementDataFaultCounter ( )
overridevirtual

Set the data validity flag to fault and increment the fault counter.

This function will be called by all input accessors when receiving the a faulty update if the previous update was ok. The caller of this function must ensure that calls to this function are paired to a subsequent call to decrementDataFaultCounter().

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 490 of file DeviceManager.cc.

◆ mainLoop()

void ChimeraTK::DeviceManager::mainLoop ( )
overridevirtual

Wrapper around the actual main loop implementation to add unsubscribing from the barrier to allow a clean application termination.

Implements ChimeraTK::ApplicationModule.

Definition at line 156 of file DeviceManager.cc.

◆ mainLoopImpl()

void ChimeraTK::DeviceManager::mainLoopImpl ( )

This functions tries to open the device and set the deviceError.

Once done it notifies the waiting thread(s). The function is running an endless loop inside its own thread (moduleThread).

Definition at line 171 of file DeviceManager.cc.

◆ operator=()

DeviceManager & ChimeraTK::DeviceManager::operator= ( DeviceManager &&  other)
delete

◆ prepare()

void ChimeraTK::DeviceManager::prepare ( )
overridevirtual

Prepare the execution of the module.

This function is called before any module is started (including internal modules like FanOuts) and before the initial values of the variables are pushed into the queues. Reading and writing variables at this point may result in undefined behaviour.

Reimplemented from ChimeraTK::Module.

Definition at line 425 of file DeviceManager.cc.

◆ reportException()

void ChimeraTK::DeviceManager::reportException ( const std::string &  errMsg)

Use this function to report an exception.

It should be called whenever a ChimeraTK::runtime_error has been caught when trying to interact with this device. It is primarily used by the ExceptionHandlingDecorator, but also user modules can report exception and trigger the recovery mechanism like this.

Definition at line 105 of file DeviceManager.cc.

◆ stageToString()

std::string ChimeraTK::DeviceManager::stageToString ( RecoveryGroup::RecoveryStage  stage)
protected

Helper function for better error messages.

◆ terminate()

void ChimeraTK::DeviceManager::terminate ( )
overridevirtual

Terminate the module.

Must/will be called before destruction, if run() was called previously.

Reimplemented from ChimeraTK::ApplicationModule.

Definition at line 504 of file DeviceManager.cc.

◆ waitForInitialValues()

void ChimeraTK::DeviceManager::waitForInitialValues ( )

Wait for initial values coming from the device.

This function will block until the device is opened and initialised, and initial values can be read from it.

Definition at line 464 of file DeviceManager.cc.

◆ writeOrder()

uint64_t ChimeraTK::DeviceManager::writeOrder ( )

Each call to this function gives a unique number.

It is atomically increased with each call. The smallest valid write order is 1.

Definition at line 452 of file DeviceManager.cc.

Friends And Related Symbol Documentation

◆ detail::CircularDependencyDetector

friend struct detail::CircularDependencyDetector
friend

Definition at line 205 of file DeviceManager.h.

◆ ExceptionHandlingDecorator

template<typename UserType >
friend class ExceptionHandlingDecorator
friend

Definition at line 208 of file DeviceManager.h.

Member Data Documentation

◆ _device

Device ChimeraTK::DeviceManager::_device
protected

Definition at line 148 of file DeviceManager.h.

◆ _deviceAliasOrCDD

std::string ChimeraTK::DeviceManager::_deviceAliasOrCDD
protected

Definition at line 150 of file DeviceManager.h.

◆ _deviceError

StatusWithMessage ChimeraTK::DeviceManager::_deviceError {this, "status", "Error status of the device"}
protected

A VariableGroup for exception status and message.

It can be protected, as it is automatically connected to the control system in DeviceModule::defineConnections()

Definition at line 158 of file DeviceManager.h.

◆ _deviceHasError

bool ChimeraTK::DeviceManager::_deviceHasError {true}
protected

The error flag whether the device is functional.

protected by the errorMutex.

Definition at line 178 of file DeviceManager.h.

◆ _errorMutex

boost::shared_mutex ChimeraTK::DeviceManager::_errorMutex
protected

Mutex to protect deviceHasError.

Attention: In testable mode this mutex must only be locked when holding the testable mode mutex!

Definition at line 169 of file DeviceManager.h.

◆ _errorQueue

cppext::future_queue<std::string> ChimeraTK::DeviceManager::_errorQueue {5}
protected

Queue used for communication between reportException() and the moduleThread.

Definition at line 163 of file DeviceManager.h.

◆ _exceptionVersionNumber

VersionNumber ChimeraTK::DeviceManager::_exceptionVersionNumber
protected

Version number of the last exception.

Only access under the error mutex. Intentionally not initialised with nullptr. It is propagated as long as the device is not successfully opened.

Definition at line 175 of file DeviceManager.h.

◆ _initialisationHandlers

std::list<std::function<void(ChimeraTK::Device&)> > ChimeraTK::DeviceManager::_initialisationHandlers
protected

Definition at line 187 of file DeviceManager.h.

◆ _initialValueLatch

boost::latch ChimeraTK::DeviceManager::_initialValueLatch {1}
protected

Definition at line 197 of file DeviceManager.h.

◆ _isHoldingInitialValueLatch

bool ChimeraTK::DeviceManager::_isHoldingInitialValueLatch {true}
protected

Latch to halt accessors until initial values can be received.

Must be a latch and not a mutex as it is locked in a different thread than unlocked.

Definition at line 196 of file DeviceManager.h.

◆ _owner

Application* ChimeraTK::DeviceManager::_owner {nullptr}
protected

Definition at line 152 of file DeviceManager.h.

◆ _readRegisterPaths

std::list<RegisterPath> ChimeraTK::DeviceManager::_readRegisterPaths
protected

Definition at line 203 of file DeviceManager.h.

◆ _recoveryGroup

std::shared_ptr<RecoveryGroup> ChimeraTK::DeviceManager::_recoveryGroup
protected

Definition at line 291 of file DeviceManager.h.

◆ _recoveryHelpers

std::list<boost::shared_ptr<RecoveryHelper> > ChimeraTK::DeviceManager::_recoveryHelpers
protected

List of TransferElements to be written after the device has been recovered.

See function addRecoveryAccessor() for details.

Definition at line 184 of file DeviceManager.h.

◆ _recoveryMutex

boost::shared_mutex ChimeraTK::DeviceManager::_recoveryMutex
protected

Mutex for writing the DeviceModule::writeRecoveryOpen.

Definition at line 190 of file DeviceManager.h.

◆ _synchronousTransferCounter

std::atomic<int64_t> ChimeraTK::DeviceManager::_synchronousTransferCounter {0}
protected

Definition at line 199 of file DeviceManager.h.

◆ _writeOrderCounter

std::atomic<uint64_t> ChimeraTK::DeviceManager::_writeOrderCounter {0}
protected

Definition at line 200 of file DeviceManager.h.

◆ _writeRegisterPaths

std::list<RegisterPath> ChimeraTK::DeviceManager::_writeRegisterPaths
protected

Definition at line 202 of file DeviceManager.h.

◆ deviceBecameFunctional

VoidOutput ChimeraTK::DeviceManager::deviceBecameFunctional {this, "deviceBecameFunctional", ""}

A trigger that indicated that the device just became available again an error (in contrast to the error status which is also send when the device goes away).

The output is public so your module can connect to it and trigger re-sending of variables that have to be send to the device again. e.g. after this has re-booted. Attention: It is not send the first time the device is being opened. In this case the normal startup mechanism takes care that the data is send. Like the deviceError, it is automatically published to the control systen to ensure that there is at least one consumer connected.

Definition at line 94 of file DeviceManager.h.


The documentation for this class was generated from the following files: