• Version 1.16.0
Show / Hide Table of Contents

Class Decoder

FAST-to-FIX Decoder.

Inheritance
object
Coder
Decoder
Inherited Members
Coder.FixVersion
Coder.FixDictionary
Coder.CodeEachMessageIndependently
Coder.Reset()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OnixS.Fix.Fast
Assembly: OnixS.Fix.Engine.dll
Syntax
public class Decoder : Coder

Constructors

Decoder(Stream, IMessageInfoDictionary)

Constructor.

Declaration
public Decoder(Stream templateStream, IMessageInfoDictionary fixDictionary)
Parameters
Type Name Description
Stream templateStream

Stream with content of the FAST template.

IMessageInfoDictionary fixDictionary

The FIX dictionary to use for decoded messages.

Decoder(Stream, IMessageInfoDictionary, bool)

Constructor.

Declaration
public Decoder(Stream templateStream, IMessageInfoDictionary fixDictionary, bool codeEachMessageIndependently)
Parameters
Type Name Description
Stream templateStream

Stream with content of the FAST template.

IMessageInfoDictionary fixDictionary

The FIX dictionary to use for decoded messages.

bool codeEachMessageIndependently

Option to reset the previous values dictionaries.

Properties

FixMessageFactory

Returns message factory to use for creating decoded FIX message instance.

Declaration
public virtual FixMessageFactory FixMessageFactory { get; set; }
Property Value
Type Description
FixMessageFactory

FIX message factory.

MaximumNumberOfRepeatingGroupEntries

Returns maximum allowed number of repeating group entries. If the limit is exceeded then the exception is thrown. The default value is 1000.

Declaration
public uint MaximumNumberOfRepeatingGroupEntries { get; set; }
Property Value
Type Description
uint

Maximum number of repeating group entries.

Methods

Decode(ByteBuffer)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual Message Decode(ByteBuffer buffer)
Parameters
Type Name Description
ByteBuffer buffer

An array of bytes that contains the source FAST stream chunk.

Returns
Type Description
Message

Decoded FIX message or nulltt> if message cannot be decoded.

Exceptions
Type Condition
FastException

if error occurs

