Go to the documentation of this file.
13 #ifndef ACTION_SETBLACKBOARD_NODE_H
14 #define ACTION_SETBLACKBOARD_NODE_H
47 return {
InputPort(
"value",
"Value to be written int othe output_key"),
49 "value should be written")};
55 std::string output_key;
56 if (!
getInput(
"output_key", output_key))
66 const auto input_key = std::string(stripped_key);
67 std::shared_ptr<Blackboard::Entry> src_entry =
config().
blackboard->getEntry(input_key);
68 std::shared_ptr<Blackboard::Entry> dst_entry =
config().
blackboard->getEntry(output_key);
72 throw RuntimeError(
"Can't find the port referred by [value]");
79 dst_entry->value = src_entry->value;
Result getInput(const std::string &key, T &destination) const
std::pair< std::string, PortInfo > InputPort(StringView name, StringView description={})
static PortsList providedPorts()
std::pair< std::string, PortInfo > BidirectionalPort(StringView name, StringView description={})
std::unordered_map< std::string, PortInfo > PortsList
virtual BT::NodeStatus tick() override
Method to be implemented by the user.
PortsRemapping input_ports
const NodeConfiguration & config() const
static bool isBlackboardPointer(StringView str)
void setRegistrationID(StringView ID)
const std::string & name() const
Name of the instance, not the type.
Blackboard::Ptr blackboard
nonstd::string_view StringView
The SyncActionNode is an ActionNode that explicitly prevents the status RUNNING and doesn't require a...
The SetBlackboard is action used to store a string into an entry of the Blackboard specified in "outp...
static StringView stripBlackboardPointer(StringView str)
SetBlackboard(const std::string &name, const NodeConfiguration &config)
behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Wed Jun 26 2024 02:51:19