OnixS C++ SGX Titan ITCH Market Data Handler  1.2.2
API documentation
HandlerSettings.cpp
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
21 
22 #include "Formatting.h"
23 #include "Formatting.Helpers.h"
24 
25 #include "NamespaceHelper.h"
26 
27 ONIXS_HANDLER_NAMESPACE_BEGIN
28 
29 using namespace std;
30 using namespace Util;
31 
32 std::ostream& operator << (std::ostream& stream, const ServiceDescriptor& descriptor)
33 {
34  TextBuilder tb;
35  tb << descriptor;
36  return stream << tb.toString();
37 }
38 
39 std::ostream& operator << (std::ostream& stream, const FeedDescriptor& descriptor)
40 {
41  TextBuilder tb;
42  tb << descriptor;
43  return stream << tb.toString();
44 }
45 
46 std::ostream & operator << (std::ostream & stream, const HandlerSettings & settings)
47 {
48 
49  stream << "Settings [licenseDirectory=" << settings.licenseDirectory
50  << ", " << endl << "logSettings=" << settings.logSettings
51  << ", logLevel=" << enumToString(settings.logLevel)
52  << ", " << endl << "logDirectory=" << settings.logDirectory
53  << ", " << endl << "logFileNamePrefix=" << settings.logFileNamePrefix
54  << ", logFilePermissions=" << settings.logFilePermissions
55  << ", lostPacketWaitTime (mks)=" << settings.lostPacketWaitTime
56  << ", outOfOrderPacketMaxInterval =" << settings.outOfOrderPacketMaxInterval
57  << ", " << endl << "heartbeatInterval (ms)=" << settings.heartbeatInterval
58  << ", " << endl << "itchFeed=" << settings.itchFeed
59  << ", " << endl << "useFeedA=" << settings.useFeedA << ", useFeedB=" << settings.useFeedB
60  << ", " << endl << "retransmissionFeed=" << settings.retransmissionFeed
61  << ", " << endl << "networkInterface=" << settings.networkInterface
62  << ", networkInterfaceA=" << settings.networkInterfaceA
63  << ", networkInterfaceB=" << settings.networkInterfaceB
64  << ", " << endl << "retransmissionMaxPacketNumber=" << settings.retransmissionMaxPacketNumber
65  << ", " << endl << "glimpseFeed=" << settings.glimpseFeed
66  << ", " << endl << "glimpseUsername=" << settings.glimpseUsername
67  << ", " << endl << "glimpsePassword=" << settings.glimpsePassword
68  << ", " << endl << "networkInterfaceForTcpServices=" << settings.networkInterfaceForTcpServices
69  << ", buildInternalOrderBooks=" << settings.buildInternalOrderBooks
70  << ", " << endl << "maxBooksObjectAmount=" << settings.maxBooksObjectAmount
71  << "]";
72 
73  return stream;
74 }
75 
76 ONIXS_HANDLER_NAMESPACE_END
std::string licenseDirectory
Path to the license directory.
std::string glimpsePassword
Password assigned for GLIMPSE.
std::string glimpseUsername
Username assigned for GLIMPSE.
STL namespace.
std::string logFileNamePrefix
Template of log file name without extension.
ONIXS_SGXTITAN_ITCH_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
LogSettings::Enum logSettings
Combine LogSettings enum values to configure the logger.
std::string logDirectory
Log files are stored in this directory.
unsigned int maxBooksObjectAmount
Defines size of prea-llocated memory for Order Book. Default value is 1000.
ONIXS_SGXTITAN_ITCH_API std::string enumToString(ErrorCode::Enum)
Returns string representation of ErrorCode value.
FeedDescriptor retransmissionFeed
Retransmission feed.
unsigned int retransmissionMaxPacketNumber
Lost packets threshold when the Handler prefers retransmission.