Add `Svc.Ping` port response to Active Component generated base class.
Opened this issue · 0 comments
timcanham commented
F´ Version | v3.4.3 |
Affected Component | all active |
Feature Description
Have the generated base class automatically handle pings from the Svc.Ping
port instead of having developers write the same code every time.
Rationale
The requirement for the ping port handler is to return the supplied code sent to the Svc.Ping
port to confirm that the thread is still alive. The implementation is pretty much always the same:
void CmdSequencerComponentImpl ::
pingIn_handler(
NATIVE_INT_TYPE portNum, /*!< The port number*/
U32 key /*!< Value to return to pinger*/
)
{
// send ping response
this->pingOut_out(0,key);
}
The generated active component base class could implement this as a virtual function that would be used the majority of the time, but could be overridden by the implementation class if needed.