Skip to content
Start free evaluation

PDComm.SecsLimits

Struct

Resource limits that bound how SECS-II items are created, decoded and encoded.

public readonly struct SecsLimits

Limits are application policy, not SEMI defaults. They are checked before memory is committed, so an oversized or deeply nested input fails with PdcommStatus.LimitExceeded instead of exhausting memory. Nesting is additionally capped at 64 levels by the native library.

Members

SecsLimits

Constructor

Initializes a set of SECS-II limits.

public SecsLimits(nuint messageBytes, nuint itemBytes, nuint itemCount, nuint nestingDepth)

Parameters

NameDescription
messageBytesThe largest complete encoded item, in bytes, including every header.
itemBytesThe largest payload of one primitive item, in bytes.
itemCountThe largest number of items in the tree, counting every list and primitive.
nestingDepthThe largest nesting depth; a single item has depth 1.

ItemBytes

Property

Gets the largest payload of one primitive item, in bytes.

public nuint ItemBytes { get; }

ItemCount

Property

Gets the largest number of items in the tree, counting every list and primitive.

public nuint ItemCount { get; }

MessageBytes

Property

Gets the largest complete encoded item, in bytes, including every header.

public nuint MessageBytes { get; }

NestingDepth

Property

Gets the largest nesting depth; a single item has depth 1.

public nuint NestingDepth { get; }