ChimeraTK-ApplicationCore 04.07.00
Loading...
Searching...
No Matches
ChimeraTK::StatusOutput Class 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.
 
 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.
 
 StatusAccessor ()=default
 
 operator Status & ()
 Implicit type conversion to user type T to access the value.
 
 operator const Status & () const
 Implicit type conversion to user type T to access the const value.
 
StatusAccessoroperator= (Status rightHandSide)
 Assignment operator, assigns the first element.
 
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< UserType >
void replace (const ChimeraTK::NDRegisterAccessorAbstractor< UserType > &newAccessor)=delete
 
ScalarAccessor< UserType > & operator= (ScalarAccessor< UserType > &other)=delete
 
 ScalarAccessor (ScalarAccessor< UserType > &&other) noexcept
 Move constructor.
 
ScalarAccessor< UserType > & operator= (ScalarAccessor< UserType > &&other) noexcept
 Move assignment.
 
bool write (ChimeraTK::VersionNumber versionNumber)=delete
 
bool writeDestructively (ChimeraTK::VersionNumber versionNumber)=delete
 
void writeIfDifferent (UserType newValue, VersionNumber versionNumber, DataValidity validity)=delete
 
void setAndWrite (UserType newValue, VersionNumber versionNumber)=delete
 
bool write ()
 
bool writeDestructively ()
 
void writeIfDifferent (UserType newValue)
 
void setAndWrite (UserType newValue)
 
 ~ScalarAccessor ()
 
- Public Member Functions inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< UserType > >
virtual ~InversionOfControlAccessor ()
 Unregister at its owner when deleting.
 
void setMetaData (const std::optional< std::string > &name, const std::optional< std::string > &unit={}, const std::optional< std::string > &description={}, const std::optional< std::unordered_set< std::string > > &tags={})
 Change meta data (name, unit, description and optionally tags).
 
void addTag (const std::string &tag)
 Add a tag.
 
void addTags (const std::unordered_set< std::string > &tags)
 Add multiple tags.
 
const std::unordered_set< std::string > & getTags ()
 Return set of tags.
 
 operator VariableNetworkNode ()
 Convert into VariableNetworkNode.
 
 operator VariableNetworkNode () const
 
void replace (ScalarAccessor< UserType > &&other)
 Replace with other accessor.
 
EntityOwnergetOwner () const
 Return the owning module.
 
Model::ProcessVariableProxy getModel () const
 
bool checkMetadataWriteDifference ()
 Checks whether a writeIfDifferent would have to issue a write, even if the payload data is unchanged.
 

Additional Inherited Members

- Public Types inherited from ChimeraTK::ScalarAccessor< UserType >
using value_type = UserType
 
- Protected Member Functions inherited from ChimeraTK::ScalarAccessor< UserType >
 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)
 
- Protected Member Functions inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< UserType > >
 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={})
 Constructor, only used by child class accessors.
 
 InversionOfControlAccessor ()=default
 Default constructor creates a dysfunctional accessor (to be assigned with a real accessor later)
 
std::string completeDescription (EntityOwner *owner, const std::string &description) const
 complete the description with the full description from the owner
 
void registerInModel ()
 Register the variable in the model.
 
void init ()
 Late initialisation of stuff we cannot do in our constructor.
 
void deinit ()
 Early deinitialisation of stuff we cannot do in our destructor.
 
- Protected Attributes inherited from ChimeraTK::InversionOfControlAccessor< ScalarAccessor< UserType > >
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 66 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 77 of file StatusAccessor.h.


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