pdcomm::secsLimits
Function
Builds a PdcommSecsLimits structure with struct_size already set.
inline PdcommSecsLimits secsLimits(size_t messageBytes, size_t itemBytes, size_t itemCount, size_t nestingDepth)The limits are application policy. Every SECS-II item and GEM message checks them before it allocates or sends anything.
const auto limits = pdcomm::secsLimits(1024, 512, 64, 8);
auto value = pdcomm::SecsItem::primitive(PDCOMM_SECS_U4,
std::vector<uint8_t>{0, 0, 0, 7}, limits);Parameters
| Name | Description |
|---|---|
messageBytes | Maximum encoded size of a whole item tree, headers included. |
itemBytes | Maximum payload size of any single primitive item. |
itemCount | Maximum number of items (lists and primitives) in one tree. |
nestingDepth | Maximum nesting depth. A primitive has depth 1. The native codec also caps the depth at 64. |
Returns
A ready-to-use limits structure.