Interface IMessage
A generic SBE message with tag-based field API.
Inherited Members
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public interface IMessage : IFieldSet, ICloneable, IDisposable
Properties
BlockLength
Declaration
ushort BlockLength { get; }
Property Value
Type | Description |
---|---|
ushort | The root block length. |
Remarks
The root block length is the space reserved for the root level of the message, not counting any repeating groups or variable-length fields. The block length only represents message body fields; it does not include the length of the message header, which is a fixed size.
Buffer
Declaration
Span<byte> Buffer { get; }
Property Value
Type | Description |
---|---|
Span<byte> | The SBE-encoded memory region. |
MessageLength
Declaration
ushort MessageLength { get; }
Property Value
Type | Description |
---|---|
ushort | The length of the entire message, including the binary header, in bytes. |
SchemaID
Declaration
ushort SchemaID { get; }
Property Value
Type | Description |
---|---|
ushort | The identifier of the SBE Schema in which the message is defined. |
SchemaIdUsedForDecode
Declaration
ushort SchemaIdUsedForDecode { get; }
Property Value
Type | Description |
---|---|
ushort | The identifier of the SBE Schema that was used to decode this message. |
SchemaVersion
Declaration
ushort SchemaVersion { get; }
Property Value
Type | Description |
---|---|
ushort | The version of the SBE Schema in which the message is defined. |
SchemaVersionUsedForDecode
Declaration
ushort SchemaVersionUsedForDecode { get; }
Property Value
Type | Description |
---|---|
ushort | The version of the SBE Schema that was used to decode this message. |
SemanticType
Declaration
string SemanticType { get; }
Property Value
Type | Description |
---|---|
string | The message semantic type. |
TemplateID
Declaration
ushort TemplateID { get; }
Property Value
Type | Description |
---|---|
ushort | The message template identifier. |
Methods
Clone()
Clones the message object and the underlying memory region.
WARNING: This method pins the newly created data region, so it is slow.
Declaration
IMessage Clone()
Returns
Type | Description |
---|---|
IMessage | The cloned object. |