Skip to content
Start free evaluation

PDComm.HsmsEventInfo

Struct

Describes one HsmsEvent.

public readonly record struct HsmsEventInfo

The meaning of HsmsEventInfo.Code, HsmsEventInfo.Detail, HsmsEventInfo.Value1 and HsmsEventInfo.Value2 depends on HsmsEventInfo.Kind; see HsmsFailureReason, HsmsProtocolError, HsmsFrameError, HsmsIoOperation and HsmsIoErrorKind. Fields that do not apply to the kind are zero.

Parameters

NameDescription
KindThe event kind.
FromStateFor HsmsEventKind.StateChanged, the previous connection state.
ToStateFor HsmsEventKind.StateChanged, the new connection state.
CodeThe failure reason, protocol error or failed socket operation, depending on Kind.
DetailThe frame error of an invalid frame, or the I/O error kind of a transport error.
Value1The first kind-specific value, for example a required size or a rejected message type.
Value2The second kind-specific value, for example a limit or a reject reason.
TokenThe transaction the event belongs to: the request for a reply or failure, or the received primary's system bytes. Zero for state changes.
HeaderThe message header, or null when the event has none.
IsReplyWhether a received message is the reply to one of this endpoint's requests.
AbortedWhether a received reply is an abort (function 0) instead of a normal reply.
BodyLengthThe size of the received message body, in bytes; zero when there is none.

Members

HsmsEventInfo

Constructor

Describes one HsmsEvent.

public HsmsEventInfo(HsmsEventKind Kind, HsmsConnectionState FromState, HsmsConnectionState ToState, uint Code, uint Detail, ulong Value1, ulong Value2, HsmsToken Token, HsmsHeader? Header, bool IsReply, bool Aborted, nuint BodyLength)

The meaning of HsmsEventInfo.Code, HsmsEventInfo.Detail, HsmsEventInfo.Value1 and HsmsEventInfo.Value2 depends on HsmsEventInfo.Kind; see HsmsFailureReason, HsmsProtocolError, HsmsFrameError, HsmsIoOperation and HsmsIoErrorKind. Fields that do not apply to the kind are zero.

Parameters

NameDescription
KindThe event kind.
FromStateFor HsmsEventKind.StateChanged, the previous connection state.
ToStateFor HsmsEventKind.StateChanged, the new connection state.
CodeThe failure reason, protocol error or failed socket operation, depending on Kind.
DetailThe frame error of an invalid frame, or the I/O error kind of a transport error.
Value1The first kind-specific value, for example a required size or a rejected message type.
Value2The second kind-specific value, for example a limit or a reject reason.
TokenThe transaction the event belongs to: the request for a reply or failure, or the received primary's system bytes. Zero for state changes.
HeaderThe message header, or null when the event has none.
IsReplyWhether a received message is the reply to one of this endpoint's requests.
AbortedWhether a received reply is an abort (function 0) instead of a normal reply.
BodyLengthThe size of the received message body, in bytes; zero when there is none.

Aborted

Property

Whether a received reply is an abort (function 0) instead of a normal reply.

public bool Aborted { get; init; }

BodyLength

Property

The size of the received message body, in bytes; zero when there is none.

public nuint BodyLength { get; init; }

Code

Property

The failure reason, protocol error or failed socket operation, depending on Kind.

public uint Code { get; init; }

Detail

Property

The frame error of an invalid frame, or the I/O error kind of a transport error.

public uint Detail { get; init; }

FromState

Property

For HsmsEventKind.StateChanged, the previous connection state.

public HsmsConnectionState FromState { get; init; }

Property

The message header, or null when the event has none.

public HsmsHeader? Header { get; init; }

IsReply

Property

Whether a received message is the reply to one of this endpoint's requests.

public bool IsReply { get; init; }

Kind

Property

The event kind.

public HsmsEventKind Kind { get; init; }

ToState

Property

For HsmsEventKind.StateChanged, the new connection state.

public HsmsConnectionState ToState { get; init; }

Token

Property

The transaction the event belongs to: the request for a reply or failure, or the received primary's system bytes. Zero for state changes.

public HsmsToken Token { get; init; }

Value1

Property

The first kind-specific value, for example a required size or a rejected message type.

public ulong Value1 { get; init; }

Value2

Property

The second kind-specific value, for example a limit or a reject reason.

public ulong Value2 { get; init; }