Interface IEncoder
SBE encoder.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public interface IEncoder
Methods
Wrap(int, MemoryPointer)
Creates a new IMessage object and wraps the given memory region.
Declaration
IMessage Wrap(int templateId, MemoryPointer data)
Parameters
Type | Name | Description |
---|---|---|
int | templateId | Message template ID. |
MemoryPointer | data | Pointer to the memory region. |
Returns
Type | Description |
---|---|
IMessage | A new IMessage object that can write SBE-encoded data to the given memory region. |
Wrap(int, int)
Creates a new IMessage object and wraps a newly allocated memory region.
Declaration
IMessage Wrap(int templateId, int expectedMessageLength = 0)
Parameters
Type | Name | Description |
---|---|---|
int | templateId | Message template id |
int | expectedMessageLength | Expected message length.
- When |
Returns
Type | Description |
---|---|
IMessage | A new IMessage object that can write SBE-encoded data to the newly allocated memory region. |
WrapPreCreatedMessage(int, MemoryPointer)
Returns a pre-created IMessage object wrapped around the given memory region.
Declaration
IMessage WrapPreCreatedMessage(int templateId, MemoryPointer data)
Parameters
Type | Name | Description |
---|---|---|
int | templateId | Message template ID. |
MemoryPointer | data | Pointer to the memory region. |
Returns
Type | Description |
---|---|
IMessage | A pre-created IMessage object that can write SBE-encoded data to the given memory region. |
WrapPreCreatedMessage(int, int)
Returns a pre-created IMessage object wrapped around a newly created memory region.
Declaration
IMessage WrapPreCreatedMessage(int templateId, int expectedMessageLength = 0)
Parameters
Type | Name | Description |
---|---|---|
int | templateId | Message template ID. |
int | expectedMessageLength | Expected message length.
- When |
Returns
Type | Description |
---|---|
IMessage | A pre-created IMessage object that can write SBE-encoded data to the newly allocated memory region. |