OnixS C++ FIX Engine  4.12.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 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 client-side SNI-extension field.
349  /// When it is not empty, then this field provides SNI-name.
350  /// When the field value is "*" (wildcard), then the SNI name will be taken from the connection URL.
351  ///
352  /// @note Connection URL cannot be an IP address when the value "*" is used.
353  EngineSettings & sslClientSni(const std::string & hostName);
354 
355  /// Returns the client-side SNI-extension field.
356  const std::string & sslClientSni() const;
357 
358  /// Sets the path to the trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
359  EngineSettings & sslCaFile(const std::string & value);
360 
361  /// Returns the path to trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
362  const std::string & sslCaFile() const;
363 
364  /// Sets the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
365  EngineSettings & sslMinProtocolVersion(SslProtocolMinMaxVersion::Enum version);
366 
367  /// Returns the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
368  SslProtocolMinMaxVersion::Enum sslMinProtocolVersion() const;
369 
370  /// Sets the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
371  EngineSettings & sslMaxProtocolVersion(SslProtocolMinMaxVersion::Enum version);
372 
373  /// Returns the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
374  SslProtocolMinMaxVersion::Enum sslMaxProtocolVersion() const;
375 
376  /// Sets the CPU affinity of Engine service threads.
377  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
378 
379  /// Sets the CPU affinity of Engine service threads.
380  EngineSettings & serviceThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
381 
382  /// Returns the CPU affinity of Engine service threads.
383  const OnixS::Threading::CpuIndexes & serviceThreadAffinity();
384 
385  /// Returns the priority of Engine service threads.
386  int serviceThreadPriority() const;
387 
388  /// Sets the priority of Engine service threads.
389  EngineSettings & serviceThreadPriority(int priority);
390 
391  /// Returns the policy of Engine service threads.
392  int serviceThreadPolicy() const;
393 
394  /// Sets the policy of Engine service threads.
395  EngineSettings & serviceThreadPolicy(int policy);
396 
397  /// Sets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
398  EngineSettings & tcpNoDelayOption(bool value);
399 
400  /// Gets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
401  bool tcpNoDelayOption() const;
402 
403  /// Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode
404  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
405  EngineSettings & receiveSpinningTimeout(int value);
406 
407  /// Gets the current receive spinning timeout value (in microseconds).
408  int receiveSpinningTimeout() const;
409 
410  /// Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the socket sending buffer availability
411  /// in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).
412  /// @note Should not be greater than 1 sec (minimal Heartbeat interval).
413  EngineSettings & sendSpinningTimeout(int value);
414 
415  /// Gets the current send spinning timeout value (in microseconds).
416  int sendSpinningTimeout() const;
417 
418  /// Sets the message grouping option:
419  /// 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.
420  /// Value 1 means the messages will be sent ASAP and never will be grouped.
421  /// Value 2 (or greater) means the messages will be sent ASAP and pending messages will be grouped maximum by 2 (or greater).
422  EngineSettings & messageGrouping(unsigned value);
423 
424  /// Gets the message grouping option.
425  unsigned messageGrouping() const;
426 
427  /// Gets the segment size for the file based session storage.
428  unsigned long long fileBasedStorageSegmentSize() const;
429 
430  /// Sets the segment size for the file based session storage.
431  /// @param value The maximum size of the single segment (single file) of the storage, in bytes.
432  EngineSettings & fileBasedStorageSegmentSize(unsigned long long value);
433 
434  /// Gets the log queue maximum size of the asynchronous session storage.
435  unsigned asyncFileBasedStorageQueueMaxSize() const;
436 
437  /// Sets the log queue maximum size of the asynchronous session storage.
438  EngineSettings & asyncFileBasedStorageQueueMaxSize(unsigned value);
439 
440  /// Sets the CPU affinity of asynchronous session storage threads.
441  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
442 
443  /// Sets the CPU affinity of asynchronous session storage threads.
444  EngineSettings & asyncFileBasedStorageThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
445 
446  /// Returns the CPU affinity of asynchronous session storage threads.
447  const OnixS::Threading::CpuIndexes & asyncFileBasedStorageThreadAffinity();
448 
449  /// Gets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
450  bool ignoreFileBasedStorageIntegrityErrors() const;
451 
452  /// Sets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
453  /// @param value The mode of checking: true - ignore errors and create a new storage, false - throw an exception.
454  EngineSettings & ignoreFileBasedStorageIntegrityErrors(bool value);
455 
456  /// 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.
457  bool specifyApplVerIdField() const;
458 
459  /// 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.
460  EngineSettings & specifyApplVerIdField(bool value);
461 
462  /// Gets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
463  bool specifyLastMsgSeqNumProcessed() const;
464 
465  /// Sets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
466  EngineSettings & specifyLastMsgSeqNumProcessed(bool value);
467 
468  /// When the message gap is detected the "Resend Request" FIX Message is sent and the Session state is changed to "AwaitReplyOnResendRequest".
469  /// 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.
470  ///
471  /// This property allows to change this behavior and report the new messages anyway.
472  ///
473  /// @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')
474  /// and some messages could be received two times: first time without PossDupFlag='Y' and second time - with this flag.
475  bool reportNewMessagesWhileWaitingForMissedMessages() const;
476 
477  /// Sets the option to report new messages while waiting for missed messages.
478  EngineSettings & reportNewMessagesWhileWaitingForMissedMessages(bool value);
479 
480  /// 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.
481  /// It is used as a hint for the optimization of the deserialization of large FIX messages with a lot of repeating groups.
482  ///
483  /// @note The large value of the setting can increase the memory consumption by the incoming `Message` object,
484  /// so try to increase the value only in case of a latency degradation of the large incoming FIX messages deserialization.
485  int expectedIncomingMessageSize() const;
486 
487  /// Sets the expected incoming FIX message size.
488  EngineSettings & expectedIncomingMessageSize(int value);
489 
490  /// Sets the option to scramble fields in the Logon(A) message, in the session storage and the FIX Engine log, for security reasons.
491  EngineSettings & scrambleLogonFields(const Session::ScrambledFields & fields);
492 
493  /// Gets scrambled fields in the Logon(A) message.
494  Session::ScrambledFields scrambleLogonFields() const;
495 
496  /// Sets the send queue maximum size in bytes.
497  EngineSettings & sendQueueMaxSize(size_t size);
498 
499  /// Gets the send queue maximum size in bytes.
500  size_t sendQueueMaxSize() const;
501 
502  /// Sets the timeout (in seconds) between an incoming TCP connection is detected and the first Logon message is received.
503  /// If the first Logon message is not received during this timeout + reasonable transmission time, the connection will be closed.
504  EngineSettings & firstLogonTimeout(unsigned timeout);
505 
506  /// Gets the first Logon timeout.
507  unsigned firstLogonTimeout() const;
508 
509  /// 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).
510  bool validateUnknownMessages() const;
511 
512  /// 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).
513  EngineSettings & validateUnknownMessages(bool);
514 
515  /// 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.
516  bool validateUnknownFields() const;
517 
518  /// 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.
519  EngineSettings & validateUnknownFields(bool);
520 
521  /// Gets the option to validate the presence of required fields in inbound and outbound messages.
522  bool validateRequiredFields() const;
523 
524  /// Sets the option to validate the presence of required fields in inbound and outbound messages.
525  EngineSettings & validateRequiredFields(bool);
526 
527  /// Gets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
528  bool validateFieldValues() const;
529 
530  /// Sets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
531  EngineSettings & validateFieldValues(bool);
532 
533  /// Gets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
534  bool validateEmptyFieldValues() const;
535 
536  /// Sets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
537  EngineSettings & validateEmptyFieldValues(bool);
538 
539  /// Gets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
540  bool validateRepeatingGroupEntryCount() const;
541 
542  /// Sets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
543  EngineSettings & validateRepeatingGroupEntryCount(bool);
544 
545  /// Gets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
546  bool validateRepeatingGroupLeadingTag() const;
547 
548  /// Sets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
549  EngineSettings & validateRepeatingGroupLeadingTag(bool);
550 
551  /// Gets the option to validate the duplicated field.
552  bool validateDuplicatedField() const;
553 
554  /// Sets the option to validate the duplicated field.
555  EngineSettings & validateDuplicatedField(bool);
556 
557  /// Gets the option to validate the checksum of incoming messages.
558  bool validateChecksum() const;
559 
560  /// Sets the option to validate the checksum of incoming messages.
561  EngineSettings & validateChecksum(bool);
562 
563  /// The heartbeat resolution enum.
565  {
566  // The heartbeat is measured in deciseconds.
567  DecisecondsHeartbeatResolution = 100,
568 
569  // The heartbeat is measured in seconds.
570  SecondsHeartbeatResolution = 1000
571  };
572 
573  /// Sets the heartbeat resolution.
574  /// @note This setting should be used only to speed up heartbeat related Unit Tests.
575  EngineSettings & heartbeatResolution(HeartbeatResolution resolution);
576 
577  /// Gets the heartbeat resolution.
578  HeartbeatResolution heartbeatResolution() const;
579 
580 private:
581  friend class Engine;
582 
583  const OnixS::System::ISettings & settings() const;
584 
585  struct Implementation;
586  Implementation * impl;
587 };
588 }
589 }
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:1730
#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