PDComm.HsmsEventInfo
Struct
Describes one HsmsEvent.
public readonly record struct HsmsEventInfoThe 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
| Name | Description |
|---|---|
Kind | The event kind. |
FromState | For HsmsEventKind.StateChanged, the previous connection state. |
ToState | For HsmsEventKind.StateChanged, the new connection state. |
Code | The failure reason, protocol error or failed socket operation, depending on Kind. |
Detail | The frame error of an invalid frame, or the I/O error kind of a transport error. |
Value1 | The first kind-specific value, for example a required size or a rejected message type. |
Value2 | The second kind-specific value, for example a limit or a reject reason. |
Token | The transaction the event belongs to: the request for a reply or failure, or the received primary's system bytes. Zero for state changes. |
Header | The message header, or null when the event has none. |
IsReply | Whether a received message is the reply to one of this endpoint's requests. |
Aborted | Whether a received reply is an abort (function 0) instead of a normal reply. |
BodyLength | The 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
| Name | Description |
|---|---|
Kind | The event kind. |
FromState | For HsmsEventKind.StateChanged, the previous connection state. |
ToState | For HsmsEventKind.StateChanged, the new connection state. |
Code | The failure reason, protocol error or failed socket operation, depending on Kind. |
Detail | The frame error of an invalid frame, or the I/O error kind of a transport error. |
Value1 | The first kind-specific value, for example a required size or a rejected message type. |
Value2 | The second kind-specific value, for example a limit or a reject reason. |
Token | The transaction the event belongs to: the request for a reply or failure, or the received primary's system bytes. Zero for state changes. |
Header | The message header, or null when the event has none. |
IsReply | Whether a received message is the reply to one of this endpoint's requests. |
Aborted | Whether a received reply is an abort (function 0) instead of a normal reply. |
BodyLength | The 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; }Header
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; }