10 #include "OCUCP-PF-Container.h"
11 #include "OCTET_STRING.h"
12 #include "asn_application.h"
13 #include "E2SM-KPM-IndicationMessage.h"
14 #include "FQIPERSlicesPerPlmnListItem.h"
15 #include "E2SM-KPM-RANfunction-Description.h"
16 #include "Timestamp.h"
18 #include "RICsubscriptionRequest.h"
19 #include "RICsubscriptionResponse.h"
20 #include "RICactionType.h"
21 #include "ProtocolIE-Field.h"
22 #include "ProtocolIE-SingleContainer.h"
23 #include "InitiatingMessage.h"
26 #include "kpm_callbacks.hpp"
27 #include "encode_kpm.hpp"
29 #include "encode_e2apv1.hpp"
31 #include <nlohmann/json.hpp>
35 using json = nlohmann::json;
43 int main(int argc, char* argv[]) {
45 asn_codec_ctx_t *opt_cod;
47 E2SM_KPM_RANfunction_Description_t *ranfunc_desc =
48 (E2SM_KPM_RANfunction_Description_t*)calloc(1,sizeof(E2SM_KPM_RANfunction_Description_t));
49 encode_kpm_function_description(ranfunc_desc);
51 uint8_t e2smbuffer[8192];
52 size_t e2smbuffer_size = 8192;
55 asn_encode_to_buffer(opt_cod,
56 ATS_ALIGNED_BASIC_PER,
57 &asn_DEF_E2SM_KPM_RANfunction_Description,
58 ranfunc_desc, e2smbuffer, e2smbuffer_size);
60 fprintf(stderr, "er encded is %d\n", er.encoded);
61 fprintf(stderr, "after encoding message\n");
62 fprintf(stderr, "here is encoded message %s\n", e2smbuffer);
64 uint8_t *ranfuncdesc = (uint8_t*)calloc(1,er.encoded);
65 memcpy(ranfuncdesc, e2smbuffer, er.encoded);
67 printf("this is the char array %s\n", (char*)ranfuncdesc);
69 OCTET_STRING_t *ranfunc_ostr = (OCTET_STRING_t*)calloc(1,sizeof(OCTET_STRING_t));
70 ranfunc_ostr->buf = (uint8_t*)calloc(1,er.encoded);
71 ranfunc_ostr->size = er.encoded;
72 memcpy(ranfunc_ostr->buf,e2smbuffer,er.encoded);
74 printf("!!!lenth of ranfuncdesc is %d\n", strlen((char*)ranfuncdesc));
75 printf("value of this index is %d\n", ranfuncdesc[0]);
76 printf("value of this index is %d\n", ranfuncdesc[1]);
77 printf("value of this index is %d\n", ranfuncdesc[2]);
78 printf("value of this index is %d\n", ranfuncdesc[3]);
79 printf("value of this index is %d\n", ranfuncdesc[4]);
80 printf("value of this index is %d\n", ranfuncdesc[5]);
81 printf("value of this index is %d\n", ranfuncdesc[6]);
82 printf("value of this index is %d\n", ranfuncdesc[10]);
83 printf("value of this index is %d\n", ranfuncdesc[15]);
84 printf("value of this index is %d\n", ranfuncdesc[100]);
85 printf("value of this index is %d\n", ranfuncdesc[101]);
87 e2sim.register_e2sm(1,ranfunc_ostr);
88 e2sim.register_subscription_callback(1,&callback_kpm_subscription_request);
90 e2sim.run_loop(argc, argv);
94 void run_report_loop(long requestorId, long instanceId, long ranFunctionId, long actionId) {
96 //Process simulation file
103 simfile.open("simulation.txt", ios::in);
105 cout << "step1" << endl;
107 std::ifstream ue_stream("ueMeasReport.txt");
108 std::ifstream cell_stream("cellMeasReport.txt");
112 ue_stream >> all_ues_json;
116 cell_stream >> all_cells_json;
118 asn_codec_ctx_t *opt_cod;
120 cout << "UE RF Measurements" << endl;
121 cout << "******************" << endl;
123 int numMeasReports = (all_ues_json["/ueMeasReport/ueMeasReportList"_json_pointer]).size();
125 for (int i = 0; i < numMeasReports; i++) {
130 cout << "UE number " + i << endl;
131 cout << "**********" << endl;
132 json::json_pointer p1(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/nrCellIdentity");
133 nextCellId = all_ues_json[p1].get<int>();
134 cout << "Serving Cell " << nextCellId << endl;
136 json::json_pointer p2(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/servingCellRfReport/rsrp");
137 nextRsrp = all_ues_json[p2].get<int>();
138 cout << " RSRP " << nextRsrp << endl;
139 json::json_pointer p3(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/servingCellRfReport/rsrq");
140 nextRsrq = all_ues_json[p3].get<int>();
141 cout << " RSRQ " << nextRsrq << endl;
142 json::json_pointer p4(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/servingCellRfReport/rssinr");
143 nextRssinr = all_ues_json[p4].get<int>();
144 cout << " RSSINR " << nextRssinr << endl;
146 json::json_pointer p5(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/neighbourCellList");
148 int numNeighborCells = (all_ues_json[p5]).size();
151 //REPORT Message 3 -- Encode and send OCUCP user-level report
153 E2SM_KPM_IndicationMessage_t *ind_msg3 =
154 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
155 E2AP_PDU *pdu3 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
157 uint8_t *crnti_buf = (uint8_t*)calloc(1,2);
159 if (nextCellId == 0) {
160 uint8_t *buf2 = (uint8_t*)"12";
161 memcpy(crnti_buf, buf2, 2);
162 } else if (nextCellId == 1) {
163 uint8_t *buf2 = (uint8_t*)"22";
164 memcpy(crnti_buf, buf2, 2);
167 std::string serving_str = "{\"rsrp\": " + std::to_string(nextRsrp) + ", \"rsrq\": " +
168 std::to_string(nextRsrq) + ", \"rssinr\": " + std::to_string(nextRssinr) + "}";
169 const uint8_t *serving_buf = reinterpret_cast<const uint8_t*>(serving_str.c_str());
171 std::string neighbor_str = "[";
178 for (int j = 0; j < numNeighborCells; j++) {
179 json::json_pointer p8(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i) +"/neighbourCellList/" + std::to_string(j) + "/nbCellIdentity");
180 nextNbCell = all_ues_json[p8].get<int>();
181 cout << "Neighbor Cell " << all_ues_json[p8] << endl;
182 json::json_pointer p9(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i)
183 +"/neighbourCellList/" + std::to_string(j) + "/nbCellRfReport/rsrp");
184 nextNbRsrp = all_ues_json[p9].get<int>();
185 cout << " RSRP " << nextNbRsrp << endl;
187 json::json_pointer p10(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i)
188 +"/neighbourCellList/" + std::to_string(j) + "/nbCellRfReport/rsrq");
189 nextNbRsrq = all_ues_json[p10].get<int>();
190 cout << " RSRQ " << nextNbRsrq << endl;
192 json::json_pointer p11(std::string("/ueMeasReport/ueMeasReportList/") + std::to_string(i)
193 +"/neighbourCellList/" + std::to_string(j) + "/nbCellRfReport/rssinr");
194 nextNbRssinr = all_ues_json[p11].get<int>();
195 cout << " RSSINR " << nextNbRssinr << endl;
202 neighbor_str += "{\"CID\" : \"" + std::to_string(nextNbCell) + "\", \"Cell-RF\" : \"{\"rsrp\": " + std::to_string(nextNbRsrp) +
203 ", \"rsrq\": " + std::to_string(nextNbRsrq) + ", \"rssinr\": " + std::to_string(nextNbRssinr) + "}}";
209 const uint8_t *neighbor_buf = reinterpret_cast<const uint8_t*>(neighbor_str.c_str());
211 printf("Neighbor string\n%s", neighbor_buf);
213 uint8_t *plmnid_buf = (uint8_t*)"747";
214 uint8_t *nrcellid_buf = (uint8_t*)"12340";
216 encode_kpm_report_rancontainer_cucp_parameterized(ind_msg3, plmnid_buf, nrcellid_buf, crnti_buf, serving_buf, neighbor_buf);
218 uint8_t e2smbuffer3[8192];
219 size_t e2smbuffer_size3 = 8192;
222 asn_enc_rval_t er3 = asn_encode_to_buffer(opt_cod,
223 ATS_ALIGNED_BASIC_PER,
224 &asn_DEF_E2SM_KPM_IndicationMessage,
225 ind_msg3, e2smbuffer3, e2smbuffer_size3);
227 fprintf(stderr, "er encded is %d\n", er3.encoded);
228 fprintf(stderr, "after encoding message\n");
229 uint8_t *e2smheader_buf3 = (uint8_t*)"header";
231 generate_e2apv1_indication_request_parameterized(pdu3, requestorId,
232 instanceId, ranFunctionId,
233 actionId, seqNum, e2smheader_buf3, 6, e2smbuffer3, er3.encoded);
235 e2sim.encode_and_send_sctp_data(pdu3);
242 cout << "Cell Measurements" << endl;
243 cout << "******************" << endl;
245 int numCellMeasReports = (all_cells_json["/cellMeasReport/cellMeasReportList"_json_pointer]).size();
247 uint8_t *sst_buf = (uint8_t*)"1";
248 uint8_t *sd_buf = (uint8_t*)"100";
249 uint8_t *plmnid_buf = (uint8_t*)"747";
251 for (int i = 0; i < numCellMeasReports; i++) {
259 json::json_pointer p1(std::string("/cellMeasReport/cellMeasReportList/") + std::to_string(i) +"/nrCellIdentity");
260 nextCellId = all_cells_json[p1].get<int>();
261 cout << std::string("Cell number ") << nextCellId << endl;
263 cout << "**********" << endl;
265 json::json_pointer p2(std::string("/cellMeasReport/cellMeasReportList/") + std::to_string(i) +"/pdcpByteMeasReport/pdcpBytesDl");
266 nextPdcpBytesDL = all_cells_json[p2].get<int>();
267 cout << std::string(" PDCP Bytes DL ") << nextPdcpBytesDL << endl;
269 json::json_pointer p3(std::string("/cellMeasReport/cellMeasReportList/") + std::to_string(i) +"/pdcpByteMeasReport/pdcpBytesUl");
270 nextPdcpBytesUL = all_cells_json[p3].get<int>();
271 cout << std::string(" PDCP Bytes UL ") << nextPdcpBytesUL << endl;
273 uint8_t *buf = (uint8_t*)"GNBCUUP5";
275 int bytes_dl = nextPdcpBytesDL;
277 int bytes_ul = nextPdcpBytesUL;
279 // int bytes_dl = 3905;
280 // int bytes_ul = 1609321;
282 E2SM_KPM_IndicationMessage_t *ind_msg2 =
283 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
284 E2AP_PDU *pdu2 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
286 encode_kpm_report_style5_parameterized(ind_msg2 , buf, bytes_dl, bytes_ul, sst_buf, sd_buf, plmnid_buf);
288 uint8_t e2smbuffer2[8192];
289 size_t e2smbuffer_size2 = 8192;
291 asn_enc_rval_t er2 = asn_encode_to_buffer(opt_cod,
292 ATS_ALIGNED_BASIC_PER,
293 &asn_DEF_E2SM_KPM_IndicationMessage,
294 ind_msg2, e2smbuffer2, e2smbuffer_size2);
296 fprintf(stderr, "er encded is %d\n", er2.encoded);
297 fprintf(stderr, "after encoding message\n");
298 uint8_t *e2smheader_buf2 = (uint8_t*)"header";
300 generate_e2apv1_indication_request_parameterized(pdu2, requestorId,
301 instanceId, ranFunctionId,
302 actionId, seqNum, e2smheader_buf2, 6, e2smbuffer2, er2.encoded);
304 e2sim.encode_and_send_sctp_data(pdu2);
310 json::json_pointer p4(std::string("/cellMeasReport/cellMeasReportList/") + std::to_string(i) +"/prbMeasReport/availPrbDl");
311 nextPRBBytesDL = all_cells_json[p4].get<int>();
312 cout << std::string(" PRB Bytes DL ") << all_cells_json[p4] << endl;
314 json::json_pointer p5(std::string("/cellMeasReport/cellMeasReportList/") + std::to_string(i) +"/prbMeasReport/availPrbUl");
315 nextPRBBytesUL = all_cells_json[p5].get<int>();
316 cout << std::string(" PRB Bytes UL ") << all_cells_json[p5] << endl;
319 //REPORT Message 1 -- Encode and send ODU cell-level report
321 E2SM_KPM_IndicationMessage_t *ind_msg1 =
322 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
323 E2AP_PDU *pdu = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
327 uint8_t *nrcellid_buf = (uint8_t*)"12340";
328 long dl_prbs = nextPRBBytesDL;
329 long ul_prbs = nextPRBBytesUL;
331 encode_kpm_report_style1_parameterized(ind_msg1, fiveqi, dl_prbs, ul_prbs, sst_buf, sd_buf, plmnid_buf, nrcellid_buf, &dl_prbs, &ul_prbs);
333 uint8_t e2smbuffer[8192];
334 size_t e2smbuffer_size = 8192;
336 asn_enc_rval_t er = asn_encode_to_buffer(opt_cod,
337 ATS_ALIGNED_BASIC_PER,
338 &asn_DEF_E2SM_KPM_IndicationMessage,
339 ind_msg1, e2smbuffer, e2smbuffer_size);
341 fprintf(stderr, "er encded is %d\n", er.encoded);
342 fprintf(stderr, "after encoding message\n");
343 uint8_t *e2smheader_buf = (uint8_t*)"header";
345 uint8_t *cpid_buf = (uint8_t*)"CPID";
347 fprintf(stderr, "About to encode Indication\n");
348 generate_e2apv1_indication_request_parameterized(pdu, requestorId,
349 instanceId, ranFunctionId,
350 actionId, seqNum, e2smheader_buf, 6, e2smbuffer, er.encoded);
352 e2sim.encode_and_send_sctp_data(pdu);
360 if (simfile.is_open()) {
362 while (getline(simfile, line)) {
363 cout << line << "\n";
365 //REPORT Message 1 -- Encode and send ODU cell-level report
367 E2SM_KPM_IndicationMessage_t *ind_msg1 =
368 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
369 E2AP_PDU *pdu = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
372 uint8_t *sst_buf = (uint8_t*)"1";
373 uint8_t *sd_buf = (uint8_t*)"100";
374 uint8_t *plmnid_buf = (uint8_t*)"747";
375 uint8_t *nrcellid_buf = (uint8_t*)"12340";
379 encode_kpm_report_style1_parameterized(ind_msg1, fiveqi, dl_prbs, ul_prbs, sst_buf, sd_buf, plmnid_buf, nrcellid_buf, &dl_prbs, &ul_prbs);
381 uint8_t e2smbuffer[8192];
382 size_t e2smbuffer_size = 8192;
383 asn_codec_ctx_t *opt_cod;
385 asn_enc_rval_t er = asn_encode_to_buffer(opt_cod,
386 ATS_ALIGNED_BASIC_PER,
387 &asn_DEF_E2SM_KPM_IndicationMessage,
388 ind_msg1, e2smbuffer, e2smbuffer_size);
390 fprintf(stderr, "er encded is %d\n", er.encoded);
391 fprintf(stderr, "after encoding message\n");
392 uint8_t *e2smheader_buf = (uint8_t*)"header";
394 uint8_t *cpid_buf = (uint8_t*)"CPID";
396 fprintf(stderr, "About to encode Indication\n");
397 generate_e2apv1_indication_request_parameterized(pdu, requestorId,
398 instanceId, ranFunctionId,
399 actionId, seqNum, e2smheader_buf, 6, e2smbuffer, er.encoded);
401 encode_and_send_sctp_data(pdu, socket_fd);
405 //REPORT Message 2 -- Encode and send OCUUP cell-level report
407 uint8_t *buf = (uint8_t*)"GNBCUUP5";
409 int bytes_dl = 40000;
410 int bytes_ul = 50000;
412 E2SM_KPM_IndicationMessage_t *ind_msg2 =
413 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
414 E2AP_PDU *pdu2 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
416 encode_kpm_report_style5_parameterized(ind_msg2 , buf, bytes_dl, bytes_ul, sst_buf, sd_buf, plmnid_buf);
418 uint8_t e2smbuffer2[8192];
419 size_t e2smbuffer_size2 = 8192;
422 asn_enc_rval_t er2 = asn_encode_to_buffer(opt_cod,
423 ATS_ALIGNED_BASIC_PER,
424 &asn_DEF_E2SM_KPM_IndicationMessage,
425 ind_msg2, e2smbuffer2, e2smbuffer_size2);
427 fprintf(stderr, "er encded is %d\n", er2.encoded);
428 fprintf(stderr, "after encoding message\n");
429 uint8_t *e2smheader_buf2 = (uint8_t*)"header";
431 generate_e2apv1_indication_request_parameterized(pdu2, requestorId,
432 instanceId, ranFunctionId,
433 actionId, seqNum, e2smheader_buf2, 6, e2smbuffer2, er2.encoded);
435 encode_and_send_sctp_data(pdu2, socket_fd);
439 //REPORT Message 3 -- Encode and send OCUCP user-level report
441 E2SM_KPM_IndicationMessage_t *ind_msg3 =
442 (E2SM_KPM_IndicationMessage_t*)calloc(1,sizeof(E2SM_KPM_IndicationMessage_t));
443 E2AP_PDU *pdu3 = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
445 uint8_t *crnti_buf = (uint8_t*)"12";
446 // uint8_t *serving_buf = (uint8_t*)"RSRP10";
447 //uint8_t *neighbor_buf = (uint8_t*)"-10,-15";
452 std::string serving_str = "{\"rsrp\": " + std::to_string(rsrpServ) + ", \"rsrq\": " +
453 std::to_string(rsrqServ) + ", \"rssinr\": " + std::to_string(rssinrServ) + "}";
454 const uint8_t *serving_buf = reinterpret_cast<const uint8_t*>(serving_str.c_str());
457 neighbor_cell_entry n_entries[3];
458 n_entries[0] = {"123", 10, 0, 0};
459 n_entries[1] = {"456", 10, 0, 0};
460 n_entries[2] = {"789", 10, 0, 0};
462 std::string neighbor_str = "[";
464 for (int i=0; i < sizeof(n_entries)/sizeof(n_entries[0]); i++) {
469 neighbor_str += "{\"CID\" : \"" + std::string(n_entries[i].cellid) + "\", \"Cell-RF\" : \"{\"rsrp\": " + std::to_string(n_entries[i].rsrp) +
470 ", \"rsrq\": " + std::to_string(n_entries[i].rsrq) + ", \"rssinr\": " + std::to_string(n_entries[i].rsrp) + "}}";
475 const uint8_t *neighbor_buf = reinterpret_cast<const uint8_t*>(neighbor_str.c_str());
477 printf("Neighbor string\n%s", neighbor_buf);
479 encode_kpm_report_rancontainer_cucp_parameterized(ind_msg3, plmnid_buf, nrcellid_buf, crnti_buf, serving_buf, neighbor_buf);
481 uint8_t e2smbuffer3[8192];
482 size_t e2smbuffer_size3 = 8192;
484 asn_enc_rval_t er3 = asn_encode_to_buffer(opt_cod,
485 ATS_ALIGNED_BASIC_PER,
486 &asn_DEF_E2SM_KPM_IndicationMessage,
487 ind_msg3, e2smbuffer3, e2smbuffer_size3);
489 fprintf(stderr, "er encded is %d\n", er3.encoded);
490 fprintf(stderr, "after encoding message\n");
491 uint8_t *e2smheader_buf3 = (uint8_t*)"header";
493 generate_e2apv1_indication_request_parameterized(pdu3, requestorId,
494 instanceId, ranFunctionId,
495 actionId, seqNum, e2smheader_buf3, 6, e2smbuffer3, er3.encoded);
497 encode_and_send_sctp_data(pdu3, socket_fd);
501 //Encode and send OCUUP user-level report
505 //Encode and send ODU user-level report
519 void callback_kpm_subscription_request(E2AP_PDU_t *sub_req_pdu) {
522 //Record RIC Request ID
523 //Go through RIC action to be Setup List
524 //Find first entry with REPORT action Type
526 //Encode subscription response
528 RICsubscriptionRequest_t orig_req =
529 sub_req_pdu->choice.initiatingMessage->value.choice.RICsubscriptionRequest;
531 RICsubscriptionResponse_IEs_t *ricreqid =
532 (RICsubscriptionResponse_IEs_t*)calloc(1, sizeof(RICsubscriptionResponse_IEs_t));
534 int count = orig_req.protocolIEs.list.count;
535 int size = orig_req.protocolIEs.list.size;
537 RICsubscriptionRequest_IEs_t **ies = (RICsubscriptionRequest_IEs_t**)orig_req.protocolIEs.list.array;
539 fprintf(stderr, "count%d\n", count);
540 fprintf(stderr, "size%d\n", size);
542 RICsubscriptionRequest_IEs__value_PR pres;
548 std::vector<long> actionIdsAccept;
549 std::vector<long> actionIdsReject;
551 for (int i=0; i < count; i++) {
552 RICsubscriptionRequest_IEs_t *next_ie = ies[i];
553 pres = next_ie->value.present;
555 fprintf(stderr, "next present value %d\n", pres);
558 case RICsubscriptionRequest_IEs__value_PR_RICrequestID:
560 RICrequestID_t reqId = next_ie->value.choice.RICrequestID;
561 long requestorId = reqId.ricRequestorID;
562 long instanceId = reqId.ricInstanceID;
563 fprintf(stderr, "requestorId %d\n", requestorId);
564 fprintf(stderr, "instanceId %d\n", instanceId);
565 reqRequestorId = requestorId;
566 reqInstanceId = instanceId;
570 case RICsubscriptionRequest_IEs__value_PR_RANfunctionID:
572 case RICsubscriptionRequest_IEs__value_PR_RICsubscriptionDetails:
574 RICsubscriptionDetails_t subDetails = next_ie->value.choice.RICsubscriptionDetails;
575 RICeventTriggerDefinition_t triggerDef = subDetails.ricEventTriggerDefinition;
576 RICactions_ToBeSetup_List_t actionList = subDetails.ricAction_ToBeSetup_List;
578 //We are ignoring the trigger definition
580 //We identify the first action whose type is REPORT
581 //That is the only one accepted; all others are rejected
583 int actionCount = actionList.list.count;
584 fprintf(stderr, "action count%d\n", actionCount);
586 auto **item_array = actionList.list.array;
588 bool foundAction = false;
590 for (int i=0; i < actionCount; i++) {
592 auto *next_item = item_array[i];
593 RICactionID_t actionId = ((RICaction_ToBeSetup_ItemIEs*)next_item)->value.choice.RICaction_ToBeSetup_Item.ricActionID;
594 RICactionType_t actionType = ((RICaction_ToBeSetup_ItemIEs*)next_item)->value.choice.RICaction_ToBeSetup_Item.ricActionType;
596 if (!foundAction && actionType == RICactionType_report) {
597 reqActionId = actionId;
598 actionIdsAccept.push_back(reqActionId);
599 printf("adding accept\n");
602 reqActionId = actionId;
603 printf("adding reject\n");
604 actionIdsReject.push_back(reqActionId);
614 fprintf(stderr, "After Processing Subscription Request\n");
616 fprintf(stderr, "requestorId %d\n", reqRequestorId);
617 fprintf(stderr, "instanceId %d\n", reqInstanceId);
620 for (int i=0; i < actionIdsAccept.size(); i++) {
621 fprintf(stderr, "Action ID %d %ld\n", i, actionIdsAccept.at(i));
625 E2AP_PDU *e2ap_pdu = (E2AP_PDU*)calloc(1,sizeof(E2AP_PDU));
627 long *accept_array = &actionIdsAccept[0];
628 long *reject_array = &actionIdsReject[0];
629 int accept_size = actionIdsAccept.size();
630 int reject_size = actionIdsReject.size();
632 generate_e2apv1_subscription_response_success(e2ap_pdu, accept_array, reject_array, accept_size, reject_size, reqRequestorId, reqInstanceId);
634 e2sim.encode_and_send_sctp_data(e2ap_pdu);
636 //Start thread for sending REPORT messages
638 // std::thread loop_thread;
642 run_report_loop(reqRequestorId, reqInstanceId, funcId, reqActionId);
644 // loop_thread = std::thread(&run_report_loop);