• Programming Guide
  • Api Documentation
  • OnixS .NET Core / .NET 6 FIX Engine, version 1.9.0
Show / Hide Table of Contents
  • OnixS.Fix
    • ByteBuffer
    • BytesReceivedEventHandler
    • CertificateValidationArgs
    • Dictionary
    • EncryptionMethod
    • Engine
    • Engine.State
    • EngineErrorEventArgs
    • EngineErrorReason
    • EngineException
    • EngineSettings
    • EngineSettings.Default
    • EngineSettings.Key
    • EngineSslSettings
    • EngineWarningEventArgs
    • EngineWarningReason
    • Field
    • FieldSet
    • FieldSet.FieldEnumerator
    • FixStringFormat
    • FlatGroupReader
    • FlatMessage
    • FlatMessage.FieldIterator
    • Group
    • Group.GroupInstanceEnumerator
    • GroupInstance
    • HighResolutionTimeSpan
    • HighResolutionTimestamp
    • IFieldSet
    • IMessage
    • InboundMessageEventArgs
    • IncomingTelecommunicationLinkEventArgs
    • ISession
    • ITimestampProvider
    • KnownSerializedFieldKeys
    • Message
    • MessageEventArgs
    • MessageMemoryPool
    • MessageMemoryPoolSettings
    • MessageMode
    • MessageResendingEventArgs
    • MessageSendingEventArgs
    • MessageValidationFlags
    • PortRange
    • ProtocolVersion
    • ProtocolVersionExtensions
    • ProtocolVersionHelper
    • ProxySettings
    • ProxyType
    • RemoteCertificateNameMismatchOption
    • RemoteCertificateValidationCallback
    • SerializedFieldKey
    • SerializedFieldRef
    • SerializedMessage
    • Session
    • SessionErrorEventArgs
    • SessionErrorReason
    • SessionId
    • SessionRole
    • SessionState
    • SessionStateChangeEventArgs
    • SessionStorageType
    • SessionWarningEventArgs
    • SessionWarningReason
    • SslSettings
    • TimeSpanFormat
    • TimestampFormat
    • UnknownIncomingConnectionEventArgs
  • OnixS.Fix.Dictionaries
    • DictionaryException
    • DictionaryManager
    • FieldContainerInfo
    • FieldInfo
    • FieldType
    • FieldTypeInfo
    • FieldValueInfo
    • MessageInfo
    • MessageInfoExtensions
  • OnixS.Fix.Exceptions
    • CannotEstablishLinkException
    • EmptyGroupException
    • EngineAlreadyInitializedException
    • EngineIsNotInitializedException
    • FirstMessageNotLogonException
    • IncorrectCheckSumException
    • IncorrectFieldValueException
    • IndexNotFoundException
    • InstanceIndexOutOfRangeException
    • InvalidInboundLogonException
    • InvalidMsgTypeException
    • InvalidNumberOfRepeatingGroupInstances
    • LicenseException
    • LicenseExpiredException
    • LicenseNotFoundException
    • LinkErrorException
    • LogonReplyException
    • LogonReplyTimeoutException
    • LogoutReplyTimeoutException
    • ParserException
    • ParserException.RejectReason
    • RequiredTagMissingException
    • SessionException
    • StorageException
    • TagNotDefinedForThisMessageTypeException
    • TagNotFoundException
    • TagSpecifiedOutOfRequiredOrderException
    • TagSpecifiedWithoutValueException
    • UnexpectedSequenceNumberException
  • OnixS.Fix.Fast
    • Coder
    • DecodedValue<T>
    • Decoder
    • DecodeResult
    • DecoderExtension
    • DictionaryBuilder
    • DynamicErrorException
    • DynamicErrorException.ErrorCode
    • Encoder
    • FastErrorCode
    • FastException
    • FixMessageFactory
    • NotEnoughInputDataException
    • StaticErrorException
    • StaticErrorException.ErrorCode
  • OnixS.Fix.Fix2FixmlConverter
    • FixmlConverter
    • FixmlConverterException
  • OnixS.Fix.Properties
    • Resources
  • OnixS.Fix.Scheduling
    • AcceptorConnectionSettings
    • CounterpartySettings
    • InitiatorConnectingEventArgs
    • InitiatorConnectionSettings
    • Scheduler
    • SequenceNumberResetPolicy
    • SessionConnectionSettings
    • SessionDuration
    • SessionErrorEventArgs
    • SessionEventArgs
    • SessionLoggingOutEventArgs
    • SessionSchedule
    • SessionWarningEventArgs
  • OnixS.Fix.Storage
    • ISessionStorage

