5 #include <gtest/gtest.h> 10 #include "../protocol/helpers.hpp" 29 uavcan::protocol::SoftwareVersion swver;
32 swver.vcs_commit = 0xDEADBEEF;
34 std::cout <<
"sizeof(uavcan::SubNode<0>): " <<
sizeof(
uavcan::SubNode<0>) << std::endl;
40 node1.setName(
"com.example");
42 node1.setSoftwareVersion(swver);
53 ASSERT_LE(0, node_status_monitor.
start());
58 ASSERT_FALSE(node1.isStarted());
60 ASSERT_LE(0, node1.start());
61 ASSERT_TRUE(node1.isStarted());
71 ASSERT_LE(0, log_sub.start());
73 node1.getLogger().setLevel(uavcan::protocol::debug::LogLevel::DEBUG);
74 node1.logInfo(
"test",
"6 * 9 = 42");
79 ASSERT_TRUE(log_sub.collector.msg.get());
80 std::cout << *log_sub.collector.msg << std::endl;
void startPeriodic(MonotonicDuration period)
NodeID findNodeWithWorstHealth() const
int spin(MonotonicTime deadline)
static void registerTypes()
static GlobalDataTypeRegistry & instance()
static MonotonicDuration fromMSec(int64_t ms)