#include <OnixS/FIXEngine/FIX/EngineSettings.h>
Public Types | |
enum | HeartbeatResolution { DecisecondsHeartbeatResolution = 100, SecondsHeartbeatResolution = 1000 } |
Static Public Attributes | |
static const int | UseDefaultReceiveBufferSize |
static const int | UseDefaultSendBufferSize |
Friends | |
class | Engine |
Definition at line 45 of file EngineSettings.h.
enum HeartbeatResolution |
The heartbeat resolution enum.
Enumerator | |
---|---|
DecisecondsHeartbeatResolution | |
SecondsHeartbeatResolution |
Definition at line 564 of file EngineSettings.h.
EngineSettings | ( | ) |
The constructor.
|
explicit |
The constructor to create the EngineSettings from a Configuration string.
EngineSettings | ( | const EngineSettings & | ) |
The copy constructor.
~EngineSettings | ( | ) |
The destructor.
unsigned asyncFileBasedStorageQueueMaxSize | ( | ) | const |
Gets the log queue maximum size of the asynchronous session storage.
EngineSettings& asyncFileBasedStorageQueueMaxSize | ( | unsigned | value | ) |
Sets the log queue maximum size of the asynchronous session storage.
EngineSettings& asyncFileBasedStorageThreadAffinity | ( | const OnixS::Threading::CpuIndexes & | cpuIndexes | ) |
Sets the CPU affinity of asynchronous session storage threads.
EngineSettings& asyncFileBasedStorageThreadAffinity | ( | const OnixS::Threading::CpuIndex | cpuIndex | ) |
Sets the CPU affinity of asynchronous session storage threads.
const OnixS::Threading::CpuIndexes& asyncFileBasedStorageThreadAffinity | ( | ) |
Returns the CPU affinity of asynchronous session storage threads.
EngineSettings& createEngineLogFile | ( | bool | value | ) |
EngineSettings& dialectString | ( | const std::string & | value | ) |
Specifies the plain text string with a description of the FIX dialect.
const std::string& dialectString | ( | ) | const |
Returns the string that contains the plain text string with the description of the FIX dialect.
EngineSettings& dictionaryFile | ( | const std::string & | value | ) |
Specifies the path(s) to the XML file(s) with the description of the FIX Dictionary(s).
const std::string& dictionaryFile | ( | ) | const |
Returns the path to the XML file with the description of the FIX Dictionary(s).
int expectedIncomingMessageSize | ( | ) | const |
EngineSettings& expectedIncomingMessageSize | ( | int | value | ) |
Sets the expected incoming FIX message size.
unsigned long long fileBasedStorageSegmentSize | ( | ) | const |
Gets the segment size for the file based session storage.
EngineSettings& fileBasedStorageSegmentSize | ( | unsigned long long | value | ) |
Sets the segment size for the file based session storage.
value | The maximum size of the single segment (single file) of the storage, in bytes. |
EngineSettings& firstLogonTimeout | ( | unsigned | timeout | ) |
Sets the timeout (in seconds) between an incoming TCP connection is detected and the first Logon message is received.
If the first Logon message is not received during this timeout + reasonable transmission time, the connection will be closed.
unsigned firstLogonTimeout | ( | ) | const |
Gets the first Logon timeout.
EngineSettings& heartbeatResolution | ( | HeartbeatResolution | resolution | ) |
Sets the heartbeat resolution.
HeartbeatResolution heartbeatResolution | ( | ) | const |
Gets the heartbeat resolution.
bool ignoreFileBasedStorageIntegrityErrors | ( | ) | const |
Gets mode of the file based storage integrity errors checking. Valuable only when the value of fileBasedStorageSegmentSize != 0.
EngineSettings& ignoreFileBasedStorageIntegrityErrors | ( | bool | value | ) |
Sets mode of the file based storage integrity errors checking.
Valuable only when the value of fileBasedStorageSegmentSize != 0.
value | The mode of checking: true - ignore errors and create a new storage, false - throw an exception. |
unsigned licenseAlertingDaysBeforeExpiration | ( | ) |
Returns the number of days to alert before the license expiration.
EngineSettings& licenseAlertingDaysBeforeExpiration | ( | unsigned | value | ) |
Sets the number of days to alert before the license expiration.
If the amount of remaining license days is less or equal to this number then the warning will be reported to the FIX Engine's log and IEngineListener::onWarning callback will be invoked. The verification is performed during the following events: the FIX Engine initialization, Session::logonAsAcceptor and Session::logonAsInitiator calls.
EngineSettings& licenseFile | ( | const std::string & | value | ) |
Specifies the path to the license file.
const std::string& licenseFile | ( | ) | const |
Returns the path to the license file.
EngineSettings& licenseStore | ( | const std::string & | value | ) |
Specifies the path to the license directory.
const std::string& licenseStore | ( | ) | const |
Returns the path to the license directory.
EngineSettings& licenseString | ( | const std::string & | value | ) |
Specifies the string of the license content.
const std::string& licenseString | ( | ) | const |
Returns the string of the license content.
EngineSettings& listenPort | ( | int | value | ) |
int listenPort | ( | ) | const |
EngineSettings& listenPorts | ( | const ListenPorts & | value | ) |
Set listen ports.
const ListenPorts& listenPorts | ( | ) | const |
Returns listen ports.
void loadFromConfigFile | ( | const std::string & | configFile | ) |
Loads Engine settings from a Configuration file.
const LocalNetworkInterfaces& localNetworkInterface | ( | ) | const |
EngineSettings& localNetworkInterface | ( | const LocalNetworkInterfaces & | ) |
Sets local interfaces where the engine listen for incoming connections.
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 a local interface specification contains the same port as specified at listenPort settings the listening appears only on the interface and port specified at the localInterface setting.
EngineSettings& localNetworkInterface | ( | const LocalNetworkInterface & | ) |
Sets the local interface where the engine listen for incoming connections.
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 a local interface specification contains the same port as specified at listenPort settings the listening appears only on the interface and port specified at the localInterface setting.
EngineSettings& localTimeUsage | ( | bool | value | ) |
bool logBeforeSending | ( | ) | const |
Returns 'true' if outbound messages are logged before sending, otherwise - 'false'.
EngineSettings& logBeforeSending | ( | bool | value | ) |
The option to switch on/off logging of outbound messages before/after sending.
EngineSettings& logDirectory | ( | const std::string & | value | ) |
const std::string& logDirectory | ( | ) | const |
EngineSettings& logFileName | ( | const std::string & | value | ) |
bool logInboundMessages | ( | ) | const |
Returns 'true' if inbound messages are logged, otherwise - 'false'.
EngineSettings& logInboundMessages | ( | bool | value | ) |
The option to log inbound messages.
bool logOutboundMessages | ( | ) | const |
Returns 'true' if outbound messages are logged, otherwise - 'false'.
EngineSettings& logOutboundMessages | ( | bool | value | ) |
The option to log outbound messages.
EngineSettings& messageGrouping | ( | unsigned | value | ) |
Sets the message grouping option: 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.
Value 1 means the messages will be sent ASAP and never will be grouped. Value 2 (or greater) means the messages will be sent ASAP and pending messages will be grouped maximum by 2 (or greater).
unsigned messageGrouping | ( | ) | const |
Gets the message grouping option.
EngineSettings& operator= | ( | const EngineSettings & | ) |
The assignment.
EngineSettings& processDeliverToCompId | ( | bool | value | ) |
The option to process the DeliverToCompID (tag 128) flag.
bool processDeliverToCompId | ( | ) | const |
The option to process the DeliverToCompID (tag 128) flag.
EngineSettings& reasonableTransmissionTime | ( | int | value | ) |
The reasonable transmission time as % from the HeartBtInt value.
When either end of the connection has not received any data for (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds, it will transmit a Test Request message.
If there is still no a Heartbeat message received after (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds then the connection should be considered lost and a corrective action should be initiated.
int reasonableTransmissionTime | ( | ) | const |
The reasonable transmission time as % from HeartBtInt value.
When either end of the connection has not received any data for (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds, it will transmit a Test Request message.
If there is still no a Heartbeat message received after (HeartBtInt * (100 + ReasonableTransmissionTime)/100) seconds then the connection should be considered lost and a corrective action should be initiated.
int receiveBufferSize | ( | ) | const |
Returns the size of the TCP buffer allocated to the FIX connection for receiving data.
If '-1' then the default operating system value is used.
EngineSettings& receiveBufferSize | ( | int | value | ) |
Sets the size of the TCP buffer allocated to the FIX connection for receiving data.
If '-1' then the default operating system value is used.
EngineSettings& receiveSpinningTimeout | ( | int | value | ) |
Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode.
int receiveSpinningTimeout | ( | ) | const |
Gets the current receive spinning timeout value (in microseconds).
EngineSettings& reconnectAttempts | ( | int | value | ) |
Sets the number of attempts to restore the FIX connection.
int reconnectAttempts | ( | ) | const |
Returns the number of attempts to restore the FIX connection.
EngineSettings& reconnectInterval | ( | int | value | ) |
Sets the time interval between the attempts to restore the FIX connection (in seconds).
int reconnectInterval | ( | ) | const |
Returns the time interval between the attempts to restore the FIX connection (in seconds).
bool reportNewMessagesWhileWaitingForMissedMessages | ( | ) | const |
When the message gap is detected the "Resend Request" FIX Message is sent and the Session state is changed to "AwaitReplyOnResendRequest".
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.
This property allows to change this behavior and report the new messages anyway.
EngineSettings& reportNewMessagesWhileWaitingForMissedMessages | ( | bool | value | ) |
Sets the option to report new messages while waiting for missed messages.
EngineSettings& resendingQueueSize | ( | size_t | value | ) |
Sets the number of sent messages that are available for the resending on the counterparty's Resend Request <2> message.
size_t resendingQueueSize | ( | ) | const |
Returns the number of sent messages that are available for the resending on the counterparty's Resend Request <2> message.
The zero value means that sent messages are not available for the resending. The value cannot be negative.
EngineSettings& resendRequestMaximumRange | ( | int | value | ) |
Sets the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
int resendRequestMaximumRange | ( | ) | const |
Returns the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
EngineSettings& scrambleLogonFields | ( | const Session::ScrambledFields & | fields | ) |
Session::ScrambledFields scrambleLogonFields | ( | ) | const |
Gets scrambled fields in the Logon(A) message.
int sendBufferSize | ( | ) | const |
Returns the size of the TCP buffer allocated to the FIX connection for sending data.
If '-1' then the default operating system value is used.
EngineSettings& sendBufferSize | ( | int | value | ) |
Sets the size of the TCP buffer allocated to the FIX connection for sending data.
If '-1' then the default operating system value is used.
EngineSettings& sendLogoutOnException | ( | bool | value | ) |
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.
bool sendLogoutOnException | ( | ) | const |
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.
EngineSettings& sendLogoutOnInvalidLogon | ( | bool | value | ) |
Returns the value of the option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
bool sendLogoutOnInvalidLogon | ( | ) | const |
The option to send the Logout message before dropping the telecommunication link in case of an invalid logon attempt.
EngineSettings& sendQueueMaxSize | ( | size_t | size | ) |
Sets the send queue maximum size in bytes.
size_t sendQueueMaxSize | ( | ) | const |
Gets the send queue maximum size in bytes.
EngineSettings& sendSpinningTimeout | ( | int | value | ) |
Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the socket sending buffer availability in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).
int sendSpinningTimeout | ( | ) | const |
Gets the current send spinning timeout value (in microseconds).
EngineSettings& serviceThreadAffinity | ( | const OnixS::Threading::CpuIndexes & | cpuIndexes | ) |
Sets the CPU affinity of Engine service threads.
EngineSettings& serviceThreadAffinity | ( | const OnixS::Threading::CpuIndex | cpuIndex | ) |
Sets the CPU affinity of Engine service threads.
const OnixS::Threading::CpuIndexes& serviceThreadAffinity | ( | ) |
Returns the CPU affinity of Engine service threads.
int serviceThreadPolicy | ( | ) | const |
Returns the policy of Engine service threads.
EngineSettings& serviceThreadPolicy | ( | int | policy | ) |
Sets the policy of Engine service threads.
int serviceThreadPriority | ( | ) | const |
Returns the priority of Engine service threads.
EngineSettings& serviceThreadPriority | ( | int | priority | ) |
Sets the priority of Engine service threads.
bool specifyApplVerIdField | ( | ) | const |
EngineSettings& specifyApplVerIdField | ( | bool | value | ) |
bool specifyLastMsgSeqNumProcessed | ( | ) | const |
Gets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
EngineSettings& specifyLastMsgSeqNumProcessed | ( | bool | value | ) |
Sets the option to specify the LastMsgSeqNumProcessed (tag=369) field on every message sent. Useful for detecting a backlog with a counterparty.
EngineSettings& sslCaFile | ( | const std::string & | value | ) |
Sets the path to the trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
const std::string& sslCaFile | ( | ) | const |
Returns the path to trusted certification authority certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
EngineSettings& sslCertificateFile | ( | const std::string & | value | ) |
Sets the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
const std::string& sslCertificateFile | ( | ) | const |
Returns the path to the SSL certificate file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
EngineSettings& sslClientSni | ( | const std::string & | hostName | ) |
Sets the client-side SNI-extension field.
When it is not empty, then this field provides SNI-name. When the field value is "*" (wildcard), then the SNI name will be taken from the connection URL.
const std::string& sslClientSni | ( | ) | const |
Returns the client-side SNI-extension field.
EngineSettings& sslListenPort | ( | int | value | ) |
int sslListenPort | ( | ) | const |
EngineSettings& sslListenPorts | ( | const ListenPorts & | value | ) |
Sets SSL listen ports.
const ListenPorts& sslListenPorts | ( | ) | const |
Returns SSL listen ports.
const LocalNetworkInterfaces& sslLocalInterface | ( | ) | const |
EngineSettings& sslLocalInterface | ( | const LocalNetworkInterfaces & | ) |
Sets local interfaces where the engine listen for incoming SSL connections.
EngineSettings& sslMaxProtocolVersion | ( | SslProtocolMinMaxVersion::Enum | version | ) |
Sets the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
SslProtocolMinMaxVersion::Enum sslMaxProtocolVersion | ( | ) | const |
Returns the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
EngineSettings& sslMinProtocolVersion | ( | SslProtocolMinMaxVersion::Enum | version | ) |
Sets the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
SslProtocolMinMaxVersion::Enum sslMinProtocolVersion | ( | ) | const |
Returns the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
EngineSettings& sslPrivateKeyFile | ( | const std::string & | value | ) |
Sets the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
const std::string& sslPrivateKeyFile | ( | ) | const |
Returns the path to the SSL private key file in the (Privacy Enhanced Mail) Base64 encoded (.pem) format.
EngineSettings& sslPrivateKeyPassword | ( | const Cryptography::SecureString & | value | ) |
Set the password to load private keys that are protected by a password.
Cryptography::SecureString sslPrivateKeyPassword | ( | ) | const |
Returns the password to load private keys that are protected by a password.
EngineSettings& sslVerifyPeer | ( | bool | verify | ) |
Set the option to request client certificates and perform the certificate verification.
bool sslVerifyPeer | ( | ) | const |
Returns the option to request client certificates and perform the certificate verification.
EngineSettings& tcpNoDelayOption | ( | bool | value | ) |
Sets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
bool tcpNoDelayOption | ( | ) | const |
Gets the option to improve the latency at the expense of the message throughput (TCP_NODELAY).
ThreadingModel::Enum threadingModel | ( | ) | const |
Returns the default mode for outbound and incoming connections.
EngineSettings& threadingModel | ( | ThreadingModel::Enum | value | ) |
Sets the default mode for outbound and incoming connections.
EngineSettings& threadPoolSize | ( | int | size | ) |
Sets the thread pool size.
int threadPoolSize | ( | ) | const |
Returns the thread pool size.
bool useSpinLock | ( | ) | const |
Returns the default mode for using a spin lock.
EngineSettings& useSpinLock | ( | bool | value | ) |
Returns the default mode for using a spin lock.
bool validateChecksum | ( | ) | const |
Gets the option to validate the checksum of incoming messages.
EngineSettings& validateChecksum | ( | bool | ) |
Sets the option to validate the checksum of incoming messages.
bool validateDuplicatedField | ( | ) | const |
Gets the option to validate the duplicated field.
EngineSettings& validateDuplicatedField | ( | bool | ) |
Sets the option to validate the duplicated field.
bool validateEmptyFieldValues | ( | ) | const |
Gets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
EngineSettings& validateEmptyFieldValues | ( | bool | ) |
Sets the option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
bool validateFieldValues | ( | ) | const |
Gets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
EngineSettings& validateFieldValues | ( | bool | ) |
Sets the option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
bool validateRepeatingGroupEntryCount | ( | ) | const |
Gets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
EngineSettings& validateRepeatingGroupEntryCount | ( | bool | ) |
Sets the option to validate the repeating group size of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
bool validateRepeatingGroupLeadingTag | ( | ) | const |
Gets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
EngineSettings& validateRepeatingGroupLeadingTag | ( | bool | ) |
Sets the option to validate the repeating group leading tag of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
bool validateRequiredFields | ( | ) | const |
Gets the option to validate the presence of required fields in inbound and outbound messages.
EngineSettings& validateRequiredFields | ( | bool | ) |
Sets the option to validate the presence of required fields in inbound and outbound messages.
bool validateUnknownFields | ( | ) | const |
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.
EngineSettings& validateUnknownFields | ( | bool | ) |
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.
bool validateUnknownMessages | ( | ) | const |
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).
EngineSettings& validateUnknownMessages | ( | bool | ) |
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).
|
friend |
Definition at line 581 of file EngineSettings.h.
|
static |
Specifies the usage of the operating system default RecvBuffer size.
Definition at line 266 of file EngineSettings.h.
|
static |
Specifies the usage of the operating system default SendBuffer size.
Definition at line 277 of file EngineSettings.h.