Repository navigation
Reserved port names #901
Replies: 1 comment
|
The parser loops over the attributes of each element. An attribute becomes a port remapping only if Renaming these now would break every existing XML file, so it is unlikely to change. This is the same in 4.11. If the label in your example only exists to tell the node what to do, you can get the syntax you want without a port. Read the instance name inside the node: factory.registerSimpleAction("CreateTask",
[](TreeNode& node) {
node.setOutput("task", node.name()); // "pick and place"
return NodeStatus::SUCCESS;
},
{ OutputPort<std::string>("task") });<CreateTask name="pick and place" task="{task}" />Instance names can contain spaces ( |
Uh oh!
There was an error while loading. Please reload this page.
Is there any reason why the port names
IDandnameare reserved ?There are a lot of valid cases where
nameis the perfect choice for a BT port... If it's needed internally I would suggest adding underscore at the beginning like you did with_autoremap.This feels redundant...
Much better !
All reactions