mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 21:53:34 +08:00
Fruitless attempt to optimize memory use
This commit is contained in:
@@ -106,7 +106,7 @@ class NodeDiscoverer : TimerBase
|
||||
NodeMap node_map_; ///< Will not work in UAVCAN_TINY
|
||||
|
||||
ServiceClient<protocol::GetNodeInfo, GetNodeInfoResponseCallback> get_node_info_client_;
|
||||
Subscriber<protocol::NodeStatus, NodeStatusCallback, NumNodeStatusStaticReceivers> node_status_sub_;
|
||||
Subscriber<protocol::NodeStatus, NodeStatusCallback, NumNodeStatusStaticReceivers, 0> node_status_sub_;
|
||||
|
||||
/*
|
||||
* Methods
|
||||
|
||||
@@ -74,4 +74,5 @@ TEST(dynamic_node_id_server_centralized, ObjectSizes)
|
||||
using namespace uavcan::dynamic_node_id_server;
|
||||
std::cout << "centralized::Storage: " << sizeof(centralized::Storage) << std::endl;
|
||||
std::cout << "centralized::Server: " << sizeof(centralized::Server) << std::endl;
|
||||
std::cout << "NodeDiscoverer: " << sizeof(NodeDiscoverer) << std::endl;
|
||||
}
|
||||
|
||||
@@ -275,3 +275,16 @@ TEST(dynamic_node_id_server_NodeDiscoverer, RestartAndMaxAttempts)
|
||||
ASSERT_TRUE(handler.findNode(UniqueID()));
|
||||
ASSERT_EQ(2, handler.findNode(UniqueID())->node_id.get());
|
||||
}
|
||||
|
||||
|
||||
TEST(dynamic_node_id_server_NodeDiscoverer, Sizes)
|
||||
{
|
||||
using namespace uavcan;
|
||||
|
||||
std::cout << "BitSet<NodeID::Max + 1>: " << sizeof(BitSet<NodeID::Max + 1>) << std::endl;
|
||||
std::cout << "ServiceClient<protocol::GetNodeInfo>: " << sizeof(ServiceClient<protocol::GetNodeInfo>) << std::endl;
|
||||
std::cout << "protocol::GetNodeInfo::Response: " << sizeof(protocol::GetNodeInfo::Response) << std::endl;
|
||||
std::cout << "Subscriber<protocol::NodeStatus, ~, 64, 0>: "
|
||||
<< sizeof(Subscriber<protocol::NodeStatus,
|
||||
void (*)(const ReceivedDataStructure<protocol::NodeStatus>&), 64, 0>) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user