Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Svc.Ping port response to Active Component generated base class. #2661

Open
timcanham opened this issue Apr 4, 2024 · 0 comments
Open

Comments

@timcanham
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant