From 1f2b8bf006bbad63b923c4a4912119e9bb49d276 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Mon, 10 Mar 2014 15:51:59 +0400 Subject: [PATCH] Checking the max transfer payload length for generated types --- libuavcan/dsdl_compiler/data_type_template.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libuavcan/dsdl_compiler/data_type_template.tmpl b/libuavcan/dsdl_compiler/data_type_template.tmpl index 9035a49c54..c9639802fb 100644 --- a/libuavcan/dsdl_compiler/data_type_template.tmpl +++ b/libuavcan/dsdl_compiler/data_type_template.tmpl @@ -95,6 +95,8 @@ struct ${t.cpp_type_name} ${':' if idx == 0 else ','} ${a.name}() % endfor { + enum { MaxByteLen = ::uavcan::BitLenToByteLen::Result }; + ::uavcan::StaticAssert::check(); #if UAVCAN_DEBUG /* * Cross-checking MaxBitLen provided by the DSDL compiler.