PDComm.HsmsOptions
Class
Options for an HSMS (SEMI E37) endpoint: role, session, timers and resource limits.
public sealed record HsmsOptionsEvery value is explicit application policy; the binding does not apply SEMI default timers. Every timer, timeout and capacity must be nonzero, otherwise endpoint creation fails with PdcommStatus.InvalidArgument.
An HSMS frame is a 4-byte length field, a 10-byte header and the message body, so the largest body is HsmsOptions.MaxFrameBytes minus 14. Creation fails with PdcommStatus.LimitExceeded unless HsmsOptions.MaxFrameBytes is at least 14, HsmsOptions.MaxWriteBytes is at least HsmsOptions.MaxFrameBytes, HsmsOptions.MaxApplicationBytes is at least HsmsOptions.MaxFrameBytes minus 14, and HsmsOptions.MaxEvents is at least 72 (two events for each of the 32 transactions an endpoint can have open, plus 8).
Members
HsmsOptions
Constructor
Initializes a new instance with default values.
public HsmsOptions()Notes
- Set every
requiredproperty of the type in an object initializer.
ConnectTimeoutMilliseconds
Property
Gets the TCP connect timeout of an active endpoint, in milliseconds. HsmsEndpoint.Poll can block for up to this long during a connection attempt.
public required ulong ConnectTimeoutMilliseconds { get; init; }InitialSystemBytes
Property
Gets the first system bytes value this endpoint uses for its own requests.
public required uint InitialSystemBytes { get; init; }ItemLimits
Property
Gets the limits applied to SECS-II message bodies.
public required SecsLimits ItemLimits { get; init; }MaxApplicationBytes
Property
Gets the largest total body size, in bytes, of events waiting for HsmsEndpoint.NextEvent.
public required nuint MaxApplicationBytes { get; init; }MaxApplicationEvents
Property
Gets the capacity of the queue of events waiting for HsmsEndpoint.NextEvent.
public required nuint MaxApplicationEvents { get; init; }MaxEvents
Property
Gets the capacity of the session's internal event queue; at least 72.
public required nuint MaxEvents { get; init; }MaxFrameBytes
Property
Gets the largest frame, in bytes, that the endpoint sends or accepts, including the 14 framing bytes.
public required nuint MaxFrameBytes { get; init; }MaxIoChunk
Property
Gets the largest number of bytes read or written by one socket call.
public required nuint MaxIoChunk { get; init; }MaxQueuedBytes
Property
Gets the largest total body size, in bytes, held in the session's internal event queue.
public required nuint MaxQueuedBytes { get; init; }MaxWriteBytes
Property
Gets the largest total size, in bytes, of frames waiting to be written.
public required nuint MaxWriteBytes { get; init; }MaxWriteFrames
Property
Gets the largest number of frames waiting to be written.
public required nuint MaxWriteFrames { get; init; }Mode
Property
Gets whether the endpoint connects (HsmsMode.Active) or listens (HsmsMode.Passive).
public required HsmsMode Mode { get; init; }PollBudget
Property
Gets the largest number of internal actions one HsmsEndpoint.Poll performs.
public required nuint PollBudget { get; init; }SessionId
Property
Gets the HSMS session ID (device ID) carried in data message headers.
public required ushort SessionId { get; init; }ShutdownTimeoutMilliseconds
Property
Gets how long a stop may take to close the connection gracefully, in milliseconds.
public required ulong ShutdownTimeoutMilliseconds { get; init; }T3Milliseconds
Property
Gets the T3 reply timeout, in milliseconds: how long a request waits for its reply.
public required ulong T3Milliseconds { get; init; }T5Milliseconds
Property
Gets the T5 connect separation timeout, in milliseconds: the wait before an active endpoint reconnects.
public required ulong T5Milliseconds { get; init; }T6Milliseconds
Property
Gets the T6 control transaction timeout, in milliseconds: how long Select, Deselect or Linktest waits.
public required ulong T6Milliseconds { get; init; }T7Milliseconds
Property
Gets the T7 not-selected timeout, in milliseconds: how long a connection may stay not selected.
public required ulong T7Milliseconds { get; init; }T8Milliseconds
Property
Gets the T8 network intercharacter timeout, in milliseconds, between bytes of one frame.
public required ulong T8Milliseconds { get; init; }WriteTimeoutMilliseconds
Property
Gets how long a frame write may stall before the connection is treated as failed, in milliseconds.
public required ulong WriteTimeoutMilliseconds { get; init; }