OnixS C++ FIX Engine  4.10.1
API Documentation
EngineSettings.h
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 
20 #pragma once
21 
22 #include <vector>
23 #include <string>
24 
26 
27 namespace OnixS {
28 namespace System {
29 class ISettings;
30 }
31 }
32 
33 namespace OnixS {
34 namespace FIX {
35 class Engine;
36 
37 /// Listen ports.
38 typedef std::vector<int> ListenPorts;
39 
40 /// Local interfaces
41 typedef std::string LocalNetworkInterface;
42 typedef std::vector<LocalNetworkInterface> LocalNetworkInterfaces;
43 
44 /// FIX Engine settings.
46 {
47 public:
48  /// The constructor.
50 
51  /// The constructor to create the EngineSettings from a Configuration string.
52  explicit EngineSettings(const std::string & configuration);
53 
54  /// The copy constructor.
56 
57  /// Loads Engine settings from a Configuration file.
58  void loadFromConfigFile(const std::string & configFile);
59 
60  /// The destructor.
61  ~EngineSettings();
62 
63  /// The assignment.
64  EngineSettings & operator = (const EngineSettings &);
65 
66  /// The option to create the FIX Engine log file.
67  EngineSettings & createEngineLogFile(bool value);
68 
69  /// The option to create the FIX Engine log file.
70  bool createEngineLogFile() const;
71 
72  /// Specifies the path(s) to the XML file(s) with the description of the FIX Dictionary(s).
73  ///
74  /// @note More than one file could be specified. The symbol '|' is used as the file name delimiter.
75  EngineSettings & dictionaryFile(const std::string & value);
76 
77  /// Returns the path to the XML file with the description of the FIX Dictionary(s).
78  const std::string & dictionaryFile() const;
79 
80  /// Specifies the plain text string with a description of the FIX dialect.
81  EngineSettings & dialectString(const std::string & value);
82 
83  /// Returns the string that contains the plain text string with the description of the FIX dialect.
84  const std::string & dialectString() const;
85 
86  /// The FIX Engine listens on this port for incoming "plain text" connections.
87  ///
88  /// @note If '0' then only session-initiators can be created.
89  /// @note If '-1' then the telecommunication level is disabled and only message parsing/assembling can be used.
90  EngineSettings & listenPort(int value);
91 
92  /// The FIX Engine listens on this port for incoming "plain text" connections.
93  ///
94  /// @note If '0' then only session-initiators can be created.
95  /// @note If '-1' then the telecommunication level is disabled and only message parsing/assembling can be used.
96  int listenPort() const;
97 
98  /// Set listen ports.
99  EngineSettings & listenPorts(const ListenPorts & value);
100 
101  /// Returns listen ports.
102  const ListenPorts & listenPorts() const;
103 
104  /// The FIX Engine listens on these local interfaces for incoming "plain text" connections.
105  const LocalNetworkInterfaces & localNetworkInterface() const;
106 
107  /// Sets local interfaces where the engine listen for incoming connections.
108  /// Each local interface specification could specify the local IP address and port. For instance, "localhost" and "192.168.0.1:4501" are valid values. When
109  /// a local interface specification contains the same port as specified at listenPort settings the listening appears only on the interface and port specified
110  /// at the localInterface setting.
111  /// @note At least a single listen port have to be specified to make the engine able to use this setting.
112  EngineSettings & localNetworkInterface(const LocalNetworkInterfaces &);
113 
114  /// Sets the local interface where the engine listen for incoming connections.
115  /// Each local interface specification could specify the local IP address and port. For instance, "localhost" and "192.168.0.1:4501" are valid values. When
116  /// a local interface specification contains the same port as specified at listenPort settings the listening appears only on the interface and port specified
117  /// at the localInterface setting.
118  /// @note At least a single listen port have to be specified to make the engine able to use this setting.
119  EngineSettings & localNetworkInterface(const LocalNetworkInterface &);
120 
121  /// Returns the default mode for outbound and incoming connections.
122  ThreadingModel::Enum threadingModel() const;
123 
124  /// Sets the default mode for outbound and incoming connections.
125  EngineSettings & threadingModel(ThreadingModel::Enum value);
126 
127  /// Returns the default mode for using a spin lock.
128  bool useSpinLock() const;
129 
130  /// Returns the default mode for using a spin lock.
131  EngineSettings & useSpinLock(bool value);
132 
133  /// Sets the thread pool size.
134  EngineSettings & threadPoolSize(int size);
135 
136  /// Returns the thread pool size.
137  int threadPoolSize() const;
138 
139  /// Specifies the path to the license file.
140  ///
141  /// @deprecated This method is deprecated, the OnixS::FIX::EngineSettings::licenseStore(const std::string&) should be used instead.
142  EngineSettings & licenseFile(const std::string & value);
143 
144  /// Returns the path to the license file.
145  ///
146  /// @deprecated This method is deprecated, the OnixS::FIX::EngineSettings::licenseStore() should be used instead.
147  const std::string & licenseFile() const;
148 
149  /// Specifies the path to the license directory.
150  ///
151  /// @note More than one license store could be specified. The symbol '|' is used as the license store delimiter.
152  EngineSettings & licenseStore(const std::string & value);
153 
154  /// Returns the path to the license directory.
155  const std::string & licenseStore() const;
156 
157  /// Specifies the string of the license content.
158  EngineSettings & licenseString(const std::string & value);
159 
160  /// Returns the string of the license content.
161  const std::string & licenseString() const;
162 
163  /// Returns the number of days to alert before the license expiration.
164  unsigned licenseAlertingDaysBeforeExpiration();
165 
166  /// Sets the number of days to alert before the license expiration.
167  /// If the amount of remaining license days is less or equal to this number
168  /// then the warning will be reported to the FIX Engine's log and IEngineListener::onWarning callback will be invoked.
169  /// The verification is performed during the following events: the FIX Engine initialization, Session::logonAsAcceptor and Session::logonAsInitiator calls.
170  EngineSettings & licenseAlertingDaysBeforeExpiration(unsigned value);
171 
172  /// Inbound and outbound messages, session's state data and the FIX Engine log file (FixEngineLog.txt) are stored in this directory.
173  EngineSettings & logDirectory(const std::string & value);
174 
175  /// Inbound and outbound messages, session's state data and the FIX Engine log file (FixEngineLog.txt) are stored in this directory.
176  const std::string & logDirectory() const;
177 
178  /// Returns the FIX Engine log file name
179  const std::string & logFileName() const;
180 
181  /// Sets the FIX Engine log file name
182  EngineSettings & logFileName(const std::string & value);
183 
184  /// Returns 'true' if inbound messages are logged, otherwise - 'false'.
185  bool logInboundMessages() const;
186 
187  /// The option to log inbound messages.
188  EngineSettings & logInboundMessages(bool value);
189 
190  /// Returns 'true' if outbound messages are logged, otherwise - 'false'.
191  bool logOutboundMessages() const;
192 
193  /// The option to log outbound messages.
194  EngineSettings & logOutboundMessages(bool value);
195 
196  /// Returns 'true' if outbound messages are logged before sending, otherwise - 'false'.
197  bool logBeforeSending() const;
198 
199  /// The option to switch on/off logging of outbound messages before/after sending.
200  EngineSettings & logBeforeSending(bool value);
201 
202  /// Gets the usage of the local time in FIX Engine events and log files.
203  bool localTimeUsage() const;
204 
205  /// Specifies the usage of the local time in FIX Engine events and log files.
206  /// @param value If it is true - the local time is used, if it is false - the UTC time is used.
207  EngineSettings & localTimeUsage(bool value);
208 
209  /// The option to process the DeliverToCompID (tag 128) flag.
210  EngineSettings & processDeliverToCompId(bool value);
211 
212  /// The option to process the DeliverToCompID (tag 128) flag.
213  bool processDeliverToCompId() const;
214 
215  /// The reasonable transmission time as % from the HeartBtInt value.
216  ///
217  /// When either end of the connection has not received any data for (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds,
218  /// it will transmit a Test Request message.
219  ///
220  /// If there is still no a Heartbeat message received after (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds
221  /// then the connection should be considered lost and a corrective action should be initiated.
222  ///
223  /// @see If you need to change this option for the separate session, please use
224  /// the OnixS::FIX::Session::setReasonableTransmissionTime(int).
225  EngineSettings & reasonableTransmissionTime(int value);
226 
227  /// The reasonable transmission time as % from HeartBtInt value.
228  ///
229  /// When either end of the connection has not received any data for (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds,
230  /// it will transmit a Test Request message.
231  ///
232  /// If there is still no a Heartbeat message received after (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds
233  /// then the connection should be considered lost and a corrective action should be initiated.
234  ///
235  /// @see You also can get a value of this option for separate session using
236  /// the OnixS::FIX::Session::getReasonableTransmissionTime().
237  int reasonableTransmissionTime() const;
238 
239  /// Sets the number of attempts to restore the FIX connection.
240  EngineSettings & reconnectAttempts(int value);
241 
242  /// Returns the number of attempts to restore the FIX connection.
243  int reconnectAttempts() const;
244 
245  /// Sets the time interval between the attempts to restore the FIX connection (in seconds).
246  EngineSettings & reconnectInterval(int value);
247 
248  /// Returns the time interval between the attempts to restore the FIX connection (in seconds).
249  int reconnectInterval() const;
250 
251  /// Sets the number of sent messages that are available for the resending on the counterparty's Resend Request <2> message.
252  EngineSettings & resendingQueueSize(size_t value);
253 
254  /// Returns the number of sent messages that are available for the resending on the counterparty's Resend Request <2> message.
255  /// The zero value means that sent messages are not available for the resending.
256  /// The value cannot be negative.
257  size_t resendingQueueSize() const;
258 
259  /// Sets the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
260  EngineSettings & resendRequestMaximumRange(int value);
261 
262  /// Returns the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
263  int resendRequestMaximumRange() const;
264 
265  /// Specifies the usage of the operating system default RecvBuffer size.
266  static const int UseDefaultReceiveBufferSize;
267 
268  /// Returns the size of the TCP buffer allocated to the FIX connection for receiving data.
269  /// If '-1' then the default operating system value is used.
270  int receiveBufferSize() const;
271 
272  /// Sets the size of the TCP buffer allocated to the FIX connection for receiving data.
273  /// If '-1' then the default operating system value is used.
274  EngineSettings & receiveBufferSize(int value);
275 
276  /// Specifies the usage of the operating system default SendBuffer size.
277  static const int UseDefaultSendBufferSize;
278 
279  /// Returns the size of the TCP buffer allocated to the FIX connection for sending data.
280  /// If '-1' then the default operating system value is used.
281  int sendBufferSize() const;
282 
283  /// Sets the size of the TCP buffer allocated to the FIX connection for sending data.
284  /// If '-1' then the default operating system value is used.
285  EngineSettings & sendBufferSize(int value);
286 
287  /// Returns the value of the option to send the Logout message before dropping the telecommunication link in case of Exception during the processing of incoming FIX message.
288  EngineSettings & sendLogoutOnException(bool value);
289 
290  /// The option to send the Logout message before dropping the telecommunication link in case of an Exception during the processing of an incoming FIX message.
291  bool sendLogoutOnException() const;
292 
293  /// Returns the value of the option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
294  EngineSettings & sendLogoutOnInvalidLogon(bool value);
295 
296  /// The option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
297  bool sendLogoutOnInvalidLogon() const;
298 
299  /// Sets the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
300  EngineSettings & sslCertificateFile(const std::string & value);
301 
302  /// Returns the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
303  const std::string & sslCertificateFile() const;
304 
305  /// Sets the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
306  EngineSettings & sslPrivateKeyFile(const std::string & value);
307 
308  /// Returns the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
309  const std::string & sslPrivateKeyFile() const;
310 
311  /// Set the password to load private keys that are protected by a password.
312  EngineSettings & sslPrivateKeyPassword(const Cryptography::SecureString & value);
313 
314  /// Returns the password to load private keys that are protected by a password.
315  Cryptography::SecureString sslPrivateKeyPassword() const;
316 
317  /// The FIX Engine listens on this port for incoming SSL connections.
318  ///
319  /// @note If '0' then only session-initiators can be created.
320  /// @note If '-1' then the telecommunication level is disabled and only message parsing/assembling can be used.
321  EngineSettings & sslListenPort(int value);
322 
323  /// The FIX Engine listens on this port for incoming SSL connections.
324  ///
325  /// @note If '0' then only session-initiators can be created.
326  /// @note If '-1' then the telecommunication level is disabled and only message parsing/assembling can be used.
327  int sslListenPort() const;
328 
329  /// Sets SSL listen ports.
330  EngineSettings & sslListenPorts(const ListenPorts & value);
331 
332  /// Returns SSL listen ports.
333  const ListenPorts & sslListenPorts() const;
334 
335  /// The FIX Engine listens on these local interfaces for incoming SSL connections.
336  const LocalNetworkInterfaces & sslLocalInterface() const;
337 
338  /// Sets local interfaces where the engine listen for incoming SSL connections.
339  /// @note At least a single SSL-listen port have to be specified to make the engine able to use this setting.
340  EngineSettings & sslLocalInterface(const LocalNetworkInterfaces &);
341 
342  /// Set the option to request client certificates and perform the certificate verification.
343  EngineSettings & sslVerifyPeer(bool verify);
344 
345  /// Returns the option to request client certificates and perform the certificate verification.
346  bool sslVerifyPeer() const;
347 
348  /// Sets the path to the trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
349  EngineSettings & sslCaFile(const std::string & value);
350 
351  /// Returns the path to trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
352  const std::string & sslCaFile() const;
353 
354  /// Sets the CPU affinity of Engine service threads.
355  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
356 
357  /// Sets the CPU affinity of Engine service threads.
358  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
359 
360  /// Returns the CPU affinity of Engine service threads.
361  const OnixS::Threading::CpuIndexes & serviceThreadAffinity();
362 
363  /// Returns the priority of Engine service threads.
364  int serviceThreadPriority() const;
365 
366  /// Sets the priority of Engine service threads.
367  EngineSettings & serviceThreadPriority(int priority);
368 
369  /// Returns the policy of Engine service threads.
370  int serviceThreadPolicy() const;
371 
372  /// Sets the policy of Engine service threads.
373  EngineSettings & serviceThreadPolicy(int policy);
374 
375  /// Sets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
376  EngineSettings & tcpNoDelayOption(bool value);
377 
378  /// Gets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
379  bool tcpNoDelayOption() const;
380 
381  /// Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode
382  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
383  EngineSettings & receiveSpinningTimeout(int value);
384 
385  /// Gets the current receive spinning timeout value (in microseconds).
386  int receiveSpinningTimeout() const;
387 
388  /// Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the socket sending buffer availability
389  /// in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).
390  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
391  EngineSettings & sendSpinningTimeout(int value);
392 
393  /// Gets the current send spinning timeout value (in microseconds).
394  int sendSpinningTimeout() const;
395 
396  /// Sets the message grouping option:
397  /// Value 0 means the default grouping - the messages will be tried to send ASAP and pending messages (if any) will be grouped till reaching of the TCP buffer size.
398  /// Value 1 means the messages will be sent ASAP and never will be grouped.
399  /// Value 2 (or greater) means the messages will be sent ASAP and pending messages will be grouped maximum by 2 (or greater).
400  EngineSettings & messageGrouping(unsigned value);
401 
402  /// Gets the message grouping option.
403  unsigned messageGrouping() const;
404 
405  /// Gets the segment size for the file based session storage.
406  unsigned long long fileBasedStorageSegmentSize() const;
407 
408  /// Sets the segment size for the file based session storage.
409  /// @param value The maximum size of the single segment (single file) of the storage, in bytes.
410  EngineSettings & fileBasedStorageSegmentSize(unsigned long long value);
411 
412  /// Gets the log queue maximum size of the asynchronous session storage.
413  unsigned asyncFileBasedStorageQueueMaxSize() const;
414 
415  /// Sets the log queue maximum size of the asynchronous session storage.
416  EngineSettings & asyncFileBasedStorageQueueMaxSize(unsigned value);
417 
418  /// Sets the CPU affinity of asynchronous session storage threads.
419  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
420 
421  /// Sets the CPU affinity of asynchronous session storage threads.
422  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
423 
424  /// Returns the CPU affinity of asynchronous session storage threads.
425  const OnixS::Threading::CpuIndexes & asyncFileBasedStorageThreadAffinity();
426 
427  /// Gets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
428  bool ignoreFileBasedStorageIntegrityErrors() const;
429 
430  /// Sets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
431  /// @param value The mode of checking: true - ignore errors and create a new storage, false - throw an exception.
432  EngineSettings & ignoreFileBasedStorageIntegrityErrors(bool value);
433 
434  /// Gets the option to specify the ApplVerID(1128) tag in all application FIX messages when a FIX protocol version FIX 5.0 and above is used.
435  bool specifyApplVerIdField() const;
436 
437  /// Sets the option to specify the ApplVerID(1128) tag in all application FIX messages when a FIX protocol version FIX 5.0 and above is used.
438  EngineSettings & specifyApplVerIdField(bool value);
439 
440  /// Gets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
441  bool specifyLastMsgSeqNumProcessed() const;
442 
443  /// Sets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
444  EngineSettings & specifyLastMsgSeqNumProcessed(bool value);
445 
446  /// When the message gap is detected the "Resend Request" FIX Message is sent and the Session state is changed to "AwaitReplyOnResendRequest".
447  /// By default, in this state the incoming new messages (without the PossDupFlag (tag #43) flag) are ignored because we expect them to be re-sent later again with the PossDupFlag flag.
448  ///
449  /// This property allows to change this behavior and report the new messages anyway.
450  ///
451  /// @note In this mode, messages could be reported out of the original order: e.g. MsgSeqNum could be: 3 (original), 4 (original), 2 (PossDupFlag='Y'), 3 (PossDupFlag='Y'), 4 (PossDupFlag='Y')
452  /// and some messages could be received two times: first time without PossDupFlag='Y' and second time - with this flag.
453  bool reportNewMessagesWhileWaitingForMissedMessages() const;
454 
455  /// Sets the option to report new messages while waiting for missed messages.
456  EngineSettings & reportNewMessagesWhileWaitingForMissedMessages(bool value);
457 
458  /// Gets the expected incoming FIX message size. The value represents an average FIX message size that is expected to be received by the session during the lifetime.
459  /// It is used as a hint for the optimization of the deserialization of large FIX messages with a lot of repeating groups.
460  ///
461  /// @note The large value of the setting can increase the memory consumption by the incoming `Message` object,
462  /// so try to increase the value only in case of a latency degradation of the large incoming FIX messages deserialization.
463  int expectedIncomingMessageSize() const;
464 
465  /// Sets the expected incoming FIX message size.
466  EngineSettings & expectedIncomingMessageSize(int value);
467 
468  /// Sets the option to scramble fields in the Logon(A) message, in the session storage and the FIX Engine log, for security reasons.
469  EngineSettings & scrambleLogonFields(const Session::ScrambledFields & fields);
470 
471  /// Gets scrambled fields in the Logon(A) message.
472  Session::ScrambledFields scrambleLogonFields() const;
473 
474  /// Sets the send queue maximum size in bytes.
475  EngineSettings & sendQueueMaxSize(size_t size);
476 
477  /// Gets the send queue maximum size in bytes.
478  size_t sendQueueMaxSize() const;
479 
480  /// Sets the timeout (in seconds) between an incoming TCP connection is detected and the first Logon message is received.
481  /// If the first Logon message is not received during this timeout + reasonable transmission time, the connection will be closed.
482  EngineSettings & firstLogonTimeout(unsigned timeout);
483 
484  /// Gets the first Logon timeout.
485  unsigned firstLogonTimeout() const;
486 
487  /// Gets the option to validate the presence of unknown FIX messages (messages that do not belong to the message in accordance with the FIX protocol or its FIX Dictionary).
488  bool validateUnknownMessages() const;
489 
490  /// Sets the option to validate the presence of unknown FIX messages (messages that do not belong to the message in accordance with the FIX protocol or its FIX Dictionary).
491  EngineSettings & validateUnknownMessages(bool);
492 
493  /// Gets the option to validate the presence of unknown fields (fields that do not belong to the message in accordance with the FIX protocol or its FIX Dictionary.
494  bool validateUnknownFields() const;
495 
496  /// Sets the option to validate the presence of unknown fields (fields that do not belong to the message in accordance with the FIX protocol or its FIX Dictionary.
497  EngineSettings & validateUnknownFields(bool);
498 
499  /// Gets the option to validate the presence of required fields in inbound and outbound messages.
500  bool validateRequiredFields() const;
501 
502  /// Sets the option to validate the presence of required fields in inbound and outbound messages.
503  EngineSettings & validateRequiredFields(bool);
504 
505  /// Gets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
506  bool validateFieldValues() const;
507 
508  /// Sets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
509  EngineSettings & validateFieldValues(bool);
510 
511  /// Gets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
512  bool validateEmptyFieldValues() const;
513 
514  /// Sets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
515  EngineSettings & validateEmptyFieldValues(bool);
516 
517  /// Gets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
518  bool validateRepeatingGroupEntryCount() const;
519 
520  /// Sets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
521  EngineSettings & validateRepeatingGroupEntryCount(bool);
522 
523  /// Gets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
524  bool validateRepeatingGroupLeadingTag() const;
525 
526  /// Sets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
527  EngineSettings & validateRepeatingGroupLeadingTag(bool);
528 
529  /// Gets the option to validate the duplicated field.
530  bool validateDuplicatedField() const;
531 
532  /// Sets the option to validate the duplicated field.
533  EngineSettings & validateDuplicatedField(bool);
534 
535  /// Gets the option to validate the checksum of incoming messages.
536  bool validateChecksum() const;
537 
538  /// Sets the option to validate the checksum of incoming messages.
539  EngineSettings & validateChecksum(bool);
540 
541  /// The heartbeat resolution enum.
543  {
544  // The heartbeat is measured in deciseconds.
545  DecisecondsHeartbeatResolution = 100,
546 
547  // The heartbeat is measured in seconds.
548  SecondsHeartbeatResolution = 1000
549  };
550 
551  /// Sets the heartbeat resolution.
552  /// @note This setting should be used only to speed up heartbeat related Unit Tests.
553  EngineSettings & heartbeatResolution(HeartbeatResolution resolution);
554 
555  /// Gets the heartbeat resolution.
556  HeartbeatResolution heartbeatResolution() const;
557 
558 private:
559  friend class Engine;
560 
561  const OnixS::System::ISettings & settings() const;
562 
563  struct Implementation;
564  Implementation * impl;
565 };
566 }
567 }
static const int UseDefaultSendBufferSize
Specifies the usage of the operating system default SendBuffer size.
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0)...
Definition: Thread.h:31
static const int UseDefaultReceiveBufferSize
Specifies the usage of the operating system default RecvBuffer size.
std::vector< Tag > ScrambledFields
The collection of scrambled tags.
Definition: Session.h:1672
#define ONIXS_FIXENGINE_API
Definition: ABI.h:45
virtual size_t resendingQueueSize() const =0
Returns the number of sent messages that are available for resending on counterparty&#39;s Resend Request...
std::string LocalNetworkInterface
Local interfaces.
std::set< CpuIndex > CpuIndexes
Definition: Thread.h:32
std::vector< int > ListenPorts
Listen ports.
Definition: Engine.h:36
The immutable secure string.
Definition: SecureString.h:29
FIX Engine settings.
The FIX Engine.
Definition: Engine.h:39
HeartbeatResolution
The heartbeat resolution enum.
std::vector< LocalNetworkInterface > LocalNetworkInterfaces