Class Encoder

FIX-to-FAST Encoder.

Inheritance
Object
Coder
Encoder
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 Encoder : Coder

Constructors

Encoder(Stream, Dictionary)

Constructor.

Declaration
public Encoder(Stream templateStream, Dictionary fixDictionary)
Parameters
Type Name Description
Stream templateStream

Stream with content of the FAST template.

Dictionary fixDictionary

The FIX dictionary to use.

Encoder(Stream, Dictionary, Boolean)

Constructor.

Declaration
public Encoder(Stream templateStream, Dictionary fixDictionary, bool codeEachMessageIndependently)
Parameters
Type Name Description
Stream templateStream

Stream with content of the FAST template.

Dictionary fixDictionary

The FIX dictionary to use.

Boolean codeEachMessageIndependently

Option to reset the previous values dictionaries.

Methods

Encode(Message)

Encodes the given FIX message into a FAST stream chunk. The template is selected automatically with the max id for the specific FIX message type.

Declaration
public virtual byte[] Encode(Message message)
Parameters
Type Name Description
Message message

Input FIX message.

Returns
Type Description
Byte[]

FAST-encoded data that represents the encoded message.

Exceptions
Type Condition
FastException

If encoding failed.

Encode(Message, ByteBuffer)

Declaration
public virtual void Encode(Message message, ByteBuffer buffer)
Parameters
Type Name Description
Message message

Input FIX message.

ByteBuffer buffer

Buffer to receive th FAST-encoded data that represents the encoded message.

Exceptions
Type Condition
FastException

If encoding failed.

Encode(Message, Int32)

Encodes the given FIX message into a FAST stream chunk.

Declaration
public virtual byte[] Encode(Message message, int templateId)
Parameters
Type Name Description
Message message

Input FIX message.

Int32 templateId

Template id to use.

Returns
Type Description
Byte[]

FAST-encoded data that represents the encoded message.

Exceptions
Type Condition
FastException

If encoding failed.

Encode(Message, Int32, ByteBuffer)

Declaration
public virtual void Encode(Message message, int templateId, ByteBuffer buffer)
Parameters
Type Name Description
Message message

Input FIX message.

Int32 templateId

Template id to use.

ByteBuffer buffer

Buffer to receive th FAST-encoded data that represents the encoded message.

Exceptions
Type Condition
FastException

If encoding failed.

EncodeByteVector(Byte[])

Encodes byte array to the FAST byteVector format.

Declaration
public static byte[] EncodeByteVector(byte[] value)
Parameters
Type Name Description
Byte[] value

Array to encode.

Returns
Type Description
Byte[]

Byte array with encoded value.

EncodeInt32(Int32)

Encodes signed 32-bit integer value to the FAST int32 format.

Declaration
public static byte[] EncodeInt32(int value)
Parameters
Type Name Description
Int32 value

Value to encode.

Returns
Type Description
Byte[]

Byte array with encoded value.

EncodeUInt32(UInt32)

Encodes unsigned 32-bit integer to the FAST uInt32 format.

Declaration
public static byte[] EncodeUInt32(uint value)
Parameters
Type Name Description
UInt32 value

Value to encode.

Returns
Type Description
Byte[]

Byte array with encoded value.

In This Article
Back to top Copyright © Onix Solutions.
Generated by DocFX