Hi, @ SivaRamaKrishnaNV , we notice that there is an API Node::reset() defined in Node.hpp . We wonder to know what this API does and when it is called. Moreover, how to use it properly. Many thanks.
/** * @param [in] cycleCount the current cycle count representing the number of times the DAG has been executed. **/ void setCycleCount(uint32_t cycleCount); /** * @param [in] period the period of the node/application that created the port. **/ void setPeriod(uint32_t period); /** * Resets the port's cycle count to 0. * @note does not drop the bound channel. **/ virtual void reset(); /** * Getter for the channel * @return the channel if bound else nullptr **/ ChannelObject* getChannel(); protected: uint32_t m_cycleCount; uint32_t m_period; ChannelObject* m_channel; dw::framework::lockstep::ILockstepSyncClient* m_lockstepSyncClient; };
Dear @lizhensheng ,
Per documentation Node::reset() is virtual function and resets the state of node.
when it is called. Moreover, how to use it properly
I will check more details on this and update you.
Is #3 is related to the query asked or you have any other query?
it’s related to the query.
The base class SimpleNodeT implements the reset() function which invokes resetPort() for all registered ports of the node. That just ensures that all buffers have been returned before shutdown. There is usually no need for a concrete node to override that function
Hi, @ SivaRamaKrishnaNV, thanks. One more question, shutdown what?