-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implemented command and requestCommands methods in the FrameProcessor. #359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ajgdls for doing this. I have a couple of comments/musings:
- the new
MsgVal
enum entries should also be added toIpcMessage::msg_val_map_init()
inIpcMessage.cpp
to allow JSON encoding - in retrospect, now having a
MsgType
ofMsgTypeCmd
and aMsgVal
ofMsgValCmdCommand
now looks a bit odd. We can't changeMsgTypeCmd
easily without breaking existing code, but I wonder if the naming of the new value could be tweaked to separate them a bit? Maybe something likeMsgTypeCmdExecute
? I'm not sure this is a huge issue, other than avoiding the need for a historical explanation 😉 - at some point we should add enumeration of the types and values to
IpcMessage
in the python client...
👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a command the Dummy process plugin and then add a test the calls command() and request_commands()?
Hi @GDYendell @timcnicholls I have pushed the changes resulting from our conversation yesterday. |
OK I think this is ready for review again. I have also tested sending commands with a python test client to a running FrameProcessor application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Is EXECUTE_PRINT_NAME
now redundant?
…e functionality. Fixed runtime error in Dummy plugin and throw an exception if the supported command is not requested when execution is called. Added tests that use the Dummy plugin to test execute and requestCommands methods. Update cpp/frameProcessor/test/DummyUDPProcessPluginTest.cpp Co-authored-by: Gary Yendell <gary.yendell@diamond.ac.uk> Added clarification comments. Simplified boost test calls. Updated to use string commands with no parameters. Removed unused test code. Removed unused execution parameter constant.
This PR adds the core code for supporting commands withinFrameProcessor plugins.
No commands are implemented within this PR.
Fixes #352