Skip to content
Snippets Groups Projects
Commit 9876a8b5 authored by Jan H. K. Timm's avatar Jan H. K. Timm
Browse files

DeviceModul

	Ticket #79
	- documentation for addRecoveryAccessor() and getRecoverySharedMutex()
parent bf8c384b
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,13 @@ namespace ChimeraTK {
ScalarOutput<int> deviceBecameFunctional{
this, "deviceBecameFunctional", "", ""}; // should be changed to data type void
/** 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(). */
void addRecoveryAccessor(boost::shared_ptr<TransferElement> recoveryAccessor);
/** Returns a shared lock for the DeviceModule::recoverySharedMutex. This locks writing
* the list DeviceModule::writeRecoveryOpen, during a recovery.*/
boost::shared_lock<boost::shared_mutex> getRecoverySharedLock();
protected:
......@@ -245,6 +251,8 @@ namespace ChimeraTK {
* to the device. */
std::list<boost::shared_ptr<TransferElement>> writeAfterOpen;
/** List of TransferElements to be written after the device has been recovered.
* See function addRecoveryAccessor() for details.*/
std::list<boost::shared_ptr<TransferElement>> writeRecoveryOpen;
Application* owner{nullptr};
......@@ -254,6 +262,7 @@ namespace ChimeraTK {
/* The list of initialisation handler callback functions */
std::list<std::function<void(DeviceModule*)>> initialisationHandlers;
/** Mutex for writing the DeviceModule::writeRecoveryOpen.*/
boost::shared_mutex recoverySharedMutex;
friend class Application;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment