JayBeams
0.1
Another project to have fun coding.
|
Functions | |
void | raise_invalid_operation_parameters (char const *operation, int qty, price4_t px) |
Raise the right exception when we detect invalid parameters for add_order() or reduce_order() More... | |
void | raise_invalid_reduce (std::string const &msg, std::size_t tk_begin_top, std::size_t tk_inside, price4_t px, int book_qty, int qty) |
Raise an exception describing a invalid reduce operation. More... | |
void | validate_operation_params (char const *operation, int qty, price4_t px) |
Validate the input parameters for all array_order_book operations. More... | |
template<class socket_t > | |
void | setup_socket_udp_recv (socket_t &socket, udp_receiver_config const &cfg) |
Configure a socket to receive UDP packets. More... | |
template<typename socket_t > | |
void | setup_socket_udp_send (socket_t &s, udp_sender_config const &cfg) |
void jb::itch5::detail::raise_invalid_operation_parameters | ( | char const * | operation, |
int | qty, | ||
price4_t | px | ||
) |
Raise the right exception when we detect invalid parameters for add_order() or reduce_order()
operation | the name of the operation that is being processed, typically add_order() or reduce_order(). |
qty | the qty in the operation |
px | the price of the operation |
a | feed_error with nicely formatted output always |
Definition at line 34 of file array_based_order_book.cpp.
Referenced by validate_operation_params().
void jb::itch5::detail::raise_invalid_reduce | ( | std::string const & | msg, |
std::size_t | tk_begin_top, | ||
std::size_t | tk_inside, | ||
price4_t | px, | ||
int | book_qty, | ||
int | qty | ||
) |
Raise an exception describing a invalid reduce operation.
msg | a human readable explanation of the error condition |
tk_begin_top | the first price in the "top-levels" |
tk_inside | the price at the inside |
px | the price of the reduce operation being attempted |
book_qty | the qty that the book has at that price level, 0 if the level does not exist |
qty | the qty of the reduce operation being attempted |
feed | error with a nicely formatted message, always. |
Definition at line 44 of file array_based_order_book.cpp.
Referenced by jb::itch5::array_based_book_side< compare_t >::reduce_order(), and validate_operation_params().
void jb::itch5::detail::setup_socket_udp_recv | ( | socket_t & | socket, |
udp_receiver_config const & | cfg | ||
) |
Configure a socket to receive UDP packets.
Definition at line 18 of file make_socket_udp_recv.hpp.
References jb::itch5::udp_receiver_config::address, jb::itch5::udp_receiver_config::local_address, jb::itch5::udp_receiver_config::port, and jb::itch5::udp_config_common::reuse_address.
Referenced by BOOST_AUTO_TEST_CASE(), and jb::itch5::make_socket_udp_recv().
void jb::itch5::detail::setup_socket_udp_send | ( | socket_t & | s, |
udp_sender_config const & | cfg | ||
) |
Definition at line 17 of file make_socket_udp_send.hpp.
References jb::itch5::udp_sender_config::address, jb::itch5::udp_sender_config::broadcast, jb::itch5::udp_sender_config::enable_loopback, jb::itch5::udp_sender_config::hops, jb::itch5::udp_sender_config::outbound_interface, jb::itch5::udp_config_common::reuse_address, and jb::strtonum().
Referenced by BOOST_AUTO_TEST_CASE(), and jb::itch5::make_socket_udp_send().
|
inline |
Validate the input parameters for all array_order_book operations.
Both add_order() and reduce_order() require basically the same validation, refactor to a common function.
operation | the name of the operation that is being processed, typically add_order() or reduce_order(). |
qty | the qty in the operation |
px | the price of the operation |
a | feed_error with nicely formatted output if the validation fails. |
Definition at line 51 of file array_based_order_book.hpp.
References raise_invalid_operation_parameters(), and raise_invalid_reduce().
Referenced by jb::itch5::array_based_book_side< compare_t >::add_order(), and jb::itch5::array_based_book_side< compare_t >::reduce_order().