X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=e2sim%2Fsrc%2Fbase%2Fe2sim.cpp;h=83535b315be4ff37b0c8c15f1a8e0942c159d315;hb=eb80dc1196968a4d34ece42dd1c2e1d31923dec8;hp=c0abcd63aa9e9fabc98a0f8b9894f2124d56f6ce;hpb=215d350dbe06a4c7ee370815f26128a7f7e160cb;p=sim%2Fe2-interface.git diff --git a/e2sim/src/base/e2sim.cpp b/e2sim/src/base/e2sim.cpp index c0abcd6..83535b3 100755 --- a/e2sim/src/base/e2sim.cpp +++ b/e2sim/src/base/e2sim.cpp @@ -40,13 +40,13 @@ std::unordered_map E2Sim::getRegistered_ran_functions() { } void E2Sim::register_subscription_callback(long func_id, SubscriptionCallback cb) { - fprintf(stderr,"%%%%about to register callback for subscription for func_id %d\n", func_id); + LOG_I("About to register callback for subscription for func_id %d", func_id); subscription_callbacks[func_id] = cb; } SubscriptionCallback E2Sim::get_subscription_callback(long func_id) { - fprintf(stderr, "%%%%we are getting the subscription callback for func id %d\n", func_id); + LOG_I("We are getting the subscription callback for func id %d", func_id); SubscriptionCallback cb; try { @@ -62,14 +62,10 @@ void E2Sim::register_e2sm(long func_id, OCTET_STRING_t *ostr) { //Error conditions: //If we already have an entry for func_id - - printf("%%%%about to register e2sm func desc for %d\n", func_id); - + LOG_I("About to register e2sm func desc for %d", func_id); ran_functions_registered[func_id] = ostr; - } - void E2Sim::encode_and_send_sctp_data(E2AP_PDU_t* pdu) { uint8_t *buf; @@ -78,7 +74,6 @@ void E2Sim::encode_and_send_sctp_data(E2AP_PDU_t* pdu) data.len = e2ap_asn1c_encode_pdu(pdu, &buf); memcpy(data.buffer, buf, min(data.len, MAX_SCTP_BUFFER)); if (buf) free(buf); - sctp_send_data(client_fd, data); } @@ -221,13 +216,7 @@ int E2Sim::run_loop(int argc, char* argv[]){ memcpy(resetdata.buffer, buffer, er.encoded); - //send response data over sctp - if(sctp_send_data(client_fd, resetdata) > 0) { - LOG_I("[SCTP] Sent E2ResetRequest"); - } else { - LOG_E("[SCTP] Unable to send E2ResetRequest to RIC"); - } - + LOG_I("Test to delete ReSet code"); sctp_buffer_t recv_buf;