Definition at line 74 of file SimpleNode.hpp.


Public Member Functions | |
| void | addPass (Pass *pass) |
| dwStatus | clearHealthSignal () |
| Clears the current Health Signals from the Health Signal Array. More... | |
| dwStatus | copyModuleHealthSignals (dwHealthSignal &outSignal) |
| Copy health signals from the module over to the node and stores in outSignal. More... | |
| dwStatus | getErrorSignal (dwGraphErrorSignal *&errorSignal) override |
| dwStatus | getHealthSignal (dwGraphHealthSignal *&healthSignals, bool updateFromModule=false) override |
| template<typename NodeT , size_t PortIndex> | |
| ManagedPortInput< decltype(portType< NodeT, PortDirection::INPUT, PortIndex >())> & | getInputPort () |
| Get a previously initialized non-array ManagedPortInput. More... | |
| template<typename NodeT , size_t PortIndex> | |
| ManagedPortInput< decltype(portType< NodeT, PortDirection::INPUT, PortIndex >())> & | getInputPort (size_t arrayIndex) |
| Get one specific ManagedPortInput from a previously initialized input array port. More... | |
| uint32_t | getIterationCount () const |
| dwStatus | getName (const char **name) override |
| template<typename NodeT , size_t PortIndex> | |
| ManagedPortOutput< decltype(portType< NodeT, PortDirection::OUTPUT, PortIndex >())> & | getOutputPort () |
| Get a previously initialized non-array ManagedPortOutput. More... | |
| template<typename NodeT , size_t PortIndex> | |
| ManagedPortOutput< decltype(portType< NodeT, PortDirection::OUTPUT, PortIndex >())> & | getOutputPort (size_t arrayIndex) |
| Get one specific ManagedPortOutput from a previously initialized output array port. More... | |
| size_t | getPassCount () const noexcept override |
| dwStatus | getPasses (VectorFixed< Pass * > &passList) override |
| dwStatus | getPasses (VectorFixed< Pass * > &passList, dwProcessorType processorType, dwProcessType processType) 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 |
| template<typename NodeT , size_t PortIndex, typename... Args> | |
| void | initInputArrayPort (Args &&... args) |
| Initialize an array of ManagedPortInput which will be owned by the base class and can be retrieved using getInputPort(size_t). More... | |
| template<typename NodeT , size_t PortIndex, typename... Args> | |
| void | initInputPort (Args &&... args) |
| Initialize a ManagedPortInput which will be owned by the base class and can be retrieved using getInputPort(). More... | |
| template<typename NodeT , size_t PortIndex, typename... Args> | |
| void | initOutputArrayPort (Args &&... args) |
| Initialize an array of ManagedPortOutput which will be owned by the base class and can be retrieved using getOutputPort(size_t). More... | |
| template<typename NodeT , size_t PortIndex, typename... Args> | |
| void | initOutputPort (Args &&... args) |
| Initialize a ManagedPortOutput which will be owned by the base class and can be retrieved using getOutputPort(). More... | |
| template<typename Func > | |
| void | iterateManagedInputPorts (Func func) |
| template<typename Func > | |
| void | iterateManagedOutputPorts (Func func) |
| template<typename Func , typename PortList > | |
| void | iteratePorts (PortList &portList, Func func) |
| template<typename TPort , typename... Args> | |
| std::unique_ptr< TPort > | make_port (Args &&... args) |
| dwStatus | reportCurrentErrorSignal (dwGraphErrorSignal &signal) override |
| A function that allows user override to update error signal It is automatically called by dwFramework when getErrorSignal is called and when pass returns non-success return code. More... | |
| dwStatus | reportCurrentHealthSignal (dwGraphHealthSignal &signal) override |
| A function that allows user override to update health signal It is automatically called by dwFramework during teardown and when pass returns non-success return code. More... | |
| dwStatus | reset () override |
| void | resetPorts () override |
| Default implementation to reset ports managed by the base class. More... | |
| dwStatus | run () override |
| dwStatus | runPass (size_t passIndex) override |
| dwStatus | runPassByID (uint8_t passID) override |
| dwStatus | setInputChannel (ChannelObject *, uint8_t, dwSerializationType) override |
| dwStatus | setInputChannel (ChannelObject *channel, uint8_t portID) override |
| Associate an input port with a channel instances. More... | |
| dwStatus | setIterationCount (uint32_t iterationCount) override |
| template<typename ModuleHandle_t > | |
| dwStatus | setModuleHandle (ModuleHandle_t handle, dwContextHandle_t context) |
| dwStatus | setName (const char *name) final |
| virtual dwStatus | setObjectHandle (dwModuleHandle_t handle) |
| dwStatus | setOutputChannel (ChannelObject *channel, uint8_t portID) override |
| Associate an output port with a channel instances. More... | |
| dwStatus | setState (const char *state) override |
| dwStatus | setup () |
| Default implementation of the setup pass. More... | |
| SimpleNode () | |
| SimpleNode (NodeAllocationParams params) | |
| Constructor which tailors the preallocated size of the internal collections for ports and passes to the need of the concrete node. More... | |
| dwStatus | teardown () |
| Default implementation of the teardown pass. More... | |
| dwStatus | updateHealthSignal (const dwGraphHealthSignal &signal) |
| Adds the provided Health Signal to the Health Signal Array. If the array is full, the new signal will not be added. More... | |
| dwStatus | validate () override |
| dwStatus | validate (const char *direction, const PortCollectionDescriptor &collection, const dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > &ports, size_t indexOffset=0) |
| Helper function used by dw::framework::SimpleNodeT::validate. More... | |
| virtual | ~SimpleNode () |
Public Member Functions inherited from dw::framework::Node | |
| virtual dwStatus | getErrorSignal (dwGraphErrorSignal *&errorSignal)=0 |
| Get the pointer to the error signal for this node. More... | |
| virtual dwStatus | getHealthSignal (dwGraphHealthSignal *&healthSignals, bool updateFromModule=false)=0 |
| Get the pointer to the health signal for this node. More... | |
| virtual dwStatus | getName (const char **name)=0 |
| Get the name of the node. More... | |
| virtual size_t | getPassCount () const noexcept=0 |
| Get number of passes in the node. More... | |
| virtual dwStatus | getPasses (VectorFixed< Pass * > &passList)=0 |
| Get all the passes in the node. More... | |
| virtual dwStatus | getPasses (VectorFixed< Pass * > &passList, dwProcessorType processorType, dwProcessType processType)=0 |
| Get node passes filtered by processor type and process type. More... | |
| virtual dwStatus | reportCurrentErrorSignal (dwGraphErrorSignal &signal)=0 |
| A function that allows user override to update error signal It is automatically called by dwFramework when getErrorSignal is called and when pass returns non-success return code. More... | |
| virtual dwStatus | reportCurrentHealthSignal (dwGraphHealthSignal &signal)=0 |
| A function that allows user override to update health signal It is automatically called by dwFramework during teardown and when pass returns non-success return code. More... | |
| virtual dwStatus | reset ()=0 |
| Resets the state of the node. More... | |
| virtual void | resetPorts ()=0 |
| Resets all the ports in the node. More... | |
| virtual dwStatus | run ()=0 |
| Runs all the passes in the node. More... | |
| virtual dwStatus | runPass (size_t passIndex)=0 |
| Run one pass by index as defined by the pass descriptors. More... | |
| virtual dwStatus | runPassByID (uint8_t passID)=0 |
| Run one pass by ID as defined by the PassList enum class. More... | |
| virtual dwStatus | setInputChannel (ChannelObject *channel, uint8_t portID)=0 |
| Sets an input channel for this node with an accompanying port. More... | |
| virtual dwStatus | setInputChannel (ChannelObject *channel, uint8_t portID, dwSerializationType dataType)=0 |
| Sets an input channel for this node with an accompanying port. More... | |
| virtual dwStatus | setIterationCount (uint32_t iterationCount)=0 |
| Sets the node's iteration count. More... | |
| virtual dwStatus | setName (const char *name)=0 |
| Set the name of the node. More... | |
| virtual dwStatus | setOutputChannel (ChannelObject *channel, uint8_t portID)=0 |
| Sets an output channel for this node with an accompanying port. More... | |
| virtual dwStatus | setState (const char *state)=0 |
| Set the current state in node. Node implementation of this API need to be thread-safe. More... | |
| virtual dwStatus | validate ()=0 |
| Checks that all mandatory ports are bound. The implementation should validate that all the ports are bound to the appropriate channels (any required ports, that is). For example, a camera node may have processed output and raw output ports, but only one is required to be bound. More... | |
| virtual | ~Node ()=default |
Static Public Attributes | |
| static constexpr const char * | PASS_SETUP_NAME = "SETUP" |
| static constexpr const char * | PASS_TEARDOWN_NAME = "TEARDOWN" |
Static Public Attributes inherited from dw::framework::Node | |
| static constexpr size_t | MAX_NAME_LEN = 128 |
| static constexpr uint32_t | MAX_PASS_COUNT = 256 |
| static constexpr uint32_t | MAX_PORT_COUNT = 256 |
| static constexpr uint8_t | PASS_SETUP = std::numeric_limits<uint8_t>::max() - 1 |
| static constexpr uint8_t | PASS_TEARDOWN = std::numeric_limits<uint8_t>::max() |
Protected Member Functions | |
| virtual std::unique_ptr< Pass > | createSetupPass () |
| virtual std::unique_ptr< Pass > | createTeardownPass () |
| dwStatus | getModuleHandle (dwModuleHandle_t *moduleHandle, void *handle, dwContextHandle_t context) |
| template<typename PassFunctionT , typename... Args> | |
| std::unique_ptr< PassImpl< PassFunctionT > > | make_pass (PassFunctionT func, Args &&... args) |
| template<typename NodeT , size_t PassIndex, typename PassFunctionT > | |
| void | registerPass (PassFunctionT func, NvMediaDla *dlaEngine=nullptr) |
| Register a pass function with the node base class. More... | |
Protected Attributes | |
| std::atomic< bool > | m_asyncResetFlag {false} |
| dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > | m_inputPorts |
| dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > | m_outputPorts |
Additional Inherited Members | |
Public Types inherited from dw::framework::Node | |
| using | Name_t = FixedString< MAX_NAME_LEN > |
| dw::framework::SimpleNode::SimpleNode | ( | ) |
| dw::framework::SimpleNode::SimpleNode | ( | NodeAllocationParams | params | ) |
Constructor which tailors the preallocated size of the internal collections for ports and passes to the need of the concrete node.
|
virtual |
| void dw::framework::SimpleNode::addPass | ( | Pass * | pass | ) |
Register a pass function with the node base class.
| dwStatus dw::framework::SimpleNode::clearHealthSignal | ( | ) |
Clears the current Health Signals from the Health Signal Array.
| dwStatus dw::framework::SimpleNode::copyModuleHealthSignals | ( | dwHealthSignal & | outSignal | ) |
Copy health signals from the module over to the node and stores in outSignal.
| [out] | outSignal | the output module signal |
|
inlineprotectedvirtual |
Reimplemented in dw::framework::SimpleNodeT< T >, and dw::framework::SimpleNodeT< dwRelativeEgomotionIMUNode >.
Definition at line 198 of file SimpleNode.hpp.
|
inlineprotectedvirtual |
Reimplemented in dw::framework::SimpleNodeT< T >, and dw::framework::SimpleNodeT< dwRelativeEgomotionIMUNode >.
Definition at line 203 of file SimpleNode.hpp.
|
overridevirtual |
Implements dw::framework::Node.
|
overridevirtual |
Implements dw::framework::Node.
|
inline |
Get a previously initialized non-array ManagedPortInput.
Definition at line 436 of file SimpleNode.hpp.
References dw::framework::descriptorPortArray(), dw::framework::INPUT, and m_inputPorts.
|
inline |
Get one specific ManagedPortInput from a previously initialized input array port.
Definition at line 458 of file SimpleNode.hpp.
References m_inputPorts.
| uint32_t dw::framework::SimpleNode::getIterationCount | ( | ) | const |
Referenced by make_port().
|
protected |
Referenced by setModuleHandle().
|
overridevirtual |
Implements dw::framework::Node.
|
inline |
Get a previously initialized non-array ManagedPortOutput.
Definition at line 484 of file SimpleNode.hpp.
References dw::framework::descriptorPortArray(), m_outputPorts, and dw::framework::OUTPUT.
|
inline |
Get one specific ManagedPortOutput from a previously initialized output array port.
Definition at line 506 of file SimpleNode.hpp.
References m_outputPorts.
|
overridevirtualnoexcept |
Implements dw::framework::Node.
|
overridevirtual |
Implements dw::framework::Node.
|
overridevirtual |
Implements dw::framework::Node.
|
inline |
Definition at line 557 of file SimpleNode.hpp.
References m_inputPorts.
Referenced by dw::framework::SimpleNodeT< T >::validate().
|
inline |
Definition at line 562 of file SimpleNode.hpp.
References m_outputPorts.
Referenced by dw::framework::SimpleNodeT< T >::validate().
|
inline |
Initialize an array of ManagedPortInput which will be owned by the base class and can be retrieved using getInputPort(size_t).
The macro NODE_INIT_INPUT_ARRAY_PORT can be used for convenience to hide the template parameters of this method.
Definition at line 381 of file SimpleNode.hpp.
References m_inputPorts.
|
inline |
Initialize a ManagedPortInput which will be owned by the base class and can be retrieved using getInputPort().
The macro NODE_INIT_INPUT_PORT can be used for convenience to hide the template parameters of this method.
Definition at line 365 of file SimpleNode.hpp.
References m_inputPorts.
|
inline |
Initialize an array of ManagedPortOutput which will be owned by the base class and can be retrieved using getOutputPort(size_t).
The macro NODE_INIT_OUTPUT_ARRAY_PORT can be used for convenience to hide the template parameters of this method.
Definition at line 418 of file SimpleNode.hpp.
References m_outputPorts.
|
inline |
Initialize a ManagedPortOutput which will be owned by the base class and can be retrieved using getOutputPort().
The macro NODE_INIT_OUTPUT_PORT can be used for convenience to hide the template parameters of this method.
Definition at line 402 of file SimpleNode.hpp.
References m_outputPorts.
|
inline |
Definition at line 141 of file SimpleNode.hpp.
References iteratePorts(), and m_inputPorts.
|
inline |
Definition at line 158 of file SimpleNode.hpp.
References iteratePorts(), and m_outputPorts.
|
inline |
Definition at line 132 of file SimpleNode.hpp.
Referenced by iterateManagedInputPorts(), and iterateManagedOutputPorts().
|
inlineprotected |
Simple helper to create a pass with any function implementing operator()
Example: class MyNode : public Node { MyNode() { const int32_t someArg = 1;
auto pass1 = make_pass([someArg, this]() { return myPassWithArgs(someArg); }, ...); auto pass2 = make_pass([this]() { return myPassNoArgs(); }, ...); }
private: dwStatus myPassWithArgs(int32_t a); dwStatus myPassNoArgs(); }
Definition at line 231 of file SimpleNode.hpp.
|
inline |
Definition at line 353 of file SimpleNode.hpp.
References getIterationCount().
|
inlineprotected |
Register a pass function with the node base class.
The macro NODE_REGISTER_PASS can be used for convenience to hide the template parameters of this method.
Note that the processorType DLA_0 and DLA_1 will be replaced by DLA when STM support cuDLA and dw deprecated them Issue tracked in AVCGF-569
Definition at line 245 of file SimpleNode.hpp.
|
overridevirtual |
A function that allows user override to update error signal It is automatically called by dwFramework when getErrorSignal is called and when pass returns non-success return code.
| [in,out] | signal | that the node owner modifies to store current health. It is pre-filled with the latest module health signal |
Implements dw::framework::Node.
|
overridevirtual |
A function that allows user override to update health signal It is automatically called by dwFramework during teardown and when pass returns non-success return code.
| [in,out] | signal | that the node owner modifies to store current health. It is pre-filled with the latest module health signal |
Implements dw::framework::Node.
|
inlineoverridevirtual |
Implements dw::framework::Node.
Reimplemented in dw::framework::SimpleNodeT< T >, dw::framework::SimpleNodeT< dwRelativeEgomotionIMUNode >, and dw::framework::dwRelativeEgomotionIMUNodeImpl.
Definition at line 85 of file SimpleNode.hpp.
|
overridevirtual |
Default implementation to reset ports managed by the base class.
Call ManagedPortInput::reset on all input ports. This method is used by SimpleNodeT::reset.
Implements dw::framework::Node.
Referenced by dw::framework::SimpleNodeT< T >::reset().
|
overridevirtual |
Implements dw::framework::Node.
|
overridevirtual |
Implements dw::framework::Node.
|
overridevirtual |
Implements dw::framework::Node.
|
inlineoverridevirtual |
Implements dw::framework::Node.
Definition at line 96 of file SimpleNode.hpp.
|
overridevirtual |
Associate an input port with a channel instances.
A concrete node shouldn't need to override this method if all input ports are initialized in the constructor using the macros like NODE_INIT_INPUT_PORT.
Implements dw::framework::Node.
|
overridevirtual |
Sets the node's iteration count. The value set can be retrieved with getIterationCount.
Implements dw::framework::Node.
|
inline |
Definition at line 175 of file SimpleNode.hpp.
References getModuleHandle(), and setObjectHandle().
|
finalvirtual |
Implements dw::framework::Node.
|
virtual |
Referenced by setModuleHandle().
|
overridevirtual |
Associate an output port with a channel instances.
A concrete node shouldn't need to override this method if all output ports are initialized in the constructor using the macros like NODE_INIT_OUTPUT_PORT.
Implements dw::framework::Node.
|
inlineoverridevirtual |
Set the current state. Override setState to handle state changes
Implements dw::framework::Node.
Definition at line 573 of file SimpleNode.hpp.
| dwStatus dw::framework::SimpleNode::setup | ( | ) |
Default implementation of the setup pass.
Check that all ports which are bound to a channel have a buffer available. This method is used by SimpleNodeT::setupImpl.
Referenced by dw::framework::SimpleNodeT< T >::setupImpl().
| dwStatus dw::framework::SimpleNode::teardown | ( | ) |
Default implementation of the teardown pass.
Call ManagedPortInput::release on all input ports. This method is used by SimpleNodeT::teardownImpl.
Referenced by dw::framework::SimpleNodeT< T >::teardownImpl().
| dwStatus dw::framework::SimpleNode::updateHealthSignal | ( | const dwGraphHealthSignal & | signal | ) |
Adds the provided Health Signal to the Health Signal Array. If the array is full, the new signal will not be added.
| [in] | signal | The Health Signal to add |
|
inlineoverridevirtual |
Implements dw::framework::Node.
Reimplemented in dw::framework::SimpleNodeT< T >, dw::framework::SimpleNodeT< dwRelativeEgomotionIMUNode >, and dw::framework::dwRelativeEgomotionIMUNodeImpl.
Definition at line 107 of file SimpleNode.hpp.
Referenced by dw::framework::SimpleNodeT< T >::validate().
| dwStatus dw::framework::SimpleNode::validate | ( | const char * | direction, |
| const PortCollectionDescriptor & | collection, | ||
| const dw::core::HeapHashMap< size_t, std::shared_ptr< PortBase > > & | ports, | ||
| size_t | indexOffset = 0 |
||
| ) |
Helper function used by dw::framework::SimpleNodeT::validate.
A concrete node shouldn't need to override or call this method.
|
protected |
Definition at line 583 of file SimpleNode.hpp.
|
protected |
Definition at line 580 of file SimpleNode.hpp.
Referenced by getInputPort(), getRegisteredInputPorts(), initInputArrayPort(), initInputPort(), and iterateManagedInputPorts().
|
protected |
Definition at line 581 of file SimpleNode.hpp.
Referenced by getOutputPort(), getRegisteredOutputPorts(), initOutputArrayPort(), initOutputPort(), and iterateManagedOutputPorts().
|
staticconstexpr |
Definition at line 77 of file SimpleNode.hpp.
|
staticconstexpr |
Definition at line 78 of file SimpleNode.hpp.