1 #ifndef ISIMUD_EXCHANGES_BATSBOE_US_v2_MESSAGES_HPP
2 #define ISIMUD_EXCHANGES_BATSBOE_US_v2_MESSAGES_HPP
23 #include "../types.hpp"
24 #include "../../common/messages.hpp"
26 #include "core/max_min.hpp"
28 #include <boost/mpl/max_element.hpp>
29 #include <boost/mpl/min_element.hpp>
30 #include <boost/mpl/vector.hpp>
31 #include <boost/variant/variant.hpp>
46 static inline constexpr const exchanges::common::mic_codes::ISO_10383_MIC_Codes
MIC_code=exchanges::common::mic_codes::ISO_10383_MIC_Codes::ISO_10383_UNITED_STATES_OF_AMERICA_BATS;
54 using SecurityID_t=
common::SecurityID_t;
58 using ClientOrderID_t=
common::ClientOrderID_t;
87 using ExecutionReport=OrderExecution;
88 using Heartbeat=ClientHeartbeat;
89 using OrderCancelRequest=CancelOrder;
90 using OrderCancelReject=CancelRejected;
91 using OrderCancelReplaceRequest=ModifyOrder;
94 static inline constexpr MsgTypes_t
Exit=
static_cast<MsgTypes_t>(MsgType_t
::Exit);
124 boost::mpl::min_element<
125 boost::mpl::transform_view<client_to_exchange_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
131 boost::mpl::max_element<
132 boost::mpl::transform_view<client_to_exchange_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
138 boost::mpl::min_element<
139 boost::mpl::transform_view<exchange_to_client_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
145 boost::mpl::max_element<
146 boost::mpl::transform_view<exchange_to_client_messages_t, boost::mpl::sizeof_<boost::mpl::_1> >
150 min_msg_size=libjmmcg::min<std::size_t, min_size_client_to_exchange_msg, min_size_exchange_to_client_msg>::value,
151 max_msg_size=libjmmcg::max<std::size_t, max_size_client_to_exchange_msg, max_size_exchange_to_client_msg>::value,
154 BOOST_MPL_ASSERT_RELATION(max_msg_size, >=, header_t_size);
170 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogoutRequest), <=, MsgTypes::max_size_client_to_exchange_msg);
171 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogoutRequest), <=, MsgTypes::max_size_exchange_to_client_msg);
172 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogoutRequest), <=, MsgTypes::max_msg_size);
173 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogonRequest), ==, 261);
174 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogoutRequest), ==, 10);
175 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ClientHeartbeat), ==, 10);
176 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::LogonReply), ==, 11);
177 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::Logout), ==, 76);
178 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ServerHeartbeat), ==, 10);
179 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ReplayComplete), ==, 10);
180 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::NewOrder_t), ==, 157);
181 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::CancelOrder), ==, 36);
182 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::ModifyOrder), ==, 73);
183 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderAcknowledgement), ==, 245);
184 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderRejected), ==, 213);
185 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderModified), ==, 205);
186 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderRestated), ==, 216);
187 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::UserModifyRejected), ==, 108);
188 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderCancelled), ==, 191);
189 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::CancelRejected), ==, 100);
190 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::OrderExecution), ==, 215);
191 BOOST_MPL_ASSERT_RELATION(
sizeof(MsgTypes::TradeCancelOrCorrect), ==, 170);