libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
isimud::exchanges::FIX::common Namespace Reference

Classes

class  client_to_exchange_transformations
 An FIX-protocol message handler. More...
 
class  connectivity_policy
 An implementation of the connectivity policy for the FIX protocol. More...
 
class  exchange_to_client_transformations
 A FIX-protocol-to-client message handler. More...
 
class  Header
 
struct  logoff_args_t
 
struct  logon_args_t
 
class  Message
 The basic, underlying type used to implement FIX message reading. More...
 
class  server_hb_t
 Generate heartbeats from the containing simulator. More...
 
class  simulator_responses
 A simple, FIX-protocol exchange simulator. More...
 

Typedefs

using MsgTypes_t = v5_0sp2::MsgType_enum_t_ul_t
 
using MsgTypes = v5_0sp2::MsgType_t
 
using ExecType = v5_0sp2::ExecType_t
 
using OrdStatus = v5_0sp2::OrdStatus_t
 
using SecurityIDSource = v5_0sp2::SecurityIDSource_t
 
using Side = v5_0sp2::Side_t
 
using FieldsFast = v5_0sp2::FieldsFast
 
using element_type = char
 
using underlying_fix_data_buffer = std::array< element_type, max_size_of_fix_message >
 An underlying data-buffer into which the fix message may be created. More...
 
using pointer = element_type *
 
using const_pointer = element_type const *
 
using data_block_t = pointer
 The type of the internal data-buffer. More...
 
using SecurityID_t = std::array< char, 20 >
 
using ClientOrderID_t = std::array< char, 20 >
 
using Reason_t = std::array< char, 20 >
 
using Password_t = std::array< char, 25 >
 
using UserName_t = std::array< char, 25 >
 
using Price_t = std::array< char, 25 >
 
using checksum_t = std::array< char, CheckSumLength+1 >
 The checksum type used by FIX. More...
 
using field_str_range_t = std::pair< const_pointer, const_pointer >
 

Enumerations

enum  : std::size_t { max_size_of_fix_message =sizeof(__uint128_t)*32 }
 

Functions

int convert (std::uint32_t a, char *buff, std::size_t sz) noexcept(true)
 
constexpr Side convert (BATSBOE::common::Side a)
 
int convert_price (BATSBOE::common::Price_t const &a, char *buff, std::size_t sz)
 
template<class RefData >
constexpr int convert (MIT::common::SecurityID_t const &key, RefData const &ref_data, char *buff, [[maybe_unused]] std::size_t sz)
 
ExecType convert (MIT::common::ExecType const &a) noexcept(false)
 
OrdStatus convert (MIT::common::OrderStatus const &a) noexcept(false)
 
int convert (std::int32_t a, char *buff, std::size_t sz) noexcept(true)
 
int convert (MIT::common::Price_t const &a, char *buff, std::size_t sz)
 
constexpr char convert (MIT::common::Side const &a)
 
template<class DestMsg , class SrcMsg , class OutIter >
OutIter convert_ClOrdID (SrcMsg const &msg, OutIter data) noexcept(true)
 
template<class MsgVer >
class isimud::exchanges::FIX::common::Header __attribute__ ((packed))
 
template<class MsgVer >
isimud::exchanges::FIX::common::Message Header __attribute__ ((packed))
 
template<class MsgVer >
std::ostream & operator<< (std::ostream &os, Message< MsgVer > const &m)
 
template<class SrcMsgDetails , class DestMsgDetails , class SktT >
std::ostream & operator<< (std::ostream &os, client_to_exchange_transformations< SrcMsgDetails, DestMsgDetails, SktT > const &ec) noexcept(false)
 
template<class SrcMsgDetails , class DestMsgDetails , class SktT >
std::ostream & operator<< (std::ostream &os, exchange_to_client_transformations< SrcMsgDetails, DestMsgDetails, SktT > const &ec) noexcept(false)
 
template<class SrcMsgDetails , class SktT >
std::ostream & operator<< (std::ostream &os, simulator_responses< SrcMsgDetails, SktT > const &ec) noexcept(false)
 
 BOOST_MPL_ASSERT_RELATION ((jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::BodyLength >::size),==, sizeof(JMMCG_FIX_MSG_BODY_LENGTH_TAG) -1)
 
 BOOST_MPL_ASSERT_RELATION ((jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::MsgType >::size), >=, sizeof(JMMCG_FIX_MSG_TYPE_TAG) -1)
 

