SPARK-1156
This commit is contained in:
1 parent
2a549e551f
commit
1f1f92d337
3 files changed
+181
-162
No files matched your search
@@ -1143,60 +1143,53 @@ void AdminServiceUtils::bootstrap_data (bts::api::admin::AdminData& data){
|
||||
set_user_accounts(user_1, account_permissions);
|
||||
set_user_accounts(user_2, account_permissions);
|
||||
set_user_accounts(user_3, account_permissions);
|
||||
// add cme account data
|
||||
|
||||
// add cme and sim account data
|
||||
bts::api::admin::ExchangeAccountData exchange_account_data;
|
||||
exchange_account_data.mutable_cme_account_data()->set_cti(bts::api::orderman::CTICode::CTI_CODE_CTI_CODE1);
|
||||
exchange_account_data.mutable_cme_account_data()->set_origin(bts::api::orderman::CustomerOrFirm::CUSTOMER_OR_FIRM_FIRM);
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + parent_account->name());
|
||||
set_account_exchange_data(parent_account, exchange_account_data);
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_1->name());
|
||||
set_account_exchange_data(account_1, exchange_account_data);
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_2->name());
|
||||
set_account_exchange_data(account_2, exchange_account_data);
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_3->name());
|
||||
set_account_exchange_data(account_3, exchange_account_data);
|
||||
// add sim account data
|
||||
exchange_account_data = bts::api::admin::ExchangeAccountData();
|
||||
exchange_account_data.mutable_sim_account_data()->set_cti(bts::api::orderman::CTICode::CTI_CODE_CTI_CODE1);
|
||||
exchange_account_data.mutable_sim_account_data()->set_origin(bts::api::orderman::CustomerOrFirm::CUSTOMER_OR_FIRM_FIRM);
|
||||
exchange_account_data.mutable_sim_account_data()->set_clearing_account("ca_" + parent_account->name());
|
||||
set_account_exchange_data(parent_account, exchange_account_data);
|
||||
|
||||
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_1->name());
|
||||
exchange_account_data.mutable_sim_account_data()->set_clearing_account("ca_" + account_1->name());
|
||||
set_account_exchange_data(account_1, exchange_account_data);
|
||||
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_2->name());
|
||||
exchange_account_data.mutable_sim_account_data()->set_clearing_account("ca_" + account_2->name());
|
||||
set_account_exchange_data(account_2, exchange_account_data);
|
||||
|
||||
exchange_account_data.mutable_cme_account_data()->set_clearing_account("ca_" + account_3->name());
|
||||
exchange_account_data.mutable_sim_account_data()->set_clearing_account("ca_" + account_3->name());
|
||||
set_account_exchange_data(account_3, exchange_account_data);
|
||||
// add cme user data
|
||||
|
||||
// add cme and sim user data
|
||||
bts::api::admin::ExchangeUserData exchange_user_data;
|
||||
exchange_user_data.mutable_cme_data()->set_operator_id("op_id_" + user_1->name());
|
||||
exchange_user_data.mutable_cme_data()->set_smp_id("smp_" + user_1->name());
|
||||
exchange_user_data.mutable_cme_data()->set_location("US,NC");
|
||||
exchange_user_data.mutable_sim_data()->set_operator_id("op_id_" + user_1->name());
|
||||
exchange_user_data.mutable_sim_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_1, exchange_user_data);
|
||||
|
||||
exchange_user_data.mutable_cme_data()->set_operator_id("op_id_" + user_2->name());
|
||||
exchange_user_data.mutable_cme_data()->set_smp_id("smp_" + user_2->name());
|
||||
exchange_user_data.mutable_cme_data()->set_location("US,NC");
|
||||
exchange_user_data.mutable_sim_data()->set_operator_id("op_id_" + user_2->name());
|
||||
exchange_user_data.mutable_sim_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_2, exchange_user_data);
|
||||
|
||||
exchange_user_data.mutable_cme_data()->set_operator_id("op_id_" + user_3->name());
|
||||
exchange_user_data.mutable_cme_data()->set_smp_id("smp_" + user_3->name());
|
||||
exchange_user_data.mutable_cme_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_3, exchange_user_data);
|
||||
|
||||
// add sim user data
|
||||
exchange_user_data = bts::api::admin::ExchangeUserData();
|
||||
exchange_user_data.mutable_sim_data()->set_operator_id("op_id_" + user_1->name());
|
||||
exchange_user_data.mutable_sim_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_1, exchange_user_data);
|
||||
|
||||
exchange_user_data.mutable_sim_data()->set_operator_id("op_id_" + user_2->name());
|
||||
exchange_user_data.mutable_sim_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_2, exchange_user_data);
|
||||
|
||||
exchange_user_data.mutable_sim_data()->set_operator_id("op_id_" + user_3->name());
|
||||
exchange_user_data.mutable_sim_data()->set_location("US,NC");
|
||||
set_user_exchange_data(user_3, exchange_user_data);
|
||||
|
||||
// associate all connections to all accounts
|
||||
for(int i=0; i<data.connections_size();i++){
|
||||
std::string conn_name = data.connections(i).name();
|
||||
|
||||
+141
-139
@@ -65,7 +65,7 @@ JetFIX {
|
||||
rule: "CannedCertSession.name='mc1'"
|
||||
|
||||
value {
|
||||
connection: @JetFIXConnection.sim
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
connection {
|
||||
name: "cme_mc1_64"
|
||||
@@ -170,7 +170,8 @@ JetFIX {
|
||||
rule: "CannedCertSession.name='mc5'"
|
||||
|
||||
value {
|
||||
connection: @JetFIXConnection.sim
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
connection {
|
||||
name: "cme_mc5_64"
|
||||
platform: GLBX
|
||||
@@ -190,155 +191,156 @@ JetFIX {
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='mc7'"
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='mc7'"
|
||||
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_mc7_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.177"
|
||||
# socket_connect_port: 61923
|
||||
# sender_compid: "MC7004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "64"
|
||||
# cme_market_segment_id: 64
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "QDQ16"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_mc7_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 61923
|
||||
sender_compid: "MC7004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "QDQ16"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='mc8'"
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='mc8'"
|
||||
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_mc8_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.177"
|
||||
# socket_connect_port: 61924
|
||||
# sender_compid: "MC8004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "64"
|
||||
# cme_market_segment_id: 64
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "QE9DB"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_mc8_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 61924
|
||||
sender_compid: "MC8004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "QE9DB"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='m5y'"
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='m5y'"
|
||||
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_m5y_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.177"
|
||||
# socket_connect_port: 61880
|
||||
# sender_compid: "M5Y004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "64"
|
||||
# cme_market_segment_id: 64
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "TOAN4"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_m5y_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 61880
|
||||
sender_compid: "M5Y004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "TOAN4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='ans'"
|
||||
# # new release
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='ans'"
|
||||
# new release
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_ans_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.177"
|
||||
# socket_connect_port: 61881
|
||||
# sender_compid: "ANS004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "64"
|
||||
# cme_market_segment_id: 64
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "T4CST"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_ans_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 61881
|
||||
sender_compid: "ANS004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "T4CST"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='t39'"
|
||||
# # new release
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='t39'"
|
||||
# new release
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_t39_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.177"
|
||||
# socket_connect_port: 23761
|
||||
# sender_compid: "T39004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "64"
|
||||
# cme_market_segment_id: 64
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "1JE9X"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_t39_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.177"
|
||||
socket_connect_port: 23761
|
||||
sender_compid: "T39004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "64"
|
||||
cme_market_segment_id: 64
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "1JE9X"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# JetFIX {
|
||||
# rule: "CannedCertSession.name='ktk'"
|
||||
# # new release
|
||||
# value {
|
||||
# connection: @JetFIXConnection.sim
|
||||
JetFIX {
|
||||
rule: "CannedCertSession.name='ktk'"
|
||||
# new release
|
||||
value {
|
||||
connection: @JetFIXSimConnection.sim
|
||||
|
||||
# connection {
|
||||
# name: "cme_ktk_64"
|
||||
# platform: GLBX
|
||||
# socket_connect_host_ip: "69.50.112.199"
|
||||
# socket_connect_port: 62062
|
||||
# sender_compid: "KTK004N"
|
||||
# target_compid: "CME"
|
||||
# target_subid: "99"
|
||||
# cme_market_segment_id: 99
|
||||
# start_time: "00:30:00"
|
||||
# end_time: "23:30:00"
|
||||
# start_day: "sunday"
|
||||
# end_day: "friday"
|
||||
# sender_subid: "BTS"
|
||||
# raw_data: "QUKDX"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
connection {
|
||||
name: "cme_ktk_64"
|
||||
platform: GLBX
|
||||
socket_connect_host_ip: "69.50.112.199"
|
||||
socket_connect_port: 62062
|
||||
sender_compid: "KTK004N"
|
||||
target_compid: "CME"
|
||||
target_subid: "99"
|
||||
cme_market_segment_id: 99
|
||||
start_time: "00:30:00"
|
||||
end_time: "23:30:00"
|
||||
start_day: "sunday"
|
||||
end_day: "friday"
|
||||
sender_subid: "BTS"
|
||||
raw_data: "QUKDX"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# If no canned cert specified we fallback to just sim
|
||||
#JetFIX {value {connection: @JetFIXConnection.sim}}
|
||||
#If no canned cert specified we fallback to just sim
|
||||
CannedCertSession { value { name: "" }}
|
||||
JetFIX {value {connection: @JetFIXSimConnection.sim}}
|
||||
@@ -191,6 +191,30 @@ inline int count_digits (int32_t value)
|
||||
return 10;
|
||||
}
|
||||
|
||||
inline int count_digits (uint32_t u)
|
||||
{
|
||||
static auto P01 = 10u;
|
||||
static auto P02 = P01*10;
|
||||
static auto P03 = P02*10;
|
||||
static auto P04 = P03*10;
|
||||
static auto P05 = P04*10;
|
||||
static auto P06 = P05*10;
|
||||
static auto P07 = P06*10;
|
||||
static auto P08 = P07*10;
|
||||
static auto P09 = P08*10;
|
||||
|
||||
if (u < P01) return 1;
|
||||
if (u < P02) return 2;
|
||||
if (u < P03) return 3;
|
||||
if (u < P04) return 4;
|
||||
if (u < P05) return 5;
|
||||
if (u < P06) return 6;
|
||||
if (u < P07) return 7;
|
||||
if (u < P08) return 8;
|
||||
if (u < P09) return 9;
|
||||
return 10;
|
||||
}
|
||||
|
||||
inline int i32_toa(int32_t value, char* buffer, int pad) {
|
||||
auto start = buffer;
|
||||
uint32_t u = static_cast<uint32_t>(value);
|
||||
|
||||
Reference in new issue
Block a user