libjmmcg
build_2176
A C++ library containing an eclectic mix of useful, advanced components.
|
A simple, FIX-protocol exchange simulator. More...
#include <processing_rules.hpp>
Public Types | |
using | base_t = exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > |
using | msg_details_t = typename base_t::msg_details_t |
using | socket_t = typename base_t::socket_t |
Public Types inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
using | base_t = message_responses< SrcMsgDetails, SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, typename SrcMsgDetails::client_to_exchange_messages_t, SktT > |
using | msg_details_t = typename base_t::src_msg_details_t |
using | socket_t = typename base_t::socket_t |
using | derived_t = typename base_t::derived_t |
Public Member Functions | |
template<class MsgT > | |
bool | process (MsgT const &, socket_t &, socket_t &) |
Reject any message that has not been recognised. More... | |
bool | process (typename msg_details_t::ClientHeartbeat const &msg, socket_t &, socket_t &client_skt) |
Public Member Functions inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
bool | process_msg (Buff const &buff, socket_t &exchg_skt, socket_t &client_skt) FORCE_INLINE |
Static Public Member Functions | |
static std::string | to_string () noexcept(false) |
Static Public Member Functions inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
static std::string | to_string () noexcept(false) |
Static Public Attributes | |
static constexpr Reason_t | logout_reason {'U', 's', 'e', 'r', ' ', 'l', 'o', 'g', 'o', 'u', 't', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd'} |
static constexpr msg_details_t::SecurityID_t | instrumentID =1 |
The only valid instrument, all others will be rejected. More... | |
static constexpr msg_details_t::SecurityID_t | invalidInstrumentID =2 |
An invalid instrument, that will be rejected. More... | |
Static Public Attributes inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
static constexpr msg_details_t::UserName_t | username |
The only valid username. More... | |
static constexpr msg_details_t::Password_t | password |
The only valid password. More... | |
static constexpr msg_details_t::Password_t | new_password |
The only valid new password. More... | |
static constexpr std::int32_t | quantity_limit |
The magic quantity value. More... | |
static constexpr msg_details_t::Price_t | price |
For limit orders, this is the price at which the order will be traded, otherwise it will be left "on the market". More... | |
static constexpr msg_details_t::Price_t | scaled_price |
For limit orders, this is the native, scaled price at which the order will be traded, otherwise it will be left "on the market", which is used within the simulator. More... | |
Additional Inherited Members | |
Protected Types inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
using | order_book_t = std::map< typename msg_details_t::ClientOrderID_t, typename msg_details_t::NewOrder > |
Protected Attributes inherited from jmmcg::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT > | |
order_book_t | order_book |
int32_t | sequenceNumber |
A simple, FIX-protocol exchange simulator.
The behaviour of this simulator is a simplification derived from the specification in [1].
Definition at line 99 of file processing_rules.hpp.
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::base_t = exchanges::common::simulator_responses<SrcMsgDetails, simulator_responses<SrcMsgDetails, SktT>, SktT> |
Definition at line 101 of file processing_rules.hpp.
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::msg_details_t = typename base_t::msg_details_t |
Definition at line 102 of file processing_rules.hpp.
using jmmcg::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::socket_t = typename base_t::socket_t |
Definition at line 103 of file processing_rules.hpp.
|
inline |
Reject any message that has not been recognised.
Definition at line 78 of file processing_rules_impl.hpp.
|
inline |
The response to a Heartbeat is nothing.
Definition at line 84 of file processing_rules_impl.hpp.
|
inlinestaticnoexcept |
Definition at line 89 of file processing_rules_impl.hpp.
|
static |
The only valid instrument, all others will be rejected.
Definition at line 107 of file processing_rules.hpp.
|
static |
An invalid instrument, that will be rejected.
Definition at line 109 of file processing_rules.hpp.
|
static |
Definition at line 105 of file processing_rules.hpp.