1 #ifndef ISIMUD_EXCHANGES_MIT_BIT_MESSAGES_HPP
2 #define ISIMUD_EXCHANGES_MIT_BIT_MESSAGES_HPP
23 #include "reject_codes.hpp"
25 #include "../common/messages.hpp"
26 #include "../common/ref_data.hpp"
28 #include "core/max_min.hpp"
30 #include <boost/mpl/assert.hpp>
31 #include <boost/mpl/deref.hpp>
32 #include <boost/mpl/max_element.hpp>
33 #include <boost/mpl/min_element.hpp>
34 #include <boost/mpl/placeholders.hpp>
35 #include <boost/mpl/sizeof.hpp>
36 #include <boost/mpl/transform_view.hpp>
37 #include <boost/mpl/vector.hpp>
38 #include <boost/variant/variant.hpp>
66 }
__attribute__((packed));
68 using order_qty_t=
std::uint64_t;
82 }
__attribute__((packed));
100 }
__attribute__((packed));
110 }
__attribute__((packed));
115 }
__attribute__((packed));
128 }
__attribute__((packed));
134 using RejectCode_t=mit_bit::reject_codes_enum;
136 using order_qty_t=
std::uint64_t;
142 }
__attribute__((packed));
154 }
__attribute__((packed));
171 }
__attribute__((packed));
195 template<
class SrcMsg>
__stdcall
197 }
__attribute__((packed));
210 template<
class SrcMsg>
__stdcall
224 template<
class SrcMsg>
__stdcall
230 static inline constexpr const exchanges::common::mic_codes::ISO_10383_MIC_Codes
MIC_code=exchanges::common::mic_codes::ISO_10383_MIC_Codes::ISO_10383_ITALY_MTAA;
241 using ClientOrderID_t=
common::ClientOrderID_t;
271 using Logout=LogoutRequest;
273 static inline constexpr MsgTypes_t
MatchAll=
std::numeric_limits<MsgTypes_t>::max()-1;
274 static inline constexpr MsgTypes_t
Exit=
std::numeric_limits<MsgTypes_t>::max();
305 boost::mpl::min_element<
306 boost::mpl::transform_view<client_to_exchange_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
312 boost::mpl::max_element<
313 boost::mpl::transform_view<client_to_exchange_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
319 boost::mpl::min_element<
320 boost::mpl::transform_view<exchange_to_client_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
326 boost::mpl::max_element<
327 boost::mpl::transform_view<exchange_to_client_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
331 min_msg_size=libjmmcg::min<std::size_t, min_size_client_to_exchange_msg, min_size_exchange_to_client_msg>::value,
332 max_msg_size=libjmmcg::max<std::size_t, max_size_client_to_exchange_msg, max_size_exchange_to_client_msg>::value,
350 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::Header_t), <=, MsgTypes::max_size_client_to_exchange_msg);
351 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::Header_t), <=, MsgTypes::max_size_exchange_to_client_msg);
352 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::Header_t), <=, MsgTypes::max_msg_size);
353 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogonRequest), ==, 80);
354 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogonReply), ==, 38);
355 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogoutRequest), ==, 24);
356 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ClientHeartbeat), ==, 4);
357 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ServerHeartbeat), ==, 4);
358 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::MissedMessageRequest), ==, 9);
359 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::MissedMessageRequestAck), ==, 5);
360 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::MissedMessageReport), ==, 5);
361 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::Reject), ==, 59);
362 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::SystemStatus), ==, 6);
363 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::NewOrder_t), ==, 106);
364 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::NewQuote), ==, 86);
365 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderCancelReplaceRequest), ==, 120);
366 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderCancelRequest), ==, 73);
367 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderMassCancelRequest), ==, 46);
368 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ExecutionReport), ==, 229);
369 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderCancelReject), ==, 73);
370 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderMassCancelReport), ==, 56);
371 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::BusinessReject), ==, 63);