OnixS C++ MTS Repo SDP Handler  1.3.2.8
API documentation
HandlerSettings.h
Go to the documentation of this file.
1 #pragma once
2 /*
3 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4 *
5 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6 * and international copyright treaties.
7 *
8 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
9 * Services Agreement (the Agreement) and Customer end user license agreements granting
10 * a non-assignable, non-transferable and non-exclusive license to use the software
11 * for it's own data processing purposes under the terms defined in the Agreement.
12 *
13 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14 * of this source code or associated reference material to any other location for further reproduction
15 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16 *
17 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18 * the terms of the Agreement is a violation of copyright law.
19 */
20 #include <set>
21 
22 #include <OnixS/MTS/Repo/SDP/ABI.h>
26 
27 namespace OnixS {
28 namespace Mts {
29 namespace Repo {
30 namespace SDP {
31 
32 /// Connection retries settings.
33 ///
35 {
36  /// Default constructor.
37  ///
38  ConnectionRetries () : number (0), intervalSec (0) {}
39 
40  /// Constructor.
41  ///
42  ConnectionRetries (int inNumber, unsigned inIntervalSec) : number (inNumber), intervalSec (inIntervalSec) {}
43 
44  /// Number of attempts to restore the telecommunication link.
45  /// -1 - unlimited
46  /// 0 - never (default)
47  /// >0 - the number of attempts
48  int number;
49 
50  /// The time interval between attempts to restore the telecommunication link (in seconds).
51  ///
52  /// @note The default value is 0 (zero).
53  unsigned int intervalSec;
54 
55  /// Returns the string representation.
56  ///
57  std::string toString() const;
58 };
59 
60 ONIXS_MTS_REPO_SDP_API std::ostream& operator << (std::ostream& stream, const ConnectionRetries& connectionRetries);
61 
62 /// Logical processors that a thread is allowed to run on (first logical CPU has index 0).
63 ///
64 typedef std::set<int> CpuIndexes;
65 
66 /// Handler settings.
67 ///
69 {
70  /// Initialize default instance.
71  ///
73 
74  /// Path to the license directory.
75  ///
76  /// @note The default value is empty string (means current directory).
77  std::string licenseDirectory;
78 
79  /// Log files are stored in this directory.
80  ///
81  /// @note The default value is "logs".
82  std::string logDirectory;
83 
84  /// Template of log file name without extension.
85  ///
86  /// @note The default value is "MtsRepoSdpHandlerCpp".
87  std::string logFileNamePrefix;
88 
89  /// Combine LogSettings enum values to configure the logger.
90  ///
91  /// @note The default value is LogSettings::Default.
93 
94  /// Log verbosity.
95  ///
96  /// @note The default value is LogLevel::Info.
98 
99  /// Receive timeout in milliseconds.
100  ///
101  /// @note The default value is 2 seconds (2000 ms).
103 
104  /// Send timeout in milliseconds.
105  ///
106  /// @note The default value is 2 seconds (2000 ms).
108 
109  /// CPU affinity of the receiving thread.
110  ///
112 
113  /// CPU affinity of the sending thread.
114  ///
116 
117  /// Connection retries configuration settings.
118  ///
119  /// @see ConnectionRetries.
121 
122  /// Returns the string representation.
123  ///
124  std::string toString() const;
125 };
126 
127 ///
129 {
130  /// Initialize default instance.
131  ///
133 
134  /// Specifies the value of the timeout at which the handle must close the SSP session.
135  /// The handler must reset this timeout whenever it receives a valid data from the server.
137 
138  /// Specifies the value of the timeout at which the handler must send heartbeat to prevent the server from closing the session
140 
141  /// Size of the communication window.
143 
144  /// Indicates whether compression of the block data is enabled or not
146 
147  /// Returns the string representation.
148  ///
149  std::string toString() const;
150 };
151 
152 ///
154 {
155  /// Initialize default instance.
156  ///
157  LogonSettings();
158 
159  ///TradeImpact service
161 
162  /// Fully qualified trader name (format: �tradername@membername�).
163  std::string userName;
164 
165  /// Password associated with the trader
166  std::string password;
167 
168  /// Returns the string representation.
169  ///
170  std::string toString() const;
171 };
172 
173 ONIXS_MTS_REPO_SDP_API std::ostream& operator << (std::ostream&, const HandlerSettings&);
174 ONIXS_MTS_REPO_SDP_API std::ostream& operator << (std::ostream&, const ConnectionSettings&);
175 ONIXS_MTS_REPO_SDP_API std::ostream& operator << (std::ostream&, const LogonSettings&);
176 
177 }
178 }
179 }
180 }
std::string userName
Fully qualified trader name (format: �tradername�).
unsigned short UInt16
Definition: Defines.h:45
std::ostream & operator<<(std::ostream &stream, TradeImpactService::Enum value)
std::string password
Password associated with the trader.
SInt16 comunicWindowSize
Size of the communication window.
std::set< int > CpuIndexes
TradeImpactService::Enum service
TradeImpact service.
#define ONIXS_MTS_REPO_SDP_API
Definition: ABI.h:49
bool compressionEnabled
Indicates whether compression of the block data is enabled or not.
UInt16 clientReceiveAliveIntervalReq
Specifies the value of the timeout at which the handler must send heartbeat to prevent the server fro...
ConnectionRetries(int inNumber, unsigned inIntervalSec)
signed short SInt16
Definition: Defines.h:41