|
ChimeraTK-DeviceAccess-DoocsBackend
01.09.02
|
Go to the documentation of this file.
12 #include <ChimeraTK/DeviceBackendImpl.h>
13 #include <ChimeraTK/VersionNumber.h>
20 class DoocsBackendRegisterAccessorBase;
61 const std::string& serverAddress,
const std::string& cacheFile = {},
const std::string& updateCache = {});
69 void close()
override;
76 std::
string address, std::map<std::
string, std::
string> parameters);
78 template<typename UserType>
80 const RegisterPath& registerPathName,
size_t numberOfWords,
size_t wordOffsetInRegister, AccessModeFlags flags);
94 static bool checkZmqAvailability(
const std::string& fullLocationPath,
const std::string& propertyName);
96 template<
typename UserType>
108 std::lock_guard<std::mutex> lk(_mxRecovery);
109 return _startVersion;
115 std::string _cacheFile;
116 std::promise<void> _cancelFlag{};
117 mutable std::future<DoocsBackendRegisterCatalogue> _catalogueFuture;
120 bool cacheFileExists();
121 bool isCachingEnabled()
const;
124 mutable std::mutex _mxRecovery;
127 VersionNumber _startVersion{
nullptr};
130 std::string lastFailedAddress;
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_impl(const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
std::atomic< bool > _asyncReadActivated
Class to register the backend type with the factory.
static bool checkZmqAvailability(const std::string &fullLocationPath, const std::string &propertyName)
Utility function to check if a property is published by ZMQ.
void informRuntimeError(const std::string &address)
Called by accessors to inform about addess causing a runtime_error.
static boost::shared_ptr< DeviceBackend > createInstance(std::string address, std::map< std::string, std::string > parameters)
void setExceptionImpl() noexcept override
VersionNumber getStartVersion()
std::string readDeviceInfo() override
void activateAsyncRead() noexcept override
static BackendRegisterer backendRegisterer
std::string _serverAddress
DOOCS address component for the server (FACILITY/DEVICE)
DoocsBackend(const std::string &serverAddress, const std::string &cacheFile={}, const std::string &updateCache={})
DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER(DoocsBackend, getRegisterAccessor_impl, 4)
static bool isCommunicationError(int doocs_error)
const DoocsBackendRegisterCatalogue & getBackendRegisterCatalogue() const
RegisterCatalogue getRegisterCatalogue() const override
Backend to access DOOCS control system servers.