MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / tick

Method tick

tests/gtest_ports.cpp:19–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 }
18
19 NodeStatus tick() override
20 {
21 int val_A = 0;
22 int val_B = 0;
23 if(!getInput("in_port_A", val_A))
24 {
25 throw RuntimeError("missing input [in_port_A]");
26 }
27 if(!getInput("in_port_B", val_B))
28 {
29 throw RuntimeError("missing input [in_port_B]");
30 }
31
32 if(val_A == 42 && val_B == 66)
33 {
34 return NodeStatus::SUCCESS;
35 }
36 return NodeStatus::FAILURE;
37 }
38
39 static PortsList providedPorts()
40 {

Callers

nothing calls this directly

Calls 1

RuntimeErrorClass · 0.85

Tested by

no test coverage detected