Skip to content

Commit

Permalink
Added clarification comments. Simplified boost test calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgdls committed Sep 26, 2024
1 parent 3a26f82 commit 25825a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cpp/frameProcessor/src/DummyUDPProcessPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ namespace FrameProcessor
*/
void DummyUDPProcessPlugin::requestCommands(OdinData::IpcMessage& reply)
{
// The expected response of requestCommands is a dictionary of commands with sub dictionaries of
// parameters. This command "print" takes the parameter "name" and the expected type of "name" is a string.
// This method inserts an empty string as the return value of the "name" item to reflect the allowed type.
const std::string command_str = get_name() + "/" + DummyUDPProcessPlugin::EXECUTE_PRINT + "/" + DummyUDPProcessPlugin::EXECUTE_PRINT_NAME;
const std::string val_str = "";
reply.set_param(command_str, val_str);
Expand Down
2 changes: 1 addition & 1 deletion cpp/frameProcessor/test/DummyUDPProcessPluginTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE( DummyUDPProcessPlugin_commands )
sub_reply.get_msg_val());

// Verify that the command has the parameter name, which names the configuration item to print
BOOST_CHECK_EQUAL(param_reply.has_param(std::string("name")), true);
BOOST_CHECK(param_reply.has_param(std::string("name")));

// Verify that an incorrect commmand request is rejected
BOOST_CHECK_THROW(dummy_plugin.execute(bad_command_execute, command_reply), std::runtime_error);
Expand Down

0 comments on commit 25825a5

Please sign in to comment.