libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
isimud::ISIMUD_VER_NAMESPACE::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 ExecType = v5_0sp2::ExecType_t
 
using FieldsFast = v5_0sp2::FieldsFast
 
using MsgTypes_t = v5_0sp2::MsgType_enum_t_ul_t
 
using MsgTypes = v5_0sp2::MsgType_t
 
using OrdStatus = v5_0sp2::OrdStatus_t
 
using Price_t = v5_0sp2::Price_t
 
using Quantity_t = v5_0sp2::Quantity_t
 
using SecurityIDSource = v5_0sp2::SecurityIDSource_t
 
using Side = v5_0sp2::Side_t
 
using TIF = v5_0sp2::TimeInForce_t
 
using OrderType = v5_0sp2::OrdType_t
 
using SeqNum_t = v5_0sp2::SeqNum
 
using ExDestinationIDSource = v5_0sp2::ExDestinationIDSource_t
 
using ExDestination_t = v5_0sp2::ExDestination_t
 
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_str_t = std::array< char, 25 >
 
using checksum_t = std::array< char, CheckSumLength+1 >
 The checksum type used by FIX. More...
 
using field_str_const_range_t = std::pair< const_pointer, const_pointer >
 
using field_str_range_t = std::pair< pointer, pointer >
 

Enumerations

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

Functions

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_MIT_price (MIT::common::Price_t const &a, char *buff, std::size_t sz)
 
constexpr char convert (MIT::common::Side const &a)
 
template<class MsgVer >
class isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::Header __attribute__ ((packed))
 
template<class MsgVer >
isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::Message Header __attribute__ ((packed))
 
template<class MsgVer >
std::ostream & operator<< (std::ostream &os, Message< MsgVer > const &m)
 
int convert (SecurityID_t const &i, char *buff, std::size_t sz)
 
int convert (std::int32_t a, char *buff, std::size_t sz) noexcept(true)
 
int convert (std::uint32_t a, char *buff, std::size_t sz) noexcept(true)
 
int convert (std::int64_t a, char *buff, std::size_t sz) noexcept(true)
 
int convert (std::uint64_t a, char *buff, std::size_t sz) noexcept(true)
 
int convert (Price_t const &a, char *buff, std::size_t sz)
 
template<class Ret >
Ret convert (FIX::common::field_str_const_range_t const &a)=delete
 
template<>
std::int32_t convert< std::int32_t > (FIX::common::field_str_const_range_t const &a)
 
template<>
std::uint32_t convert< std::uint32_t > (FIX::common::field_str_const_range_t const &a)
 
template<>
std::uint64_t convert< std::uint64_t > (FIX::common::field_str_const_range_t const &a)
 
template<>
std::string convert< std::string > (FIX::common::field_str_const_range_t const &a)
 
template<>
Quantity_t convert< Quantity_t > (FIX::common::field_str_const_range_t const &a)
 
template<>
SecurityID_t convert< SecurityID_t > (FIX::common::field_str_const_range_t const &a)
 
 BOOST_MPL_ASSERT_RELATION ((libjmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::BodyLength >::size),==, sizeof(JMMCG_FIX_MSG_BODY_LENGTH_TAG) -1)
 
 BOOST_MPL_ASSERT_RELATION ((libjmmcg::enum_tags::mpl::to_array< FieldsFast, FieldsFast::MsgType >::size), >=, sizeof(JMMCG_FIX_MSG_TYPE_TAG) -1)
 
template<class SrcMsgDetails , class DestMsgDetails >
std::ostream & operator<< (std::ostream &os, client_to_exchange_transformations< SrcMsgDetails, DestMsgDetails > const &ec) noexcept(false)
 
template<class SrcMsgDetails , class DestMsgDetails >
std::ostream & operator<< (std::ostream &os, exchange_to_client_transformations< SrcMsgDetails, DestMsgDetails > const &ec) noexcept(false)
 
template<class SrcMsgDetails >
std::ostream & operator<< (std::ostream &os, simulator_responses< SrcMsgDetails > const &ec) noexcept(false)
 

Variables

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

Typedef Documentation

◆ checksum_t

The checksum type used by FIX.

Definition at line 60 of file types.hpp.

◆ ClientOrderID_t

Definition at line 50 of file types.hpp.

◆ const_pointer

◆ 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 47 of file types.hpp.

◆ element_type

Definition at line 32 of file types.hpp.

◆ ExDestination_t

◆ ExDestinationIDSource

◆ ExecType

◆ field_str_const_range_t

