libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT > Class Template Referencefinal

A simple, FIX-protocol exchange simulator. More...

#include <processing_rules.hpp>

Inheritance diagram for isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >:
[legend]
Collaboration diagram for isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >:
[legend]

Classes

struct  state_machine_t
 

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 src_msg_details_t = msg_details_t
 
using socket_t = typename base_t::socket_t
 
- Public Types inherited from isimud::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 src_msg_details_t = msg_details_t
 
using socket_t = typename base_t::socket_t
 
using derived_t = typename base_t::derived_t
 
using Price_t = typename std::conditional< std::is_integral< typename msg_details_t::Price_t >::value, typename msg_details_t::Price_t, std::uint64_t >::type
 
- Public Types inherited from isimud::exchanges::common::message_responses< SrcMsgDetails, SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SrcMsgDetails ::client_to_exchange_messages_t, SktT >
using src_msg_details_t = SrcMsgDetails
 A type containing the details of the messages that will be received from the client. More...
 
using dest_msg_details_t = SrcMsgDetails
 A type containing the details of the messages that will be sent to the exchange. More...
 
using derived_t = simulator_responses< SrcMsgDetails, SktT >
 
using flow_msg_types = SrcMsgDetails ::client_to_exchange_messages_t
 
using socket_t = SktT
 

Public Member Functions

 simulator_responses ()=default
 
 simulator_responses (simulator_responses const &sr) noexcept(true)
 
bool process_msg (typename src_msg_details_t::msg_buffer_t const &buff, socket_t &exchg_skt, socket_t &client_skt) override
 
std::string to_string () const noexcept(false)
 
- Public Member Functions inherited from isimud::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
virtual bool process_msg (typename src_msg_details_t::msg_buffer_t const &buff, socket_t &exchg_skt, socket_t &client_skt) override=0
 
std::string to_string () const 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 isimud::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 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 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 isimud::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 Member Functions inherited from isimud::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
 simulator_responses ()=default
 
 simulator_responses (simulator_responses const &)=default
 
- Protected Attributes inherited from isimud::exchanges::common::simulator_responses< SrcMsgDetails, simulator_responses< SrcMsgDetails, SktT >, SktT >
order_book_t order_book
 
std::int32_t sequenceNumber
 

Detailed Description

template<class SrcMsgDetails, class SktT>
class isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >

A simple, FIX-protocol exchange simulator.

The behaviour of this simulator is a simplification derived from the specification in [1].

Definition at line 158 of file processing_rules.hpp.

Member Typedef Documentation

◆ base_t

template<class SrcMsgDetails , class SktT >
using isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::base_t = exchanges::common::simulator_responses<SrcMsgDetails, simulator_responses<SrcMsgDetails, SktT>, SktT>

Definition at line 160 of file processing_rules.hpp.

◆ msg_details_t

template<class SrcMsgDetails , class SktT >
using isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::msg_details_t = typename base_t::msg_details_t

Definition at line 161 of file processing_rules.hpp.

◆ socket_t

template<class SrcMsgDetails , class SktT >
using isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::socket_t = typename base_t::socket_t

Definition at line 163 of file processing_rules.hpp.

◆ src_msg_details_t

template<class SrcMsgDetails , class SktT >
using isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::src_msg_details_t = msg_details_t

Definition at line 162 of file processing_rules.hpp.

Constructor & Destructor Documentation

◆ simulator_responses() [1/2]

template<class SrcMsgDetails , class SktT >
isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::simulator_responses ( )
default

◆ simulator_responses() [2/2]

template<class SrcMsgDetails , class SktT >
isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::simulator_responses ( simulator_responses< SrcMsgDetails, SktT > const &  sr)
inlinenoexcept

Definition at line 172 of file processing_rules.hpp.

Member Function Documentation

◆ process_msg()

template<class SrcMsgDetails , class SktT >
bool isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::process_msg ( typename src_msg_details_t::msg_buffer_t const &  buff,
socket_t exchg_skt,
socket_t client_skt 
)
inlineoverride
Returns
False to continue processing messages, true otherwise.

Definition at line 198 of file processing_rules_impl.hpp.

◆ to_string()

template<class SrcMsgDetails , class SktT >
std::string isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::to_string ( ) const
inlinenoexcept

Definition at line 206 of file processing_rules_impl.hpp.

Member Data Documentation

◆ instrumentID

template<class SrcMsgDetails , class SktT >
constexpr msg_details_t::SecurityID_t isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::instrumentID {'1'}
inlinestaticconstexpr

The only valid instrument, all others will be rejected.

Definition at line 167 of file processing_rules.hpp.

◆ invalidInstrumentID

template<class SrcMsgDetails , class SktT >
constexpr msg_details_t::SecurityID_t isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::invalidInstrumentID {'2'}
inlinestaticconstexpr

An invalid instrument, that will be rejected.

Definition at line 169 of file processing_rules.hpp.

◆ logout_reason

template<class SrcMsgDetails , class SktT >
constexpr Reason_t isimud::exchanges::FIX::common::simulator_responses< SrcMsgDetails, SktT >::logout_reason {'U', 's', 'e', 'r', ' ', 'l', 'o', 'g', 'o', 'u', 't', ' ', 'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd'}
inlinestaticconstexpr

Definition at line 165 of file processing_rules.hpp.


The documentation for this class was generated from the following files: