TT CORE SDK
2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
connection.h
Go to the documentation of this file.
1
/***************************************************************************
2
*
3
* Unpublished Work Copyright (c) 2020
4
* Trading Technologies International, Inc.
5
* All Rights Reserved Worldwide
6
*
7
* * * * S T R I C T L Y P R O P R I E T A R Y * * *
8
*
9
* WARNING: This program (or document) is unpublished, proprietary property
10
* of Trading Technologies International, Inc. and is to be maintained in
11
* strict confidence. Unauthorized reproduction, distribution or disclosure
12
* of this program (or document), or any program (or document) derived from
13
* it is prohibited by State and Federal law, and by local law outside of
14
* the U.S.
15
*
16
***************************************************************************/
17
#pragma once
18
#include <stddef.h>
19
#include "
shared_ptr.h
"
20
#include "
enums/MarketId.h
"
21
22
namespace
ttsdk
{
23
24
struct
AccountConnectionStatus
25
{
26
enum class
ConnectionStatus
27
{
28
UNKNOWN
= 0,
29
UP
= 1,
30
RISK_DOWN
= 2,
31
ORDER_CONNECTOR_DOWN
= 3,
32
SYNTHETIC_ENGINE_DOWN
= 4,
33
NO_CONNECTIVITY
= 5,
34
};
35
36
static
constexpr
size_t
MAX_CONNECTIONS
= 56;
37
uint64_t
account_id
= 0;
38
39
struct
Connection
40
{
41
uint64_t
id
;
42
MarketId
market
;
43
ConnectionStatus
status
;
44
}
connections
[
MAX_CONNECTIONS
];
45
46
size_t
count
;
47
48
};
49
50
inline
const
char
*
ToString
(
const
AccountConnectionStatus::ConnectionStatus
status)
51
{
52
if
(status ==
AccountConnectionStatus::ConnectionStatus::UP
)
return
"Up"
;
53
if
(status ==
AccountConnectionStatus::ConnectionStatus::RISK_DOWN
)
return
"Risk Down"
;
54
if
(status ==
AccountConnectionStatus::ConnectionStatus::ORDER_CONNECTOR_DOWN
)
return
"Order Connector Down"
;
55
if
(status ==
AccountConnectionStatus::ConnectionStatus::SYNTHETIC_ENGINE_DOWN
)
return
"Synthetic Engine Down"
;
56
if
(status ==
AccountConnectionStatus::ConnectionStatus::NO_CONNECTIVITY
)
return
"No Connectivity"
;
57
return
"Unknown"
;
58
}
59
}
MarketId.h
ttsdk
Definition
account.h:21
ttsdk::MarketId
MarketId
Definition
MarketId.h:29
ttsdk::ToString
const char * ToString(const AccountConnectionStatus::ConnectionStatus status)
Definition
connection.h:50
shared_ptr.h
ttsdk::AccountConnectionStatus::Connection
Definition
connection.h:40
ttsdk::AccountConnectionStatus::Connection::id
uint64_t id
Definition
connection.h:41
ttsdk::AccountConnectionStatus::Connection::status
ConnectionStatus status
Definition
connection.h:43
ttsdk::AccountConnectionStatus::Connection::market
MarketId market
Definition
connection.h:42
ttsdk::AccountConnectionStatus
Definition
connection.h:25
ttsdk::AccountConnectionStatus::ConnectionStatus
ConnectionStatus
Definition
connection.h:27
ttsdk::AccountConnectionStatus::ConnectionStatus::NO_CONNECTIVITY
@ NO_CONNECTIVITY
ttsdk::AccountConnectionStatus::ConnectionStatus::ORDER_CONNECTOR_DOWN
@ ORDER_CONNECTOR_DOWN
ttsdk::AccountConnectionStatus::ConnectionStatus::RISK_DOWN
@ RISK_DOWN
ttsdk::AccountConnectionStatus::ConnectionStatus::UNKNOWN
@ UNKNOWN
ttsdk::AccountConnectionStatus::ConnectionStatus::SYNTHETIC_ENGINE_DOWN
@ SYNTHETIC_ENGINE_DOWN
ttsdk::AccountConnectionStatus::ConnectionStatus::UP
@ UP
ttsdk::AccountConnectionStatus::count
size_t count
Definition
connection.h:46
ttsdk::AccountConnectionStatus::account_id
uint64_t account_id
Definition
connection.h:37
ttsdk::AccountConnectionStatus::MAX_CONNECTIONS
static constexpr size_t MAX_CONNECTIONS
Definition
connection.h:36
ttsdk::AccountConnectionStatus::connections
struct ttsdk::AccountConnectionStatus::Connection connections[MAX_CONNECTIONS]
Header Files
connection.h
Generated by
1.10.0