22 _hasActiveException =
false;
23 std::lock_guard<std::mutex> lk(_mx_activeExceptionMessage);
24 _activeExceptionMessage =
"(exception cleared)";
31 bool hadExceptionBefore = _hasActiveException.exchange(
true);
34 if(hadExceptionBefore) {
40 std::lock_guard<std::mutex> lk(_mx_activeExceptionMessage);
41 _activeExceptionMessage = message;
48 _asyncDomainsContainer.sendExceptions(message);
54 std::lock_guard<std::mutex> lk(_mx_activeExceptionMessage);
55 return _activeExceptionMessage;
67 return _versionOnOpen;
73 std::lock_guard<std::mutex> lk(_sharedAccessorsMutex);
74 if(!_sharedAccessors) {
75 if(!_sharedAccessors) {
76 _sharedAccessors = boost::make_shared<detail::SharedAccessors>();
79 return _sharedAccessors;
BackendID getBackendID()
Get a unique ID for this backend instance.
async::DomainsContainer _asyncDomainsContainer
Container for async::Domains to support wait_for_new_data.
void setOpenedAndClearException() noexcept
Backends should call this function at the end of a (successful) open() call.
std::string getActiveExceptionMessage() noexcept
ChimeraTK::VersionNumber getVersionOnOpen() const override
Get the version number which was set during the open process.
void setException(const std::string &message) noexcept final
Set the backend into an exception state.
std::set< DeviceBackend::BackendID > getInvolvedBackendIDs() override
Get the backend IDs of all involved backends.
std::atomic< bool > _opened
flag if backend is opened
boost::shared_ptr< detail::SharedAccessors > getSharedAccessors() final
Get the SharedAccessors object of this backend instance.
Class for generating and holding version numbers without exposing a numeric representation.
bool isSendingExceptions()
Check whether an exception distribution is started and not completed yet.
This header collects some conversion routines which should be useful both for ApplicationCore Python ...