ChimeraTK-ApplicationCore  04.01.00
ChimeraTK::StatusOutput Struct Reference

Special ScalarOutput which represents a status which can be aggregated by the StatusAggregator. More...

#include <StatusAccessor.h>

+ Inheritance diagram for ChimeraTK::StatusOutput:
+ Collaboration diagram for ChimeraTK::StatusOutput:

Public Member Functions

 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. More...
 
 StatusOutput ()=default
 
void writeIfDifferent (Status newValue)
 
- Public Member Functions inherited from ChimeraTK::StatusAccessor< ScalarOutput< int32_t > >
 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. More...
 
 StatusAccessor ()=default
 
 operator Status & ()
 Implicit type conversion to user type T to access the value. More...
 
 operator const Status & () const
 Implicit type conversion to user type T to access the const value. More...
 
StatusAccessoroperator= (Status rightHandSide)
 Assignment operator, assigns the first element. More...
 
void operator++ ()=delete
 
void operator++ (int)=delete
 
void operator-- ()=delete
 
void operator-- (int)=delete
 
- Public Member Functions inherited from ChimeraTK::ScalarOutput< int32_t >
 ScalarOutput (Module *owner, const std::string &name, std::string unit, const std::string &description, const std::unordered_set< std::string > &tags={})
 
 ScalarOutput ()
 
- Public Member Functions inherited from ChimeraTK::ScalarAccessor< int32_t >
void replace (const ChimeraTK::NDRegisterAccessorAbstractor< int32_t > &newAccessor)=delete
 
ScalarAccessor< int32_t > & operator= (ScalarAccessor< int32_t > &other)=delete
 
ScalarAccessor< int32_t > & operator= (ScalarAccessor< int32_t > &&other) noexcept
 Move assignment. More...
 
 ScalarAccessor (ScalarAccessor< int32_t > &&other) noexcept
 Move constructor. More...
 
bool write (ChimeraTK::VersionNumber versionNumber)=delete
 
bool write ()
 
bool writeDestructively (ChimeraTK::VersionNumber versionNumber)=delete
 
bool writeDestructively ()
 
void writeIfDifferent (int32_t newValue, VersionNumber versionNumber, DataValidity validity)=delete
 
void writeIfDifferent (int32_t newValue)
 
void setAndWrite (int32_t newValue, VersionNumber versionNumber)=delete
 
void setAndWrite (int32_t newValue)
 
- Public Member Functions inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< int32_t > >
 ~InversionOfControlAccessor ()
 Unregister at its owner when deleting. More...
 
void setMetaData (const std::string &name, const std::string &unit, const std::string &description)
 Change meta data (name, unit, description and optionally tags). More...
 
void setMetaData (const std::string &name, const std::string &unit, const std::string &description, const std::unordered_set< std::string > &tags)
 
void addTag (const std::string &tag)
 Add a tag. More...
 
void addTags (const std::unordered_set< std::string > &tags)
 Add multiple tags. More...
 
const std::unordered_set< std::string > & getTags ()
 Return set of tags. More...
 
 operator VariableNetworkNode ()
 Convert into VariableNetworkNode. More...
 
 operator VariableNetworkNode () const
 
void replace (ScalarAccessor< int32_t > &&other)
 Replace with other accessor. More...
 
EntityOwnergetOwner () const
 Return the owning module. More...
 
Model::ProcessVariableProxy getModel () const
 

Additional Inherited Members

- Public Types inherited from ChimeraTK::ScalarAccessor< int32_t >
using value_type = int32_t
 
- Static Public Attributes inherited from ChimeraTK::StatusAccessor< ScalarOutput< int32_t > >
constexpr static auto tagStatusOutput
 Reserved tag which is used to mark status outputs. More...
 
- Protected Member Functions inherited from ChimeraTK::ScalarAccessor< int32_t >
 ScalarAccessor (Module *owner, const std::string &name, VariableDirection direction, std::string unit, UpdateMode mode, const std::string &description, const std::unordered_set< std::string > &tags={})
 
 ScalarAccessor ()=default
 Default constructor creates a dysfunctional accessor (to be assigned with a real accessor later) More...
 
- Protected Member Functions inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< int32_t > >
std::string completeDescription (EntityOwner *owner, const std::string &description) const
 complete the description with the full description from the owner More...
 
 InversionOfControlAccessor (Module *owner, const std::string &name, VariableDirection direction, std::string unit, size_t nElements, UpdateMode mode, const std::string &description, const std::type_info *valueType, const std::unordered_set< std::string > &tags={})
 
 InversionOfControlAccessor ()=default
 Default constructor creates a dysfunctional accessor (to be assigned with a real accessor later) More...
 
- Protected Attributes inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< int32_t > >
VariableNetworkNode _node
 

Detailed Description

Special ScalarOutput which represents a status which can be aggregated by the StatusAggregator.

By default it discards DataValidity meta data of owning module, i.e. does not propagate DataValidity=invalid to status, unless explicitly set for the output. The owning ApplicationModule is responsible for a implenting reasonable mapping, if required.

Definition at line 67 of file StatusAccessor.h.

Constructor & Destructor Documentation

◆ StatusOutput() [1/2]

ChimeraTK::StatusOutput::StatusOutput ( Module owner,
const std::string &  name,
const std::string &  description,
const std::unordered_set< std::string > &  tags = {} 
)
inline

Note: In contrast to normal ScalarOutput accessors, this constructor omits the unit argument.

Definition at line 69 of file StatusAccessor.h.

◆ StatusOutput() [2/2]

ChimeraTK::StatusOutput::StatusOutput ( )
default

Member Function Documentation

◆ writeIfDifferent()

void ChimeraTK::StatusOutput::writeIfDifferent ( Status  newValue)
inline

Definition at line 78 of file StatusAccessor.h.

+ Here is the call graph for this function:

The documentation for this struct was generated from the following file: