This commit is contained in:
Kevin Darby committed 2019-04-22 15:16:12 -04:00
1 parent 9cadf635fb
commit a6ee36f4bc
3 files changed
+9 -9

No files matched your search

@@ -189,7 +189,7 @@ void AdminServiceUtils::fill_connections_from_config(bts::api::admin::AdminData&
add_connection(admin_data,connection);
break;
case config::JetFIX::Connection::ICE:
connection.mutable_ice_connection()->set_sender_comp_id(c.sender_compid());
connection.mutable_ice_connection()->set_sender_compid(c.sender_compid());
add_connection(admin_data,connection);
break;
@@ -469,7 +469,7 @@ bts::api::orderman::RoutingRecord AdminServiceUtils::get_routing_record(const bt
return rv;
}
rv.set_session(conn_ptr->name());
rv.set_sender_compid(conn_ptr->ice_connection().sender_comp_id());
rv.set_sender_compid(conn_ptr->ice_connection().sender_compid());
rv.set_account(ice_account_data->clearing_account());
rv.set_operator_id(ice_user_data->operator_id());
rv.set_cti_code(ice_account_data->cti());
+1 -1
View File
@@ -326,7 +326,7 @@ message SIMUserData {
/********************************ICE Data*********************************/
message ICEConnection {
string sender_comp_id = 10;
string sender_compid = 10;
}
message ICEAccountData {
+6 -6
View File
@@ -45,7 +45,7 @@ struct ICENativeOrder::PImpl
OrderState state;
int price_encoding_precision;
std::string exchange_order_id;
std::string sender_comp_id;
std::string sender_compid;
jetfix::FIXFragment update_encoding;
jetfix::FIXFragment::Bookmark<jetfix::fix::Price> update_price_bm;
@@ -111,7 +111,7 @@ void ICENativeOrder::on_init_new(const OrderDefinition& def, const PreActivation
transition(ORDER_STATUS_INACTIVE);
auto &native_state = get_native_state(me->state);
*native_state.mutable_routing_record() = rq.routing_record;
me->sender_comp_id = rq.routing_record.sender_compid();
me->sender_compid = rq.routing_record.sender_compid();
init_fix();
}
else
@@ -134,7 +134,7 @@ void ICENativeOrder::on_init_recovered(const OrderRecord& rec, const PreActivati
me->previous_position_contribution = Quantity(rec.state().filled_quantity());
auto const &native_state = get_native_state(me->state);
me->sender_comp_id = native_state.routing_record().sender_compid();
me->sender_compid = native_state.routing_record().sender_compid();
switch (me->state.status())
{
case ORDER_STATUS_WORKING:
@@ -652,7 +652,7 @@ void ICENativeOrder::on_attached(api::orderman::OrderDefinition const &new_paren
auto &native_state = get_native_state(me->state);
*native_state.mutable_routing_record() = rq.routing_record;
me->sender_comp_id = rq.routing_record.sender_compid();
me->sender_compid = rq.routing_record.sender_compid();
init_fix();
if (has_exchange_order_id())
add_exchange_order_id_to_fix();
@@ -979,12 +979,12 @@ void ICENativeOrder::report_state()
int ICENativeOrder::get_clordid(uint32_t bts_id)
{
std::string orderid = std::to_string(bts_id);
int totalsz = me->sender_comp_id.size() + orderid.size();
int totalsz = me->sender_compid.size() + orderid.size();
if(totalsz < 9) //9 is min size
orderid = std::string(9-totalsz, '0').append(orderid);
else if(totalsz > 12) //12 is max
orderid = orderid.substr(totalsz-12, orderid.size() - (totalsz-12));
std::string combined_clorid = me->sender_comp_id + orderid;
std::string combined_clorid = me->sender_compid+ orderid;
int id = std::atoi(combined_clorid.c_str());
return id;
}