Checking the max transfer payload length for generated types

This commit is contained in:
Pavel Kirienko
2014-03-10 15:51:59 +04:00
parent ee7a847ce0
commit 1f2b8bf006
@@ -95,6 +95,8 @@ struct ${t.cpp_type_name}
${':' if idx == 0 else ','} ${a.name}()
% endfor
{
enum { MaxByteLen = ::uavcan::BitLenToByteLen<MaxBitLen>::Result };
::uavcan::StaticAssert<int(MaxByteLen) <= int(::uavcan::MaxTransferPayloadLen)>::check();
#if UAVCAN_DEBUG
/*
* Cross-checking MaxBitLen provided by the DSDL compiler.