From 053306f2934e6ac61f03783c36eeff6b2c5ffe0f Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 23 Jul 2019 10:12:41 -0700 Subject: rfnoc: actions: Add dictionary to all actions This can be used to set arbitrary key/value pairs on the action object. Easier to use than serialization, but doesn't require custom types, either. --- host/tests/actions_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'host/tests') diff --git a/host/tests/actions_test.cpp b/host/tests/actions_test.cpp index 9218ad231..2f9d9a702 100644 --- a/host/tests/actions_test.cpp +++ b/host/tests/actions_test.cpp @@ -42,6 +42,12 @@ BOOST_AUTO_TEST_CASE(test_actions_single_node) node_accessor.send_action(&mock_radio, {res_source_info::INPUT_EDGE, 0}, other_cmd); mock_radio.update_fwd_policy(node_t::forwarding_policy_t::ONE_TO_ALL_OUT); node_accessor.send_action(&mock_radio, {res_source_info::INPUT_EDGE, 0}, other_cmd); + + stream_cmd = + stream_cmd_action_info::make(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE); + stream_cmd->stream_cmd.num_samps = 37; + node_accessor.send_action(&mock_radio, {res_source_info::USER, 0}, stream_cmd); + BOOST_CHECK_EQUAL(mock_radio.last_num_samps, 37); } BOOST_AUTO_TEST_CASE(test_actions_simple_graph) -- cgit v1.2.3