Decode(ByteBuffer, int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual Message Decode(ByteBuffer buffer, int offset)
Parameters
Type Name Description
ByteBuffer buffer

an array of bytes that contains the source FAST stream chunk

int offset

the zero-based byte offset in buffer at which to begin decoding

Returns
Type Description
Message

Decoded FIX message or nulltt> if message cannot be decoded.

Exceptions
Type Condition
FastException

if error occurs

Decode(DecodeResult, ByteBuffer)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual void Decode(DecodeResult result, ByteBuffer buffer)
Parameters
Type Name Description
DecodeResult result

Decode result to fill.

ByteBuffer buffer

An array of bytes that contains the source FAST stream chunk.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(DecodeResult, ByteBuffer, int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual void Decode(DecodeResult result, ByteBuffer buffer, int offset)
Parameters
Type Name Description
DecodeResult result

Decode result to fill.

ByteBuffer buffer

An array of bytes that contains the source FAST stream chunk.

int offset

The number of bytes from the beginning of the byte array to skip.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(DecodeResult, byte[])

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual void Decode(DecodeResult result, byte[] buffer)
Parameters
Type Name Description
DecodeResult result

Decode result to fill.

byte[] buffer

An array of bytes that contains the source FAST stream chunk.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

Decode(DecodeResult, byte[], int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual void Decode(DecodeResult result, byte[] buffer, int offset)
Parameters
Type Name Description
DecodeResult result

Decode result to fill.

byte[] buffer

An array of bytes that contains the source FAST stream chunk.

int offset

The number of bytes from the beginning of the byte array to skip.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(DecodeResult, byte[], int, int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual void Decode(DecodeResult result, byte[] buffer, int offset, int count)
Parameters
Type Name Description
DecodeResult result

Decode result to fill.

byte[] buffer

An array of bytes that contains the source FAST stream chunk.

int offset

The number of bytes from the beginning of the byte array to skip.

int count

The number of bytes to process.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(byte[])

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual Message Decode(byte[] buffer)
Parameters
Type Name Description
byte[] buffer

An array of bytes that contains the source FAST stream chunk.

Returns
Type Description
Message

Decoded FIX message.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(byte[], int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual Message Decode(byte[] buffer, int offset)
Parameters
Type Name Description
byte[] buffer

An array of bytes that contains the source FAST stream chunk.

int offset

The number of bytes from the beginning of the byte array to skip.

Returns
Type Description
Message

Decoded FIX message.

Exceptions
Type Condition
FastException

If decoding failed.

Decode(byte[], int, int)

Decodes the given FAST stream chunk into the corresponding FIX Message.

Declaration
public virtual Message Decode(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer

an array of bytes that contains the source FAST stream chunk

int offset

the zero-based byte offset in buffer at which to begin decoding

int count

the number of bytes to process

Returns
Type Description
Message

decoded FIX message or null if message cannot be decoded

Exceptions
Type Condition
FastException

if error occurs

DecodeByteVector(byte[], int)

Decodes FAST non-nullable byte vector value.

Declaration
public static DecodedValue<byte[]> DecodeByteVector(byte[] buffer, int offset)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents byte vector.

int offset

The number of bytes from the beginning of the byte array to skip.

Returns
Type Description
DecodedValue<byte[]>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

DecodeByteVector(byte[], int, int)

Decodes FAST non-nullable byte vector value.

Declaration
public static DecodedValue<byte[]> DecodeByteVector(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents byte vector.

int offset

The number of bytes from the beginning of the byte array to skip.

int count

The maximum number of bytes in the byte array to use.

Returns
Type Description
DecodedValue<byte[]>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

DecodeInt32(byte[], int)

Decodes FAST non-nullable Int32 value.

Declaration
public static DecodedValue<int> DecodeInt32(byte[] buffer, int offset)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents 32-bit signed integer.

int offset

The number of bytes from the beginning of the byte array to skip.

Returns
Type Description
DecodedValue<int>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

DecodeInt32(byte[], int, int)

Decodes FAST non-nullable Int32 value.

Declaration
public static DecodedValue<int> DecodeInt32(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents 32-bit signed integer.

int offset

The number of bytes from the beginning of the byte array to skip.

int count

The maximum number of bytes in the byte array to use.

Returns
Type Description
DecodedValue<int>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

DecodeUInt32(byte[], int)

Decodes FAST non-nullable uInt32 value.

Declaration
public static DecodedValue<uint> DecodeUInt32(byte[] buffer, int offset)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents 32-bit unsigned integer.

int offset

The number of bytes from the beginning of the byte array to skip.

Returns
Type Description
DecodedValue<uint>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

DecodeUInt32(byte[], int, int)

Decodes FAST non-nullable uInt32 value.

Declaration
public static DecodedValue<uint> DecodeUInt32(byte[] buffer, int offset, int count)
Parameters
Type Name Description
byte[] buffer

FAST-encoded data that represents 32-bit unsigned integer.

int offset

The number of bytes from the beginning of the byte array to skip.

int count

The maximum number of bytes in the byte array to use.

Returns
Type Description
DecodedValue<uint>

Decoded value.

Exceptions
Type Condition
SystemException

If wrong argument supplied.

FastException

If decoding failed.

Extension Methods

DecoderExtension.TryDecode(Decoder, DecodeResult, ByteBuffer)
DecoderExtension.TryDecode(Decoder, DecodeResult, ByteBuffer, int)
DecoderExtension.TryDecode(Decoder, DecodeResult, byte[])
DecoderExtension.TryDecode(Decoder, DecodeResult, byte[], int)
DecoderExtension.TryDecode(Decoder, DecodeResult, byte[], int, int)
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX