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)
42#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)
129 throw ExceptionWithStatus(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
136 throw ExceptionWithStatus(DW_CALL_NOT_ALLOWED,
"Not meant to be called");
142 return this->
setup();
163 throw ExceptionWithStatus(DW_NOT_IMPLEMENTED,
"Not implemented");
168 if (status != DW_SUCCESS)
#define NODE_REGISTER_PASS(identifier,...)
Register a pass function with the node base class.
size_t getPortSize() const
dwStatus validate() override
Validate that all registered ports which have the flag binding-required are bound to a channel.
SimpleNodeT()
Default constructor registering the setup and teardown passes.
virtual dwStatus setupImpl()
The default implementation calls SimpleNode::setup.
std::unique_ptr< Pass > createTeardownPass() override
std::unique_ptr< Pass > createSetupPass() override
SimpleNodeT(NodeAllocationParams params)
virtual dwStatus teardownImpl()
The default implementation calls SimpleNode::teardown.
dwStatus reset() override
The default implementation calls SimpleNode::resetPorts.
dwStatus validate() override
const dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > & getRegisteredInputPorts() const
const dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > & getRegisteredOutputPorts() const
void resetPorts() override
Default implementation to reset ports managed by the base class.
dwStatus setup()
Default implementation of the setup pass.
dwStatus teardown()
Default implementation of the teardown pass.
NodeAllocationParams createAllocationParams()