16 template<
typename Type>
18 ScalarPipe(
ModuleGroup* owner,
const std::string& name,
const std::string& unit,
const std::string& description,
19 const std::unordered_set<std::string>& tagsInput = {},
const std::unordered_set<std::string>& tagsOutput = {})
21 input.
replace(ScalarPushInput<Type>(
this, name, unit, description, tagsInput));
22 output.
replace(ScalarOutput<Type>(
this, name, unit, description, tagsOutput));
25 ScalarPipe(
ModuleGroup* owner,
const std::string& inputName,
const std::string& outputName,
const std::string& unit,
26 const std::string& description,
const std::unordered_set<std::string>& tagsInput = {},
27 const std::unordered_set<std::string>& tagsOutput = {})
29 input.
replace(ScalarPushInput<Type>(
this, inputName, unit, description, tagsInput));
30 output.
replace(ScalarOutput<Type>(
this, outputName, unit, description, tagsOutput));
52 template<
typename Type>
55 const std::string& description,
const std::unordered_set<std::string>& tagsInput = {},
56 const std::unordered_set<std::string>& tagsOutput = {})
58 input.
replace(ArrayPushInput<Type>(
this, name, unit, nElements, description, tagsInput));
59 output.
replace(ArrayOutput<Type>(
this, name, unit, nElements, description, tagsOutput));
62 ArrayPipe(
ModuleGroup* owner,
const std::string& inputName,
const std::string& outputName,
const std::string& unit,
63 size_t nElements,
const std::string& description,
const std::unordered_set<std::string>& tagsInput = {},
64 const std::unordered_set<std::string>& tagsOutput = {})
66 input.
replace(ArrayPushInput<Type>(
this, inputName, unit, nElements, description, tagsInput));
67 output.
replace(ArrayOutput<Type>(
this, outputName, unit, nElements, description, tagsOutput));
76 std::vector<Type> temp(
input.getNElements());
ApplicationModule()=default
Default constructor: Allows late initialisation of modules (e.g.
void replace(const ChimeraTK::NDRegisterAccessorAbstractor< UserType > &newAccessor)=delete
bool write(ChimeraTK::VersionNumber versionNumber)=delete
bool write(ChimeraTK::VersionNumber versionNumber)=delete
void replace(const ChimeraTK::NDRegisterAccessorAbstractor< UserType > &newAccessor)=delete
InvalidityTracer application module.
Convenience class for output array accessors (always UpdateMode::push)
Generic module to pipe through a scalar value without altering it.
ArrayPipe(ModuleGroup *owner, const std::string &name, const std::string &unit, size_t nElements, const std::string &description, const std::unordered_set< std::string > &tagsInput={}, const std::unordered_set< std::string > &tagsOutput={})
ArrayPipe(ModuleGroup *owner, const std::string &inputName, const std::string &outputName, const std::string &unit, size_t nElements, const std::string &description, const std::unordered_set< std::string > &tagsInput={}, const std::unordered_set< std::string > &tagsOutput={})
void mainLoop() override
To be implemented by the user: function called in a separate thread executing the main loop of the mo...
ArrayOutput< Type > output
ArrayPushInput< Type > input
Convenience class for output scalar accessors (always UpdateMode::push)
Generic module to pipe through a scalar value without altering it.
ScalarPipe(ModuleGroup *owner, const std::string &name, const std::string &unit, const std::string &description, const std::unordered_set< std::string > &tagsInput={}, const std::unordered_set< std::string > &tagsOutput={})
ScalarPipe(ModuleGroup *owner, const std::string &inputName, const std::string &outputName, const std::string &unit, const std::string &description, const std::unordered_set< std::string > &tagsInput={}, const std::unordered_set< std::string > &tagsOutput={})
ScalarPushInput< Type > input
ScalarOutput< Type > output
void mainLoop() override
To be implemented by the user: function called in a separate thread executing the main loop of the mo...