![]() |
ChimeraTK-DeviceAccess-DoocsBackend 01.11.02
|
Backend to access DOOCS control system servers. More...
#include <DoocsBackend.h>
Inheritance diagram for ChimeraTK::DoocsBackend:
Collaboration diagram for ChimeraTK::DoocsBackend:Classes | |
| class | BackendRegisterer |
| Class to register the backend type with the factory. More... | |
Public Member Functions | |
| ~DoocsBackend () override | |
| DoocsBackend (const std::string &serverAddress, const std::string &cacheFile, const std::string &updateCache, const std::string &dataConsistencyRealmName) | |
| RegisterCatalogue | getRegisterCatalogue () const override |
| const DoocsBackendRegisterCatalogue & | getBackendRegisterCatalogue () const |
| void | open () override |
| void | close () override |
| std::string | readDeviceInfo () override |
| void | setExceptionImpl () noexcept override |
| template<typename UserType > | |
| boost::shared_ptr< NDRegisterAccessor< UserType > > | getRegisterAccessor_impl (const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags) |
| DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER (DoocsBackend, getRegisterAccessor_impl, 4) | |
| void | informRuntimeError (const std::string &address) |
| Called by accessors to inform about addess causing a runtime_error. | |
| void | activateAsyncRead () noexcept override |
| VersionNumber | getStartVersion () |
Static Public Member Functions | |
| static boost::shared_ptr< DeviceBackend > | createInstance (std::string address, std::map< std::string, std::string > parameters) |
| static bool | checkZmqAvailability (const std::string &fullLocationPath, const std::string &propertyName) |
| Utility function to check if a property is published by ZMQ. | |
| static bool | isCommunicationError (int doocs_error) |
Public Attributes | |
| std::string | _serverAddress |
| DOOCS address component for the server (FACILITY/DEVICE) | |
| std::atomic< bool > | _asyncReadActivated {false} |
Static Public Attributes | |
| static BackendRegisterer | backendRegisterer |
Friends | |
| template<typename UserType > | |
| class | DoocsBackendRegisterAccessor |
Backend to access DOOCS control system servers.
The CDD should look like this:
(doocs:FACILITY/DEVICE)
or:
(doocs:FACILITY/DEVICE/LOCATION)
The given path components are prefixed to the register names, hence if the LOCATION is not specified in the CDD, the register names will be of the form LOCATION/PROPERTY, while otherwise the register names will be just the property names.
If the parameter "cacheFile" in the CDD is specified, e.g.:
(doocs:FACILITY/DEVICE/LOCATION?cacheFile=myDooceDevice.cache)
the register catalogue will be cached in the given file and reused next time. This allows to speed up the filling of the catalogue (which may take a very long time for large number of properties).
Please note that the cache file is only updated when the "updateCache" parameter is set to 1, e.g.:
(doocs:FACILITY/DEVICE/LOCATION?cacheFile=myDooceDevice.cache&updateCache=1)
Otherwise no catalogue updating will be initiated if the cache file is already present.
If AccessMode::wait_for_new_data is specified when obtaining accessors, ZeroMQ is used to subscribe to the variable and blocking read() will wait until new data has arrived via the subscribtion. If the flag is not specified, data will be retrieved through standard RPC calls. Note that in either case a first read transfer is performed upon creation of the accessor to make sure the property exists and the server is reachable, and to obtain the initial value.
Definition at line 57 of file DoocsBackend.h.
|
override |
Definition at line 114 of file DoocsBackend.cc.
| ChimeraTK::DoocsBackend::DoocsBackend | ( | const std::string & | serverAddress, |
| const std::string & | cacheFile, | ||
| const std::string & | updateCache, | ||
| const std::string & | dataConsistencyRealmName | ||
| ) |
Definition at line 83 of file DoocsBackend.cc.
|
overridenoexcept |
Definition at line 253 of file DoocsBackend.cc.
|
static |
Utility function to check if a property is published by ZMQ.
|
override |
Definition at line 224 of file DoocsBackend.cc.
|
static |
Definition at line 144 of file DoocsBackend.cc.
| ChimeraTK::DoocsBackend::DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER | ( | DoocsBackend | , |
| getRegisterAccessor_impl | , | ||
| 4 | |||
| ) |
| const DoocsBackendRegisterCatalogue & ChimeraTK::DoocsBackend::getBackendRegisterCatalogue | ( | ) | const |
Definition at line 215 of file DoocsBackend.cc.
| boost::shared_ptr< NDRegisterAccessor< UserType > > ChimeraTK::DoocsBackend::getRegisterAccessor_impl | ( | const RegisterPath & | registerPathName, |
| size_t | numberOfWords, | ||
| size_t | wordOffsetInRegister, | ||
| AccessModeFlags | flags | ||
| ) |
Definition at line 269 of file DoocsBackend.cc.
|
override |
Definition at line 209 of file DoocsBackend.cc.
|
inline |
Definition at line 108 of file DoocsBackend.h.
| void ChimeraTK::DoocsBackend::informRuntimeError | ( | const std::string & | address | ) |
Called by accessors to inform about addess causing a runtime_error.
Does not switch backend into exception state, this is done separately by calling setException().
Definition at line 237 of file DoocsBackend.cc.
|
static |
Definition at line 423 of file DoocsBackend.cc.
|
override |
Definition at line 177 of file DoocsBackend.cc.
|
inlineoverride |
Definition at line 72 of file DoocsBackend.h.
|
overridenoexcept |
Definition at line 246 of file DoocsBackend.cc.
|
friend |
Definition at line 98 of file DoocsBackend.h.
| std::atomic<bool> ChimeraTK::DoocsBackend::_asyncReadActivated {false} |
Definition at line 106 of file DoocsBackend.h.
| std::string ChimeraTK::DoocsBackend::_serverAddress |
DOOCS address component for the server (FACILITY/DEVICE)
Definition at line 85 of file DoocsBackend.h.
|
static |
Definition at line 92 of file DoocsBackend.h.