mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 05:03:35 +08:00
Server event tracer extracted to the common level
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/cluster_manager.hpp>
|
||||
#include "event_tracer.hpp"
|
||||
#include "../event_tracer.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include "../memory_storage_backend.hpp"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/log.hpp>
|
||||
#include "event_tracer.hpp"
|
||||
#include "../event_tracer.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include "../memory_storage_backend.hpp"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/persistent_state.hpp>
|
||||
#include "event_tracer.hpp"
|
||||
#include "../event_tracer.hpp"
|
||||
#include "../memory_storage_backend.hpp"
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <memory>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed.hpp>
|
||||
#include <uavcan/protocol/dynamic_node_id_client.hpp>
|
||||
#include "event_tracer.hpp"
|
||||
#include "../event_tracer.hpp"
|
||||
#include "../../helpers.hpp"
|
||||
#include "../memory_storage_backend.hpp"
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/event.hpp>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/event.hpp>
|
||||
|
||||
|
||||
TEST(DynamicNodeIDServer, EventCodeToString)
|
||||
+3
-3
@@ -6,14 +6,14 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/event.hpp>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/event.hpp>
|
||||
|
||||
|
||||
class EventTracer : public uavcan::dynamic_node_id_server::distributed::IEventTracer
|
||||
class EventTracer : public uavcan::dynamic_node_id_server::IEventTracer
|
||||
{
|
||||
const std::string id_;
|
||||
|
||||
virtual void onEvent(uavcan::dynamic_node_id_server::distributed::TraceCode code, uavcan::int64_t argument)
|
||||
virtual void onEvent(uavcan::dynamic_node_id_server::TraceCode code, uavcan::int64_t argument)
|
||||
{
|
||||
std::cout << "EVENT [" << id_ << "]\t" << code << "\t" << getEventName(code) << "\t" << argument << std::endl;
|
||||
}
|
||||
Reference in New Issue
Block a user