Linux makeNode() helper overload

This commit is contained in:
Pavel Kirienko
2016-06-13 00:46:13 +03:00
parent 59bcde5868
commit a19dfd56dc
6 changed files with 102 additions and 35 deletions
@@ -74,10 +74,9 @@ public:
uavcan_linux::NodePtr initNode(const std::vector<std::string>& ifaces, uavcan::NodeID nid, const std::string& name)
{
auto node = uavcan_linux::makeNode(ifaces);
node->setNodeID(nid);
node->setName(name.c_str());
ENFORCE(0 == node->start()); // This node doesn't check its network compatibility
auto node = uavcan_linux::makeNode(ifaces, name.c_str(),
uavcan::protocol::SoftwareVersion(), uavcan::protocol::HardwareVersion(),
nid);
node->setModeOperational();
return node;
}