Variables

constexpr const char Separator ='\001'
 
constexpr const unsigned short CheckSumLength =3
 
constexpr const std::uint64_t implied_decimal_places =100000000
 

Typedef Documentation

◆ checksum_t

using isimud::exchanges::FIX::common::checksum_t = typedef std::array<char, CheckSumLength+1>

The checksum type used by FIX.

Definition at line 128 of file types.hpp.

◆ ClientOrderID_t

using isimud::exchanges::FIX::common::ClientOrderID_t = typedef std::array<char, 20>

Definition at line 118 of file types.hpp.

◆ const_pointer

Definition at line 110 of file types.hpp.

◆ data_block_t

The type of the internal data-buffer.

FIX messages are basically an array of chars. so we need a type that is compatible with this char-array that is received from a socket.

Definition at line 115 of file types.hpp.

◆ element_type

Definition at line 100 of file types.hpp.

◆ ExecType

Definition at line 100 of file types.hpp.

◆ field_str_range_t

Definition at line 130 of file types.hpp.

◆ FieldsFast

Definition at line 104 of file types.hpp.

◆ MsgTypes

Definition at line 99 of file types.hpp.

◆ MsgTypes_t

◆ OrdStatus

Definition at line 101 of file types.hpp.

◆ Password_t

using isimud::exchanges::FIX::common::Password_t = typedef std::array<char, 25>

Definition at line 120 of file types.hpp.

◆ pointer

Definition at line 109 of file types.hpp.

◆ Price_t

using isimud::exchanges::FIX::common::Price_t = typedef std::array<char, 25>

Definition at line 122 of file types.hpp.

◆ Reason_t

using isimud::exchanges::FIX::common::Reason_t = typedef std::array<char, 20>

Definition at line 119 of file types.hpp.

◆ SecurityID_t

using isimud::exchanges::FIX::common::SecurityID_t = typedef std::array<char, 20>

Definition at line 117 of file types.hpp.

◆ SecurityIDSource

◆ Side

Definition at line 103 of file types.hpp.

◆ underlying_fix_data_buffer

An underlying data-buffer into which the fix message may be created.

Ideally this should be suitably aligned, e.g. 64-it aligned. For optimal performance it would actually be the underlying memory of the network card or IP stack.

Definition at line 108 of file types.hpp.

◆ UserName_t

using isimud::exchanges::FIX::common::UserName_t = typedef std::array<char, 25>

Definition at line 121 of file types.hpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : std::size_t
Enumerator
max_size_of_fix_message 

The largest size of FIX message that the library can accommodate including all components, e.g. type, size & checksum fields. Note that this must be in units of 512 bits, due to the use of AVX2 operations, if available.

Definition at line 101 of file types.hpp.

Function Documentation

◆ __attribute__() [1/2]

template<class MsgVer >
class isimud::exchanges::FIX::common::Header isimud::exchanges::FIX::common::__attribute__ ( (packed)  )

◆ __attribute__() [2/2]

template<class MsgVer >
isimud::exchanges::FIX::common::Message Header isimud::exchanges::FIX::common::__attribute__ ( (packed)  )

◆ BOOST_MPL_ASSERT_RELATION() [1/2]

