B2BITS FIX Antenna HFT
1.0.16
|
The part of the FIX message storing persistent data and helpers. More...
#include <FIXMessageEx.h>
Public Member Functions | |
FIXMessageEx () | |
The constructor. More... | |
System::u64 | generateNewGlobalId () |
Generates the new globalMsgID for the message. More... | |
void | generateNewGlobalIdBeforeSend () |
Generates a new globalMsgID for the message before message is sent. More... | |
bool V12_API | getBinaryData (const char *&buffer, size_t &dataSize) const |
This function can be used to get original binary data of the message if it is applicable for the message and session in context. More... | |
const PersistentData & | getPersistentData () const |
Returns the persistent data from the message. More... | |
PersistentData & | getPersistentData () |
Returns the persistent data from the message. More... | |
const PersistentUserData & | getPersistentUserData () const |
Returns the user part of the persistent data from the message. More... | |
PersistentUserData & | getPersistentUserData () |
Returns the user part of the persistent data from the message. More... | |
System::u64 | getTimestamp () |
Returns the sending/receiving timestamp. More... | |
void * | getUserData () const |
Returns user data attached to the message instance. More... | |
bool | isFromGapQueue () const |
Checks whether the message is from gap(out-of-sequence) queue. More... | |
bool | needNewGlobIDBeforeSend () |
Returns true if the message is configured to generate a new globalMsgID for the message before the message is sent. More... | |
void | setNeedNewGlobIDBeforeSend (bool enable) |
Configures the message to generate a new globalMsgID for the message before the message is sent or to skip the generation. More... | |
const void | setPersistentData (const PersistentData &persistentData) |
Sets the persistent data to the message. More... | |
void | setPersistentUserData (const PersistentUserData &userData) |
Sets the user part of the persistent data to the message. More... | |
void | setTimestamp (System::u64 timestampUsec) |
Sets the sending/receiving timestamp. More... | |
void | setUserData (void *userData) |
Attaches the user data to the message instance. More... | |
Static Public Member Functions | |
static System::u64 | getCurrGlobalMsgId () |
Returns the last generated GlobalMsgId. More... | |
static void | seedGlobalMsgId (System::u64 globalMsgId) |
Initializes the global GlobalMsgId generator with the new start value. More... | |
Public Attributes | |
EngineTagData * | engineTagData_ |
This data field is used by the engine internaly, don't process or use it!. More... | |
bool | isFromGapQueue_ |
Flag indicating whatever this message is from gap(out-of-sequence) queue. More... | |
uint64_t | measuredLatency_ |
This data field is used to measure latency. More... | |
bool | needNewGlobIDBeforeSend_ |
The Generate-a-new-globalMsgID flag. More... | |
PersistentData | persistentData_ |
The persistent data assigned to the message instance. More... | |
System::u64 | timestampNanos_ |
The sending/receiving timestamp. More... | |
void * | userData_ |
The user data field. More... | |
The part of the FIX message storing persistent data and helpers.
|
inline |
The constructor.
References generateNewGlobalId().
|
inline |
Generates the new globalMsgID for the message.
References Engine::g_globalMsgIdGen, Engine::PersistentData::globalMsgID, Engine::GlobalMsgIdGen::newValue(), and persistentData_.
Referenced by FIXMessageEx().
|
inline |
Generates a new globalMsgID for the message before message is sent.
It is called for the LiteFixMessage as a part of the sending process.
References Engine::g_globalMsgIdGen, Engine::PersistentData::globalMsgID, needNewGlobIDBeforeSend_, Engine::GlobalMsgIdGen::newValue(), and persistentData_.
bool V12_API Engine::FIXMessageEx::getBinaryData | ( | const char *& | buffer, |
size_t & | dataSize | ||
) | const |
This function can be used to get original binary data of the message if it is applicable for the message and session in context.
If there is no binary data false is returned and true otherwise. Please note that the pointer returned is valid until message goes out of current context(scope). So if you need this data outside of the scope the function is called copy it to separate buffer. This note is more applicable for the case when LiteFixMessage is used along with pipelining when user returns LiteFixMessage back to the pool himself. Message life time is longer than context life time in this case and the note above is applicable.
|
inlinestatic |
Returns the last generated GlobalMsgId.
References Engine::GlobalMsgIdGen::curValue(), and Engine::g_globalMsgIdGen.
|
inline |
Returns the persistent data from the message.
References persistentData_.
Referenced by Engine::MsgPipeElem::returnObj().
|
inline |
Returns the persistent data from the message.
References persistentData_.
|
inline |
Returns the user part of the persistent data from the message.
References persistentData_, and Engine::PersistentData::userData.
|
inline |
Returns the user part of the persistent data from the message.
References persistentData_, and Engine::PersistentData::userData.
|
inline |
Returns the sending/receiving timestamp.
References persistentData_, and Engine::PersistentData::timestampUsec.
|
inline |
Returns user data attached to the message instance.
References userData_.
|
inline |
Checks whether the message is from gap(out-of-sequence) queue.
References isFromGapQueue_.
|
inline |
Returns true if the message is configured to generate a new globalMsgID for the message before the message is sent.
References needNewGlobIDBeforeSend_.
|
inlinestatic |
Initializes the global GlobalMsgId generator with the new start value.
References Engine::g_globalMsgIdGen, and Engine::GlobalMsgIdGen::reset().
|
inline |
Configures the message to generate a new globalMsgID for the message before the message is sent or to skip the generation.
enable | if it is true generation will be enabled. |
References needNewGlobIDBeforeSend_.
|
inline |
Sets the persistent data to the message.
The data will be stored in the in/out sessions logs with the message.
persistentData | data to assign |
References persistentData_.
|
inline |
Sets the user part of the persistent data to the message.
The data will be stored in the in/out sessions logs with the message.
userData | The user data to assign |
References persistentData_, and Engine::PersistentData::userData.
|
inline |
Sets the sending/receiving timestamp.
References persistentData_, and Engine::PersistentData::timestampUsec.
Referenced by fix_algo::reorderSMHForMiax().
|
inline |
Attaches the user data to the message instance.
References userData_.
EngineTagData* Engine::FIXMessageEx::engineTagData_ |
This data field is used by the engine internaly, don't process or use it!.
bool Engine::FIXMessageEx::isFromGapQueue_ |
Flag indicating whatever this message is from gap(out-of-sequence) queue.
Referenced by isFromGapQueue().
|
mutable |
This data field is used to measure latency.
bool Engine::FIXMessageEx::needNewGlobIDBeforeSend_ |
The Generate-a-new-globalMsgID flag.
Referenced by generateNewGlobalIdBeforeSend(), needNewGlobIDBeforeSend(), and setNeedNewGlobIDBeforeSend().
PersistentData Engine::FIXMessageEx::persistentData_ |
The persistent data assigned to the message instance.
Referenced by generateNewGlobalId(), generateNewGlobalIdBeforeSend(), getPersistentData(), getPersistentUserData(), getTimestamp(), setPersistentData(), setPersistentUserData(), and setTimestamp().
System::u64 Engine::FIXMessageEx::timestampNanos_ |
The sending/receiving timestamp.
void* Engine::FIXMessageEx::userData_ |
The user data field.
Referenced by getUserData(), and setUserData().