OnixS C++ FIX Engine  4.13.0
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  /// @note 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  /// @note 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 sent in reply to the Resend Request <2> before temporarily releasing the Session’s lock.
260  EngineSettings & resendingBatchSize(size_t value);
261 
262  /// Returns the maximum number of messages sent in reply to the Resend Request <2> before temporarily releasing the Session’s lock.
263  size_t resendingBatchSize() const;
264 
265  /// Sets the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
266  EngineSettings & resendRequestMaximumRange(int value);
267 
268  /// Returns the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
269  int resendRequestMaximumRange() const;
270 
271  /// Specifies the usage of the operating system default RecvBuffer size.
272  static const int UseDefaultReceiveBufferSize;
273 
274  /// Returns the size of the TCP buffer allocated to the FIX connection for receiving data.
275  /// If '-1' then the default operating system value is used.
276  int receiveBufferSize() const;
277 
278  /// Sets the size of the TCP buffer allocated to the FIX connection for receiving data.
279  /// If '-1' then the default operating system value is used.
280  EngineSettings & receiveBufferSize(int value);
281 
282  /// Specifies the usage of the operating system default SendBuffer size.
283  static const int UseDefaultSendBufferSize;
284 
285  /// Returns the size of the TCP buffer allocated to the FIX connection for sending data.
286  /// If '-1' then the default operating system value is used.
287  int sendBufferSize() const;
288 
289  /// Sets the size of the TCP buffer allocated to the FIX connection for sending data.
290  /// If '-1' then the default operating system value is used.
291  EngineSettings & sendBufferSize(int value);
292 
293  /// 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.
294  EngineSettings & sendLogoutOnException(bool value);
295 
296  /// 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.
297  bool sendLogoutOnException() const;
298 
299  /// Returns the value of the option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
300  EngineSettings & sendLogoutOnInvalidLogon(bool value);
301 
302  /// The option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
303  bool sendLogoutOnInvalidLogon() const;
304 
305  /// Sets the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
306  EngineSettings & sslCertificateFile(const std::string & value);
307 
308  /// Returns the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
309  const std::string & sslCertificateFile() const;
310 
311  /// Sets the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
312  EngineSettings & sslPrivateKeyFile(const std::string & value);
313 
314  /// Returns the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
315  const std::string & sslPrivateKeyFile() const;
316 
317  /// Set the password to load private keys that are protected by a password.
318  EngineSettings & sslPrivateKeyPassword(const Cryptography::SecureString & value);
319 
320  /// Returns the password to load private keys that are protected by a password.
321  Cryptography::SecureString sslPrivateKeyPassword() const;
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  EngineSettings & sslListenPort(int value);
328 
329  /// The FIX Engine listens on this port for incoming SSL connections.
330  ///
331  /// @note If '0' then only session-initiators can be created.
332  /// @note If '-1' then the telecommunication level is disabled and only message parsing/assembling can be used.
333  int sslListenPort() const;
334 
335  /// Sets SSL listen ports.
336  EngineSettings & sslListenPorts(const ListenPorts & value);
337 
338  /// Returns SSL listen ports.
339  const ListenPorts & sslListenPorts() const;
340 
341  /// The FIX Engine listens on these local interfaces for incoming SSL connections.
342  const LocalNetworkInterfaces & sslLocalInterface() const;
343 
344  /// Sets local interfaces where the engine listen for incoming SSL connections.
345  /// @note At least a single SSL-listen port have to be specified to make the engine able to use this setting.
346  EngineSettings & sslLocalInterface(const LocalNetworkInterfaces &);
347 
348  /// Set the option to request client certificates and perform the certificate verification.
349  EngineSettings & sslVerifyPeer(bool verify);
350 
351  /// Returns the option to request client certificates and perform the certificate verification.
352  bool sslVerifyPeer() const;
353 
354  /// Sets the client-side SNI-extension field.
355  /// When it is not empty, then this field provides SNI-name.
356  /// When the field value is "*" (wildcard), then the SNI name will be taken from the connection URL.
357  ///
358  /// @note Connection URL cannot be an IP address when the value "*" is used.
359  EngineSettings & sslClientSni(const std::string & hostName);
360 
361  /// Returns the client-side SNI-extension field.
362  const std::string & sslClientSni() const;
363 
364  /// Sets the path to the trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
365  EngineSettings & sslCaFile(const std::string & value);
366 
367  /// Returns the path to trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
368  const std::string & sslCaFile() const;
369 
370  /// Sets the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
371  EngineSettings & sslMinProtocolVersion(SslProtocolMinMaxVersion::Enum version);
372 
373  /// Returns the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
374  SslProtocolMinMaxVersion::Enum sslMinProtocolVersion() const;
375 
376  /// Sets the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
377  EngineSettings & sslMaxProtocolVersion(SslProtocolMinMaxVersion::Enum version);
378 
379  /// Returns the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
380  SslProtocolMinMaxVersion::Enum sslMaxProtocolVersion() const;
381 
382  /// Sets the CPU affinity of Engine service threads.
383  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
384 
385  /// Sets the CPU affinity of Engine service threads.
386  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
387 
388  /// Returns the CPU affinity of Engine service threads.
389  const OnixS::Threading::CpuIndexes & serviceThreadAffinity();
390 
391  /// Returns the priority of Engine service threads.
392  int serviceThreadPriority() const;
393 
394  /// Sets the priority of Engine service threads.
395  EngineSettings & serviceThreadPriority(int priority);
396 
397  /// Returns the policy of Engine service threads.
398  int serviceThreadPolicy() const;
399 
400  /// Sets the policy of Engine service threads.
401  EngineSettings & serviceThreadPolicy(int policy);
402 
403  /// Sets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
404  EngineSettings & tcpNoDelayOption(bool value);
405 
406  /// Gets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
407  bool tcpNoDelayOption() const;
408 
409  /// Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode
410  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
411  EngineSettings & receiveSpinningTimeout(int value);
412 
413  /// Gets the current receive spinning timeout value (in microseconds).
414  int receiveSpinningTimeout() const;
415 
416  /// Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the socket sending buffer availability
417  /// in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).
418  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
419  EngineSettings & sendSpinningTimeout(int value);
420 
421  /// Gets the current send spinning timeout value (in microseconds).
422  int sendSpinningTimeout() const;
423 
424  /// Sets the message grouping option:
425  /// 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.
426  /// Value 1 means the messages will be sent ASAP and never will be grouped.
427  /// Value 2 (or greater) means the messages will be sent ASAP and pending messages will be grouped maximum by 2 (or greater).
428  EngineSettings & messageGrouping(unsigned value);
429 
430  /// Gets the message grouping option.
431  unsigned messageGrouping() const;
432 
433  /// Gets the segment size for the file based session storage.
434  unsigned long long fileBasedStorageSegmentSize() const;
435 
436  /// Sets the segment size for the file based session storage.
437  /// @param value The maximum size of the single segment (single file) of the storage, in bytes.
438  EngineSettings & fileBasedStorageSegmentSize(unsigned long long value);
439 
440  /// Gets the log queue maximum size of the asynchronous session storage.
441  unsigned asyncFileBasedStorageQueueMaxSize() const;
442 
443  /// Sets the log queue maximum size of the asynchronous session storage.
444  EngineSettings & asyncFileBasedStorageQueueMaxSize(unsigned value);
445 
446  /// Sets the CPU affinity of asynchronous session storage threads.
447  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
448 
449  /// Sets the CPU affinity of asynchronous session storage threads.
450  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
451 
452  /// Returns the CPU affinity of asynchronous session storage threads.
453  const OnixS::Threading::CpuIndexes & asyncFileBasedStorageThreadAffinity();
454 
455  /// Gets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
456  bool ignoreFileBasedStorageIntegrityErrors() const;
457 
458  /// Sets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
459  /// @param value The mode of checking: true - ignore errors and create a new storage, false - throw an exception.
460  EngineSettings & ignoreFileBasedStorageIntegrityErrors(bool value);
461 
462  /// 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.
463  bool specifyApplVerIdField() const;
464 
465  /// 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.
466  EngineSettings & specifyApplVerIdField(bool value);
467 
468  /// Gets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
469  bool specifyLastMsgSeqNumProcessed() const;
470 
471  /// Sets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
472  EngineSettings & specifyLastMsgSeqNumProcessed(bool value);
473 
474  /// When the message gap is detected the "Resend Request" FIX Message is sent and the Session state is changed to "AwaitReplyOnResendRequest".
475  /// 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.
476  ///
477  /// This property allows to change this behavior and report the new messages anyway.
478  ///
479  /// @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')
480  /// and some messages could be received two times: first time without PossDupFlag='Y' and second time - with this flag.
481  bool reportNewMessagesWhileWaitingForMissedMessages() const;
482 
483  /// Sets the option to report new messages while waiting for missed messages.
484  EngineSettings & reportNewMessagesWhileWaitingForMissedMessages(bool value);
485 
486  /// 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.
487  /// It is used as a hint for the optimization of the deserialization of large FIX messages with a lot of repeating groups.
488  ///
489  /// @note The large value of the setting can increase the memory consumption by the incoming `Message` object,
490  /// so try to increase the value only in case of a latency degradation of the large incoming FIX messages deserialization.
491  int expectedIncomingMessageSize() const;
492 
493  /// Sets the expected incoming FIX message size.
494  EngineSettings & expectedIncomingMessageSize(int value);
495 
496  /// Sets the option to scramble fields in the Logon(A) message, in the session storage and the FIX Engine log, for security reasons.
497  EngineSettings & scrambleLogonFields(const Session::ScrambledFields & fields);
498 
499  /// Gets scrambled fields in the Logon(A) message.
500  Session::ScrambledFields scrambleLogonFields() const;
501 
502  /// Sets the send queue maximum size in bytes.
503  EngineSettings & sendQueueMaxSize(size_t size);
504 
505  /// Gets the send queue maximum size in bytes.
506  size_t sendQueueMaxSize() const;
507 
508  /// Sets the timeout (in seconds) between an incoming TCP connection is detected and the first Logon message is received.
509  /// If the first Logon message is not received during this timeout + reasonable transmission time, the connection will be closed.
510  EngineSettings & firstLogonTimeout(unsigned timeout);
511 
512  /// Gets the first Logon timeout.
513  unsigned firstLogonTimeout() const;
514 
515  /// Gets the value of the option to enable received data timestamp.
516  bool enableRxTimestamp() const;
517 
518  /// Sets the value of the option to enable received data timestamp.
519  EngineSettings & enableRxTimestamp(bool value);
520 
521  /// 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).
522  bool validateUnknownMessages() const;
523 
524  /// 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).
525  EngineSettings & validateUnknownMessages(bool);
526 
527  /// 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.
528  bool validateUnknownFields() const;
529 
530  /// 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.
531  EngineSettings & validateUnknownFields(bool);
532 
533  /// Gets the option to validate the presence of required fields in inbound and outbound messages.
534  bool validateRequiredFields() const;
535 
536  /// Sets the option to validate the presence of required fields in inbound and outbound messages.
537  EngineSettings & validateRequiredFields(bool);
538 
539  /// Gets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
540  bool validateFieldValues() const;
541 
542  /// Sets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
543  EngineSettings & validateFieldValues(bool);
544 
545  /// Gets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
546  bool validateEmptyFieldValues() const;
547 
548  /// Sets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
549  EngineSettings & validateEmptyFieldValues(bool);
550 
551  /// Gets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
552  bool validateRepeatingGroupEntryCount() const;
553 
554  /// Sets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
555  EngineSettings & validateRepeatingGroupEntryCount(bool);
556 
557  /// Gets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
558  bool validateRepeatingGroupLeadingTag() const;
559 
560  /// Sets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
561  EngineSettings & validateRepeatingGroupLeadingTag(bool);
562 
563  /// Gets the option to validate the duplicated field.
564  bool validateDuplicatedField() const;
565 
566  /// Sets the option to validate the duplicated field.
567  EngineSettings & validateDuplicatedField(bool);
568 
569  /// Gets the option to validate the checksum of incoming messages.
570  bool validateChecksum() const;
571 
572  /// Sets the option to validate the checksum of incoming messages.
573  EngineSettings & validateChecksum(bool);
574 
575  /// The heartbeat resolution enum.
577  {
578  // The heartbeat is measured in deciseconds.
579  DecisecondsHeartbeatResolution = 100,
580 
581  // The heartbeat is measured in seconds.
582  SecondsHeartbeatResolution = 1000
583  };
584 
585  /// Sets the heartbeat resolution.
586  /// @note This setting should be used only to speed up heartbeat related Unit Tests.
587  EngineSettings & heartbeatResolution(HeartbeatResolution resolution);
588 
589  /// Gets the heartbeat resolution.
590  HeartbeatResolution heartbeatResolution() const;
591 
592 private:
593  friend class Engine;
594 
595  const OnixS::System::ISettings & settings() const;
596 
597  struct Implementation;
598  Implementation * impl;
599 };
600 }
601 }
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:1747
#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:40
HeartbeatResolution
The heartbeat resolution enum.
std::vector< LocalNetworkInterface > LocalNetworkInterfaces