31 #ifndef DW_FRAMEWORK_SIMPLENODET_HPP_ 32 #define DW_FRAMEWORK_SIMPLENODET_HPP_ 40 #define NODE_GET_INPUT_PORT_INDEX(identifier) dw::framework::portIndex<NodeT, dw::framework::PortDirection::INPUT>(identifier) 41 #define NODE_GET_OUTPUT_PORT_INDEX(identifier) dw::framework::portIndex<NodeT, dw::framework::PortDirection::OUTPUT>(identifier) 49 #define NODE_REGISTER_PASS(identifier, ...) this->template registerPass<NodeT, dw::framework::passIndex<NodeT>(identifier)>(__VA_ARGS__) 56 #define NODE_INIT_INPUT_PORT(identifier, ...) \ 57 this->template initInputPort<NodeT, dw::framework::portIndex<NodeT, dw::framework::PortDirection::INPUT>(identifier)>(__VA_ARGS__) 63 #define NODE_INIT_INPUT_ARRAY_PORT(identifier, ...) \ 64 this->template initInputArrayPort<NodeT, dw::framework::portIndex<NodeT, dw::framework::PortDirection::INPUT>(identifier)>(__VA_ARGS__) 70 #define NODE_INIT_OUTPUT_PORT(identifier, ...) \ 71 this->template initOutputPort<NodeT, dw::framework::portIndex<NodeT, dw::framework::PortDirection::OUTPUT>(identifier)>(__VA_ARGS__) 77 #define NODE_INIT_OUTPUT_ARRAY_PORT(identifier, ...) \ 78 this->template initOutputArrayPort<NodeT, dw::framework::portIndex<NodeT, dw::framework::PortDirection::OUTPUT>(identifier)>(__VA_ARGS__) 84 #define NODE_GET_INPUT_PORT(identifier) this->template getInputPort<NodeT, NODE_GET_INPUT_PORT_INDEX(identifier)>() 89 #define NODE_GET_INPUT_ARRAY_PORT(identifier, index) this->template getInputPort<NodeT, NODE_GET_INPUT_PORT_INDEX(identifier)>(index) 94 #define NODE_GET_OUTPUT_PORT(identifier) this->template getOutputPort<NodeT, NODE_GET_OUTPUT_PORT_INDEX(identifier)>() 99 #define NODE_GET_OUTPUT_ARRAY_PORT(identifier, index) this->template getOutputPort<NodeT, NODE_GET_OUTPUT_PORT_INDEX(identifier)>(index) 106 template <
typename T>
113 template <
typename T>
136 throw Exception(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
143 throw Exception(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
149 return this->setup();
155 return this->teardown();
168 if (getRegisteredInputPorts().empty() && getRegisteredOutputPorts().empty())
170 throw Exception(DW_NOT_IMPLEMENTED,
"Not implemented");
175 if (status != DW_SUCCESS)
190 return teardownImpl();
195 template <
typename T>
209 return teardownImpl();
217 throw Exception(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
224 throw Exception(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
230 return this->setup();
236 return this->teardown();
249 if (getRegisteredInputPorts().empty() && getRegisteredOutputPorts().empty())
251 throw Exception(DW_NOT_IMPLEMENTED,
"Not implemented");
256 if (status != DW_SUCCESS)
268 #endif // DW_FRAMEWORK_SIMPLENODET_HPP_
virtual dwStatus teardownImpl()
The default implementation calls SimpleNode::teardown.
virtual dwStatus teardownImpl()
The default implementation calls SimpleNode::teardown.
dwStatus validate() override
Validate that all registered ports which have the flag binding-required are bound to a channel...
virtual dwStatus setupImpl()
The default implementation calls SimpleNode::setup.
dwStatus validate() override
std::unique_ptr< Pass > createTeardownPass() override
dwStatus validate() override
std::unique_ptr< Pass > createSetupPass() override
std::unique_ptr< Pass > createSetupPass() override
NodeAllocationParams createAllocationParams()
size_t getPortSize() const
SimpleSensorNodeT(NodeAllocationParams params)
SimpleSensorNodeT()
Default constructor registering the setup and teardown passes.
virtual dwStatus setupImpl()
The default implementation calls SimpleNode::setup.
dwStatus reset() override
The default implementation calls SimpleNode::resetPorts.
dwStatus validate() override
Validate that all registered ports which have the flag binding-required are bound to a channel...
#define NODE_REGISTER_PASS(identifier,...)
Register a pass function with the node base class.
std::unique_ptr< Pass > createTeardownPass() override
SimpleProcessNodeT()
Default constructor registering the setup and teardown passes.
dwStatus reset() override
The default implementation calls SimpleNode::resetPorts.