37 #if defined(ONIXS_ILINK3_CXX11) 40 template <
typename Message>
41 struct MaxMessageSizeTraits
43 static constexpr
bool UseCustomValue =
false;
47 template<
typename Message>
57 template<
typename Message>
59 typename std::enable_if<MaxMessageSizeTraits<Message>::UseCustomValue,
MessageSize>::type
67 template<
typename Message>
69 typename std::enable_if<!MaxMessageSizeTraits<Message>::UseCustomValue,
MessageSize>::type
72 return calculateMaxMessageSize<Message>(maxGroupItems);
76 template<
typename Message, UInt8 MaxGroupItems>
77 struct GetMaxMessageSize
79 enum {Size = getMaxMessageSize<Message>(MaxGroupItems)};
83 template<
typename Message>
88 Message::blockLength(Message::Schema::Version)
90 + Message::getMinimalVariableFieldsSize(Message::Schema::Version);
94 template<
typename Message>
95 struct GetMinMessageSize
97 enum {Size = getMinMessageSize<Message>()};
103 template<
typename Message, UInt8>
104 struct GetMaxMessageSize
110 template<
typename Message>
111 struct GetMinMessageSize
constexpr MessageSize calculateMaxMessageSize(UInt8 maxGroupItems)
Calculates the buffer size for a message with the given number of repeating group items...
#define ONIXS_ILINK3_CONST_OR_CONSTEXPR
#define ONIXS_ILINK3_MESSAGING_NAMESPACE_END
constexpr std::enable_if<!MaxMessageSizeTraits< Message >::UseCustomValue, MessageSize >::type getMaxMessageSize(UInt8 maxGroupItems)
Calculates the buffer size for a message with the given number of repeating group items...
UInt16 MessageSize
Message length type.
constexpr UInt16 MaxILink3MessageSize
Maximum supported message size.
#define ONIXS_ILINK3_MESSAGING_NAMESPACE_BEGIN