Vendor-specific status code support

This commit is contained in:
Pavel Kirienko
2015-03-20 00:24:53 +03:00
parent 3b3c0d3b9e
commit a63c9510fc
5 changed files with 50 additions and 9 deletions
@@ -84,6 +84,7 @@ static void runForever(const uavcan_linux::NodePtr& node)
auto do_nothing_once_a_minute = [&node](const uavcan::TimerEvent&)
{
node->logInfo("timer", "Another minute passed...");
node->setVendorSpecificStatusCode(static_cast<std::uint16_t>(std::rand())); // Setting to an arbitrary value
};
auto timer = node->makeTimer(uavcan::MonotonicDuration::fromMSec(60000), do_nothing_once_a_minute);