◆ field_str_range_t

◆ FieldsFast

◆ MsgTypes

◆ MsgTypes_t

◆ OrderType

◆ OrdStatus

◆ Password_t

Definition at line 52 of file types.hpp.

◆ pointer

◆ Price_str_t

Definition at line 54 of file types.hpp.

◆ Price_t

◆ Quantity_t

◆ Reason_t

Definition at line 51 of file types.hpp.

◆ SecurityID_t

Definition at line 49 of file types.hpp.

◆ SecurityIDSource

◆ SeqNum_t

◆ Side

◆ TIF

◆ 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 40 of file types.hpp.

◆ UserName_t

Definition at line 53 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 33 of file types.hpp.

Function Documentation

◆ __attribute__() [1/2]

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

◆ __attribute__() [2/2]

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

◆ BOOST_MPL_ASSERT_RELATION() [1/2]

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

◆ BOOST_MPL_ASSERT_RELATION() [2/2]

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

◆ convert() [1/12]

◆ convert() [2/12]

template<class Ret >
Ret isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert ( FIX::common::field_str_const_range_t const &  a)
inlinedelete

◆ convert() [3/12]

ExecType isimud::ISIMUD_VER_NAMESPACE::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 48 of file mit_to_fix_conversions.hpp.

References isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Canceled, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Cancelled, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Expired, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Expired, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::New, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::New, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Rejected, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Rejected, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Replaced, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Replaced, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Restated, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Restated, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Suspended, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Suspended, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Trade, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Trade, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Trade_Cancel, isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Trade_Correct, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::TradeCancel, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::TradeCorrect, isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Triggered, and isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::v5_0sp2::Triggered_or_Activated_by_System.

◆ convert() [4/12]

◆ convert() [5/12]

template<class RefData >
constexpr int isimud::ISIMUD_VER_NAMESPACE::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 35 of file mit_to_fix_conversions.hpp.

◆ convert() [6/12]

constexpr char isimud::ISIMUD_VER_NAMESPACE::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 118 of file mit_to_fix_conversions.hpp.

References isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Buy, and isimud::ISIMUD_VER_NAMESPACE::exchanges::MIT::common::Sell.

◆ convert() [7/12]

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

◆ convert() [8/12]

int isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert ( SecurityID_t const &  i,
char *  buff,
std::size_t  sz 
)
inline

Assumes the symbol is an ISIN.

Definition at line 35 of file conversions.hpp.

◆ convert() [9/12]

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

Definition at line 43 of file conversions.hpp.

◆ convert() [10/12]

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

Definition at line 53 of file conversions.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::tostring().

◆ convert() [11/12]

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

Definition at line 48 of file conversions.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::tostring().

◆ convert() [12/12]

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

Definition at line 58 of file conversions.hpp.

References jmmcg::LIBJMMCG_VER_NAMESPACE::tostring().

◆ convert< Quantity_t >()

◆ convert< SecurityID_t >()

◆ convert< std::int32_t >()

template<>
std::int32_t isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert< std::int32_t > ( FIX::common::field_str_const_range_t const &  a)
inline

Definition at line 71 of file conversions.hpp.

◆ convert< std::string >()

Definition at line 89 of file conversions.hpp.

◆ convert< std::uint32_t >()

template<>
std::uint32_t isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert< std::uint32_t > ( FIX::common::field_str_const_range_t const &  a)
inline

Definition at line 77 of file conversions.hpp.

◆ convert< std::uint64_t >()

template<>
std::uint64_t isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::convert< std::uint64_t > ( FIX::common::field_str_const_range_t const &  a)
inline

Definition at line 83 of file conversions.hpp.

◆ convert_MIT_price()

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

◆ convert_price()

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

◆ operator<<() [1/4]

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

Definition at line 53 of file processing_rules_impl.hpp.

◆ operator<<() [2/4]

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

Definition at line 117 of file processing_rules_impl.hpp.

◆ operator<<() [3/4]

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

Definition at line 410 of file messages_impl.hpp.

◆ operator<<() [4/4]

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

Definition at line 161 of file processing_rules_impl.hpp.

Variable Documentation

◆ CheckSumLength

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

Definition at line 57 of file types.hpp.

◆ implied_decimal_places

constexpr const std::uint64_t isimud::ISIMUD_VER_NAMESPACE::exchanges::FIX::common::implied_decimal_places =1
constexpr

Definition at line 65 of file types.hpp.

Referenced by convert().

◆ Separator

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