Class RawFixUtil
Inheritance
System.Object
RawFixUtil
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FixAntenna.Message.dll
Syntax
public sealed class RawFixUtil
Fields
Declaration
public static readonly DefaultRawTags DefaultRawTags
Field Value
Methods
CopyValue(Byte[], Int32, Int32)
Declaration
public static byte[] CopyValue(byte[] message, int valueStartIndex, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
|
System.Int32 |
valueStartIndex |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Byte[] |
|
CopyValueUsePool(Byte[], Int32, Int32)
Declaration
public static byte[] CopyValueUsePool(byte[] message, int valueStartIndex, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
|
System.Int32 |
valueStartIndex |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Byte[] |
|
Creates RawTags from array of int.
Declaration
public static RawFixUtil.IRawTags CreateRawTags(int[] rawTags)
Parameters
Type |
Name |
Description |
System.Int32[] |
rawTags |
|
Returns
Creates RawTags from string. The raw tags should be separate by ',' , ' ' or '.'.
Declaration
public static RawFixUtil.IRawTags CreateRawTags(string rawTags)
Parameters
Type |
Name |
Description |
System.String |
rawTags |
|
Returns
FieldListObjectsCreated()
Declaration
public static int FieldListObjectsCreated()
Returns
Type |
Description |
System.Int32 |
|
FieldObjectsCreated()
Declaration
public static int FieldObjectsCreated()
Returns
Type |
Description |
System.Int32 |
|
GetAllRawValues(Byte[], Int32, Int32, Int32)
Gets the value from buffer as bytes.
Declaration
public static IList<byte[]> GetAllRawValues(byte[] buffer, int offset, int length, int tag)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
the buffer of bytes
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the buffer length
|
System.Int32 |
tag |
the tag id
|
Returns
Type |
Description |
System.Collections.Generic.IList<System.Byte[]> |
|
GetChecksum(Byte[])
Calculates checksum in array of bytes.
Declaration
public static int GetChecksum(byte[] bytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
array of bytes
|
Returns
Type |
Description |
System.Int32 |
|
GetChecksum(Byte[], Int32, Int32)
Calculates checksum in array of bytes.
Declaration
public static int GetChecksum(byte[] bytes, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
the array of bytes
|
System.Int32 |
offset |
the offset in array of bytes
|
System.Int32 |
length |
the length of bytes
|
Returns
Type |
Description |
System.Int32 |
|
GetChecksum(Byte[][], Int32, Int32)
Calculates checksum in matrix of bytes.
Declaration
public static int GetChecksum(byte[][] bytes, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[][] |
bytes |
the array of bytes
|
System.Int32 |
offset |
the offset in array of bytes
|
System.Int32 |
length |
the length of bytes
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
public static FixMessage GetFixMessage(FixMessage target, MsgBuf buf, RawFixUtil.IRawTags rawTags, bool clearTheMessageBeforeUse)
Parameters
Returns
Declaration
public static FixMessage GetFixMessage(FixMessage list, byte[] message, int messageOffset, int messageLength, RawFixUtil.IRawTags rawTags)
Parameters
Returns
Declaration
public static FixMessage GetFixMessage(FixMessage list, byte[] message, int messageOffset, int messageLength, RawFixUtil.IRawTags rawTags, bool clearTheMessageBeforeUse)
Parameters
Type |
Name |
Description |
FixMessage |
list |
|
System.Byte[] |
message |
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
RawFixUtil.IRawTags |
rawTags |
|
System.Boolean |
clearTheMessageBeforeUse |
|
Returns
GetFixMessage(MsgBuf)
Declaration
public static FixMessage GetFixMessage(MsgBuf buf)
Parameters
Type |
Name |
Description |
MsgBuf |
buf |
|
Returns
Declaration
public static FixMessage GetFixMessage(MsgBuf buf, RawFixUtil.IRawTags rawTags)
Parameters
Returns
GetFixMessage(Byte[])
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessage(byte[] message)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
Returns
Exceptions
Declaration
public static FixMessage GetFixMessage(byte[] message, RawFixUtil.IRawTags rawTags)
Parameters
Returns
GetFixMessage(Byte[], Boolean, Boolean)
Declaration
public static FixMessage GetFixMessage(byte[] message, bool usePool, bool isUserOwned)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
|
System.Boolean |
usePool |
|
System.Boolean |
isUserOwned |
|
Returns
GetFixMessage(Byte[], Int32, Int32)
Declaration
public static FixMessage GetFixMessage(byte[] buffer, int messageOffset, int messageLength)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
Returns
Declaration
public static FixMessage GetFixMessage(byte[] message, int messageOffset, int messageLength, RawFixUtil.IRawTags rawTags)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
RawFixUtil.IRawTags |
rawTags |
|
Returns
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessage(byte[] message, int messageOffset, int messageLength, RawFixUtil.IRawTags rawTags, bool allocateFromPool, bool isUserOwned)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
RawFixUtil.IRawTags |
rawTags |
the raw tags
|
System.Boolean |
allocateFromPool |
|
System.Boolean |
isUserOwned |
|
Returns
Type |
Description |
FixMessage |
instance of parsed message
|
Exceptions
GetFixMessage(Byte[], Int32, Int32, Int32[])
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessage(byte[] message, int messageOffset, int messageLength, int[] rawTags)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
System.Int32[] |
rawTags |
the raw tags
|
Returns
Exceptions
GetFixMessage(Byte[], Int32[])
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessage(byte[] message, int[] rawTags)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
System.Int32[] |
rawTags |
the raw tags
|
Returns
Exceptions
GetFixMessage(String)
Declaration
public static FixMessage GetFixMessage(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
Returns
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessageUntilTagsExists(byte[] message, int messageOffset, int messageLength, RawFixUtil.IRawTags rawTags)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
System.Int32 |
messageOffset |
|
System.Int32 |
messageLength |
|
RawFixUtil.IRawTags |
rawTags |
the raw tags
|
Returns
Type |
Description |
FixMessage |
instance of parsed message
|
Exceptions
Parses fix message from array of bytes.
Declaration
public static FixMessage GetFixMessageUtilTagsExists(byte[] message)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
Returns
Exceptions
GetLongValue(Byte[], Int32, Int32, Int32)
Gets the value from buffer as long.
Declaration
public static long GetLongValue(byte[] buffer, int offset, int length, int tag)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
the buffer of bytes
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the buffer length
|
System.Int32 |
tag |
the tag id
|
Returns
Type |
Description |
System.Int64 |
|
Exceptions
Type |
Condition |
System.ArgumentException |
if tag not exists
|
GetLongValue(Byte[], Int32, Int32, Int32, Boolean)
Gets the value from buffer as long.
Declaration
public static long GetLongValue(byte[] buffer, int offset, int length, int tag, bool searchFromStart)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
the buffer of bytes
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the buffer length
|
System.Int32 |
tag |
the tag id
|
System.Boolean |
searchFromStart |
search from the start or end buffer
|
Returns
Type |
Description |
System.Int64 |
|
Exceptions
Type |
Condition |
System.ArgumentException |
if tag not exists
|
GetMessageType(Byte[])
Gets the message type.
If type is unknown return empty array.
Declaration
public static byte[] GetMessageType(byte[] bytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
the message
|
Returns
Type |
Description |
System.Byte[] |
|
GetMessageType(Byte[], Int32, Int32)
Gets the message type.
If type is unknown return empty array.
Declaration
public static byte[] GetMessageType(byte[] bytes, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
the message
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Byte[] |
|
GetMsgType(IndexedStorage)
Declaration
public static string GetMsgType(IndexedStorage msg)
Parameters
Returns
Type |
Description |
System.String |
|
GetRawTagLengthFromPreviousField(FixMessage)
Declaration
public static int GetRawTagLengthFromPreviousField(FixMessage list)
Parameters
Returns
Type |
Description |
System.Int32 |
|
GetRawValue(Byte[], Int32, Int32, Int32)
Gets the value from buffer as bytes.
Declaration
public static byte[] GetRawValue(byte[] buffer, int offset, int length, int tag)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
the buffer of bytes
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the buffer length
|
System.Int32 |
tag |
the tag id
|
Returns
Type |
Description |
System.Byte[] |
|
GetRawValue(Byte[], Int32, Int32, Int32, Boolean)
Gets the value from buffer as bytes.
Declaration
public static byte[] GetRawValue(byte[] buffer, int offset, int length, int tag, bool searchFromStart)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
the buffer of bytes
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the buffer length
|
System.Int32 |
tag |
the tag id
|
System.Boolean |
searchFromStart |
search from start or end of the given buffer
|
Returns
Type |
Description |
System.Byte[] |
|
GetSequenceNumber(Byte[])
Declaration
public static long GetSequenceNumber(byte[] message)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
Returns
Type |
Description |
System.Int64 |
|
Exceptions
Type |
Condition |
System.ArgumentException |
if tag not exists
|
GetSequenceNumber(Byte[], Int32, Int32)
Declaration
public static long GetSequenceNumber(byte[] message, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the buffer of bytes
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Int64 |
|
Exceptions
Type |
Condition |
System.ArgumentException |
if tag not exists
|
GetStartValueFromEndBuffer(Byte[], Int32, Int32, Int32)
Declaration
public static int GetStartValueFromEndBuffer(byte[] buffer, int offset, int length, int tagId)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
System.Int32 |
tagId |
|
Returns
Type |
Description |
System.Int32 |
|
GetStartValueFromStartBuffer(Byte[], Int32, Int32, Int32)
Declaration
public static int GetStartValueFromStartBuffer(byte[] buffer, int offset, int length, int tagId)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
System.Int32 |
tagId |
|
Returns
Type |
Description |
System.Int32 |
|
IndexRepeatingGroup(FixMessage)
Creates index by dictionary for repeating group.
After calling this method, its possible to use Repeating Group API
Version and type of message will be got from message
Validation is turn off
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg)
Parameters
Type |
Name |
Description |
FixMessage |
msg |
message for indexing
|
Returns
IndexRepeatingGroup(FixMessage, FixVersion, Boolean)
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersion version, bool validation)
Parameters
Returns
IndexRepeatingGroup(FixMessage, FixVersion, String)
Creates index by dictionary for repeating group.
After calling this method, its possible to use Repeating Group API
Validation is turn off
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersion version, string msgType)
Parameters
Type |
Name |
Description |
FixMessage |
msg |
message for indexing
|
FixVersion |
version |
version for passed message. Used for choose dictionary for indexing message
|
System.String |
msgType |
type of passed message. Used for indexing message.
|
Returns
IndexRepeatingGroup(FixMessage, FixVersion, String, Boolean)
Creates index by dictionary for repeating group.
After calling this method, its possible to use Repeating Group API
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersion version, string msgType, bool validation)
Parameters
Type |
Name |
Description |
FixMessage |
msg |
message for indexing
|
FixVersion |
version |
version for passed message. Used for choose dictionary for indexing message
|
System.String |
msgType |
type of passed message. Used for indexing message.
|
System.Boolean |
validation |
turn on/off validation
|
Returns
IndexRepeatingGroup(FixMessage, FixVersionContainer, Boolean)
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersionContainer version, bool validation)
Parameters
Returns
IndexRepeatingGroup(FixMessage, FixVersionContainer, String)
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersionContainer version, string msgType)
Parameters
Returns
IndexRepeatingGroup(FixMessage, FixVersionContainer, String, Boolean)
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, FixVersionContainer version, string msgType, bool validation)
Parameters
Returns
IndexRepeatingGroup(FixMessage, Boolean)
Creates index by dictionary for repeating group.
After calling this method, its possible to use Repeating Group API
Version and type of message will be got from message
Declaration
public static FixMessage IndexRepeatingGroup(FixMessage msg, bool validation)
Parameters
Type |
Name |
Description |
FixMessage |
msg |
message for indexing
|
System.Boolean |
validation |
turn on/off validation
|
Returns
IsLogon(FixMessage)
Checks if message type is Logon.
Declaration
public static bool IsLogon(FixMessage fixMessage)
Parameters
Returns
Type |
Description |
System.Boolean |
true if is
|
IsLogon(Byte[])
Checks if message type is Logon.
Declaration
public static bool IsLogon(byte[] msgType)
Parameters
Type |
Name |
Description |
System.Byte[] |
msgType |
the message type, parameter must be not null
|
Returns
Type |
Description |
System.Boolean |
true if is
|
IsLogon(String)
Checks if message type is Logon.
Declaration
public static bool IsLogon(string msgType)
Parameters
Type |
Name |
Description |
System.String |
msgType |
the message type, parameter must be not null
|
Returns
Type |
Description |
System.Boolean |
true if is
|
IsSessionLevelMessage(FixMessage)
Declaration
public static bool IsSessionLevelMessage(FixMessage message)
Parameters
Returns
Type |
Description |
System.Boolean |
|
IsSessionLevelMessage(Byte[])
Checks the message session level type.
Declaration
public static bool IsSessionLevelMessage(byte[] message)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the fix message
|
Returns
Type |
Description |
System.Boolean |
true if message is level session message
|
IsSessionLevelMessage(Byte[], Int32, Int32)
Checks the message session level type.
Declaration
public static bool IsSessionLevelMessage(byte[] message, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
the fix message
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Boolean |
true if message is level session message
|
IsSessionLevelType(Byte, Int32)
Declaration
public static bool IsSessionLevelType(byte msgType, int length)
Parameters
Type |
Name |
Description |
System.Byte |
msgType |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Boolean |
|
IsSessionLevelType(Byte[])
Checks the message session level type.
Declaration
public static bool IsSessionLevelType(byte[] msgType)
Parameters
Type |
Name |
Description |
System.Byte[] |
msgType |
the fix message
|
Returns
Type |
Description |
System.Boolean |
true if message is level session message
|
IsSessionLevelType(String)
Checks the message session level type.
Declaration
public static bool IsSessionLevelType(string msgType)
Parameters
Type |
Name |
Description |
System.String |
msgType |
the message type
|
Returns
Type |
Description |
System.Boolean |
true if message is level session message
|
ReturnObj(FixMessage)
Declaration
public static void ReturnObj(FixMessage fixMessage)
Parameters
ReturnObj(TagValue)
Declaration
public static void ReturnObj(TagValue field)
Parameters