Printing size of some data structures from the ServiceClient<> test

This commit is contained in:
Pavel Kirienko 2014-03-14 13:32:01 +04:00
parent ce0174a734
commit ab34c94ba2

View File

@ -6,6 +6,8 @@
#include <uavcan/service_client.hpp>
#include <uavcan/service_server.hpp>
#include <uavcan/util/method_binder.hpp>
#include <uavcan/protocol/ComputeAggregateTypeSignature.hpp>
#include <uavcan/protocol/GetDataTypeInfo.hpp>
#include <root_ns_a/StringService.hpp>
#include <queue>
#include "clock.hpp"
@ -223,3 +225,24 @@ TEST(ServiceClient, Basic)
// All destroyed - nobody listening
ASSERT_EQ(0, node_b.scheduler.getDispatcher().getNumServiceResponseListeners());
}
TEST(ServiceClient, Sizes)
{
using namespace uavcan;
std::cout << "ComputeAggregateTypeSignature server: " <<
sizeof(ServiceServer<protocol::ComputeAggregateTypeSignature>) << std::endl;
std::cout << "ComputeAggregateTypeSignature client: " <<
sizeof(ServiceClient<protocol::ComputeAggregateTypeSignature>) << std::endl;
std::cout << "ComputeAggregateTypeSignature request data struct: " <<
sizeof(protocol::ComputeAggregateTypeSignature::Request) << std::endl;
std::cout << "GetDataTypeInfo server: " <<
sizeof(ServiceServer<protocol::GetDataTypeInfo>) << std::endl;
std::cout << "GetDataTypeInfo client: " <<
sizeof(ServiceClient<protocol::GetDataTypeInfo>) << std::endl;
}