| 51 | BT::NodeConfig simple_switch_config_; |
| 52 | |
| 53 | SwitchTest() |
| 54 | : action_1("action_1", milliseconds(200)) |
| 55 | , action_42("action_42", milliseconds(200)) |
| 56 | , action_def("action_default", milliseconds(200)) |
| 57 | { |
| 58 | BT::PortsRemapping input; |
| 59 | input.insert(std::make_pair("variable", "{my_var}")); |
| 60 | input.insert(std::make_pair("case_1", "1")); |
| 61 | input.insert(std::make_pair("case_2", "42")); |
| 62 | |
| 63 | BT::NodeConfig simple_switch_config_; |
| 64 | simple_switch_config_.blackboard = bb; |
| 65 | simple_switch_config_.input_ports = input; |
| 66 | |
| 67 | root = std::make_unique<Switch2>("simple_switch", simple_switch_config_); |
| 68 | |
| 69 | root->addChild(&action_1); |
| 70 | root->addChild(&action_42); |
| 71 | root->addChild(&action_def); |
| 72 | } |
| 73 | ~SwitchTest() override |
| 74 | { |
| 75 | root->halt(); |