5 #include "../VersionNumber.h"
14 template<
typename BackendDataType>
53 void sendException(
const std::exception_ptr& e) noexcept
override;
55 template<
typename UserDataType>
56 boost::shared_ptr<AsyncNDRegisterAccessor<UserDataType>>
subscribe(
57 RegisterPath name,
size_t numberOfWords,
size_t wordOffsetInRegister, AccessModeFlags flags);
74 template<
typename BackendDataType>
76 std::lock_guard l(_mutex);
84 _notDistributedData = data;
85 _notDistributedVersion = version;
89 if(version < _activationVersion) {
93 auto subDomain = _subDomain.lock();
98 subDomain->distribute(data, version);
104 template<
typename BackendDataType>
106 std::lock_guard l(_mutex);
114 auto subDomain = _subDomain.lock();
119 if(version >= _notDistributedVersion) {
120 subDomain->activate(data, version);
121 _activationVersion = version;
125 subDomain->activate(_notDistributedData, _notDistributedVersion);
126 _activationVersion = _notDistributedVersion;
128 return _activationVersion;
133 template<
typename BackendDataType>
135 std::lock_guard l(_mutex);
142 template<
typename BackendDataType>
144 std::lock_guard l(_mutex);
152 auto subDomain = _subDomain.lock();
157 subDomain->sendException(e);
162 template<
typename BackendDataType>
163 template<
typename UserDataType>
166 std::lock_guard l(_mutex);
168 auto subDomain = _subDomain.lock();
170 subDomain = boost::make_shared<SubDomain<BackendDataType>>(
171 _backend, std::vector<size_t>({_id}),
nullptr, shared_from_this());
172 _subDomain = subDomain;
175 return subDomain->template subscribe<UserDataType>(name, numberOfWords, wordOffsetInRegister, flags);