17#include <ChimeraTK/ControlSystemAdapter/StatusAccessorBase.h>
18#include <ChimeraTK/SystemTags.h>
25 template<
typename ACCESSOR>
29 const std::unordered_set<std::string>& tags = {})
30 : ACCESSOR(owner, name,
"", description, tags) {}
33 using ACCESSOR::ACCESSOR;
38 operator Status&() {
return *
reinterpret_cast<Status*
>(&ACCESSOR::get()->accessData(0, 0)); }
43 operator const Status&()
const {
return *
reinterpret_cast<Status*
>(&ACCESSOR::get()->accessData(0, 0)); }
47 ACCESSOR::get()->accessData(0, 0) =
static_cast<int32_t
>(rightHandSide);
68 const std::unordered_set<std::string>& tags = {})
70 addTag(ChimeraTK::SystemTags::statusOutput);
void addTag(const std::string &tag)
Add a tag.
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
void writeIfDifferent(UserType newValue, VersionNumber versionNumber, DataValidity validity)=delete
InvalidityTracer application module.
constexpr auto explicitDataValidityTag
Special tag to designate that a node should not automatically take over DataValidity of its owning mo...
Convenience class for output scalar accessors (always UpdateMode::push)
Special StatusAccessor - used to avoid code duplication in StatusOutput, StatusPushInput and StatusPo...
void operator++(int)=delete
StatusAccessor & operator=(Status rightHandSide)
Assignment operator, assigns the first element.
void operator--(int)=delete
StatusAccessor(Module *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})
Note: In contrast to normal ScalarInput accessors, this constructor omits the unit argument.
Special ScalarOutput which represents a status which can be aggregated by the StatusAggregator.
StatusOutput(Module *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})
Note: In contrast to normal ScalarOutput accessors, this constructor omits the unit argument.
void writeIfDifferent(Status newValue)