21 #include "../common/thread_traits.hpp"
23 #include <boost/asio.hpp>
25 using namespace libjmmcg;
29 boost::program_options::options_description
31 std::ostringstream msg;
32 msg<<
"A FIX-to-exchange translator that listens to an IPADDR:PORT combination for a FIX client and connects to the specified ports. The executable name indicates the message translation performed & versions. Compiled to run on NUMA node: "<<common
::thread_traits
::numa_index<<
". For details regarding the properties of the translator see the documentation that came with the distribution. Note that Wireshark has a built-in FIX protocol: see the \"Analyze/Enabled Protocols...\" dialog in Wireshark or https://www.wireshark.org/docs/dfref/f/fix.html. Copyright © J.M.McGuiness, consultant@isimud.ltd.uk. http://libjmmcg.sf.net/ Distributed under the terms of the GPL v2.1.\n"<<
exit_codes::to_string();
33 boost::program_options::options_description general(msg.str());
35 (
"help",
"Print this help message.")
36 (
"version",
"Print the build number of this program.")
38 boost::program_options::options_description performance(
"Performance-monitoring options.");
39 performance.add_options()
42 boost::program_options::value<
unsigned long>()->required()->default_value(0UL),
43 "The number (positive-integer) of latency timings to reserve. This value must be greater than the total number of messages to be processed, otherwise the behaviour is undefined. Upon exit, these values will be written in CSV-format to a file named 'argv[0]+\"-%%%%%.PID.csv\"' (where each '%' is a random hexadecimal digit and PID is the current process id). This file shall be created in the current directory. If the value is zero, then the file shall not be created, no values will be stored, unlimited messages may be processed."
45 boost::program_options::options_description client(
"FIX-client options.");
49 boost::program_options::value<
std::string>()->required()->default_value(
boost::
asio::
ip::address_v4::loopback().to_string()),
50 "IP address (in v4 format; thus the network interface to which it is bound) to which the translator should listen."
54 boost::program_options::value<
unsigned short>()->required(),
55 "An unused port to which the translator should listen."
57 boost::program_options::options_description all(
"All options.");
58 all.add(general).add(client).add(performance);