isimud::exchanges::FIX::common::BOOST_MPL_ASSERT_RELATION ( (jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::BodyLength >::size ,
sizeof(JMMCG_FIX_MSG_BODY_LENGTH_TAG) -  1 
)

◆ BOOST_MPL_ASSERT_RELATION() [2/2]

isimud::exchanges::FIX::common::BOOST_MPL_ASSERT_RELATION ( (jmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::MsgType >::size ,
>=  ,
sizeof(JMMCG_FIX_MSG_TYPE_TAG) -  1 
)

◆ convert() [1/8]

constexpr Side isimud::exchanges::FIX::common::convert ( BATSBOE::common::Side  a)
inlineconstexpr

Definition at line 102 of file batsboe_common_to_fix_conversions.hpp.

References convert().

◆ convert() [2/8]

ExecType isimud::exchanges::FIX::common::convert ( MIT::common::ExecType const &  a)
inlinenoexcept
Todo:
What should be done with ExecType's that cannot be mapped?.

Definition at line 116 of file mit_to_fix_conversions.hpp.

◆ convert() [3/8]

OrdStatus isimud::exchanges::FIX::common::convert ( MIT::common::OrderStatus const &  a)
inlinenoexcept
Todo:
What should be done with OrderStatus's that cannot be mapped?.

Definition at line 152 of file mit_to_fix_conversions.hpp.

References convert().

◆ convert() [4/8]

int isimud::exchanges::FIX::common::convert ( MIT::common::Price_t const &  a,
char *  buff,
std::size_t  sz 
)
inline

Definition at line 187 of file mit_to_fix_conversions.hpp.

References convert().

◆ convert() [5/8]

template<class RefData >
constexpr int isimud::exchanges::FIX::common::convert ( MIT::common::SecurityID_t const &  key,
RefData const &  ref_data,
char *  buff,
[[maybe_unused] ] std::size_t  sz 
)
inlineconstexpr

Note that only ISIN symbology is supported.

Definition at line 104 of file mit_to_fix_conversions.hpp.

◆ convert() [6/8]

constexpr char isimud::exchanges::FIX::common::convert ( MIT::common::Side const &  a)
inlineconstexpr
Todo:
What should be done with Side's that cannot be mapped?.

Definition at line 196 of file mit_to_fix_conversions.hpp.

◆ convert() [7/8]

◆ convert() [8/8]

int isimud::exchanges::FIX::common::convert ( std::uint32_t  a,
char *  buff,
std::size_t  sz 
)
inlinenoexcept

Definition at line 97 of file batsboe_common_to_fix_conversions.hpp.

◆ convert_ClOrdID()

template<class DestMsg , class SrcMsg , class OutIter >
OutIter isimud::exchanges::FIX::common::convert_ClOrdID ( SrcMsg const &  msg,
OutIter  data 
)
inlinenoexcept

Definition at line 209 of file mit_to_fix_conversions.hpp.

◆ convert_price()

int isimud::exchanges::FIX::common::convert_price ( BATSBOE::common::Price_t const &  a,
char *  buff,
std::size_t  sz 
)
inline

Definition at line 117 of file batsboe_common_to_fix_conversions.hpp.

References convert().

◆ operator<<() [1/4]

template<class SrcMsgDetails , class DestMsgDetails , class SktT >
std::ostream & isimud::exchanges::FIX::common::operator<< ( std::ostream &  os,
client_to_exchange_transformations< SrcMsgDetails, DestMsgDetails, SktT > const &  ec 
)
inlinenoexcept

Definition at line 121 of file processing_rules_impl.hpp.

◆ operator<<() [2/4]

template<class SrcMsgDetails , class DestMsgDetails , class SktT >
std::ostream & isimud::exchanges::FIX::common::operator<< ( std::ostream &  os,
exchange_to_client_transformations< SrcMsgDetails, DestMsgDetails, SktT > const &  ec 
)
inlinenoexcept

Definition at line 168 of file processing_rules_impl.hpp.

◆ operator<<() [3/4]

template<class MsgVer >
std::ostream & isimud::exchanges::FIX::common::operator<< ( std::ostream &  os,
Message< MsgVer > const &  m 
)
inline

Definition at line 333 of file messages_impl.hpp.

◆ operator<<() [4/4]

template<class SrcMsgDetails , class SktT >
std::ostream & isimud::exchanges::FIX::common::operator<< ( std::ostream &  os,
simulator_responses< SrcMsgDetails, SktT > const &  ec 
)
inlinenoexcept

Definition at line 211 of file processing_rules_impl.hpp.

Variable Documentation

◆ CheckSumLength

constexpr const unsigned short isimud::exchanges::FIX::common::CheckSumLength =3
constexpr

Definition at line 125 of file types.hpp.

◆ implied_decimal_places

constexpr const std::uint64_t isimud::exchanges::FIX::common::implied_decimal_places =100000000
constexpr

Definition at line 132 of file types.hpp.

◆ Separator

constexpr const char isimud::exchanges::FIX::common::Separator ='\001'
constexpr

Definition at line 124 of file types.hpp.