ClusterManager test for the case of one server

This commit is contained in:
Pavel Kirienko
2015-05-05 11:29:51 +03:00
parent 92d74d35ea
commit f11f49a7d2
4 changed files with 122 additions and 33 deletions
+3
View File
@@ -16,10 +16,12 @@ struct TestNode : public uavcan::INode
uavcan::MarshalBufferProvider<> buffer_provider;
uavcan::OutgoingTransferRegistry<8> otr;
uavcan::Scheduler scheduler;
uint64_t internal_failure_count;
TestNode(uavcan::ICanDriver& can_driver, uavcan::ISystemClock& clock_driver, uavcan::NodeID self_node_id)
: otr(poolmgr)
, scheduler(can_driver, poolmgr, clock_driver, otr)
, internal_failure_count(0)
{
poolmgr.addPool(&pool);
setNodeID(self_node_id);
@@ -28,6 +30,7 @@ struct TestNode : public uavcan::INode
virtual void registerInternalFailure(const char* msg)
{
std::cout << "TestNode internal failure: " << msg << std::endl;
internal_failure_count++;
}
virtual uavcan::PoolManager<1>& getAllocator() { return poolmgr; }