| 27 | {} |
| 28 | |
| 29 | NodeStatus tick() |
| 30 | { |
| 31 | int value = 0; |
| 32 | auto res = getInput<int>("in_port"); |
| 33 | if(!res) |
| 34 | { |
| 35 | throw RuntimeError("BB_TestNode needs input: ", res.error()); |
| 36 | } |
| 37 | value = res.value() * 2; |
| 38 | if(!setOutput("out_port", value)) |
| 39 | { |
| 40 | throw RuntimeError("BB_TestNode failed output"); |
| 41 | } |
| 42 | return NodeStatus::SUCCESS; |
| 43 | } |
| 44 | |
| 45 | static PortsList providedPorts() |
| 46 | { |
nothing calls this directly
no test coverage detected