Updating a set of supported NR metrics
[ric-app/mc.git] / mc-core / mc / local_datasource / rts_proto.c
index d10db07..02f98f5 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <poll.h>
 #include "errno.h"
 
 #include "gsconfig.h"
@@ -50,14 +51,14 @@ gs_uint32_t (*process_buffer)(gs_uint8_t * buffer, gs_uint32_t buflen) = NULL; /
 
 #define MAXLINE 1000000
 
-static FILE *pd;
-static int listensockfd=-1;
 static int fd=-1;
+struct pollfd pfd;
 static struct packet cur_packet;
 static gs_sp_t name, this_device;
 static gs_uint32_t verbose=0;
 static gs_uint32_t startupdelay=0;
 static gs_uint32_t singlefile=0;
+static gs_uint32_t fifo=0;
 static gs_uint32_t gshub=0;
 static int socket_desc=0;
 
@@ -69,6 +70,12 @@ static unsigned long long timestamp; // extract from input header
 #include "x2ap_streaming.pb-c.h"
 #include "ue_context_release.pb-c.h"
 #include "lfta/local/dc_release.h"
+#include "ricgeomessages.pb-c.h"
+#include "ricgeomessages_pcmdreport.pb-c.h"
+#include "lfta/local/lte_thpt_meas.h"
+#include "lfta/local/lte_rb_thpt.h"
+#include "lfta/local/lte_dl_sched_trace.h"
+#include "lfta/local/lte_pcell_meas.h"
 #include "secondary_rat_data_usage_report.pb-c.h"
 #include "lfta/local/rat_data_usage.h"
 #include "sgnb_reconfiguration_complete.pb-c.h"
@@ -95,6 +102,7 @@ static unsigned long long timestamp; // extract from input header
 #include "lfta/local/sgnb_add_req_reject.h"
 #include "sgnb_addition_request_acknowledge.pb-c.h"
 #include "lfta/local/eRABs_notadmitted_for_ue.h"
+#include "lfta/local/add_req_ack_cellid.h"
 #include "lfta/local/eRABs_acked_for_admit_for_ue.h"
 #include "lfta/local/SgNB_ack_for_ue_NRfreqs.h"
 #include "lfta/local/SgNB_ack_for_add_mod_for_ue.h"
@@ -179,6 +187,206 @@ unsigned long long int ts_lo, ts_hi;
        return 0;
 }
 
+gs_uint32_t process_buffer_LTE_PCMD(gs_uint8_t * buffer, gs_uint32_t buflen){
+       char *empty_string = "";
+unsigned long long int ts_lo, ts_hi;
+       GeoMsg *hdr = NULL;
+// ------------------------------------------
+// ---  Variables for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+       struct _lte_thpt_meas *lte_thpt_meas = NULL;
+       PcmdReport *node_0_0 = NULL;
+       PcmdReport__TpDlUeThroughputMeasurements *node_0_1 = NULL;
+// ------------------------------------------
+// ---  Variables for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+       struct _lte_rb_thpt *lte_rb_thpt = NULL;
+       PcmdReport *node_1_0 = NULL;
+       PcmdReport__TpDlRadioBearerPdcpThroughputRecord *node_1_1 = NULL;
+       PcmdReport__TpDlRadioBearerPdcpThroughputData *node_1_2 = NULL;
+       gs_uint32_t i_1_2;
+// ------------------------------------------
+// ---  Variables for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+       struct _lte_dl_sched_trace *lte_dl_sched_trace = NULL;
+       PcmdReport *node_2_0 = NULL;
+       PcmdReport__TpDlSchedulingTraceRecord *node_2_1 = NULL;
+// ------------------------------------------
+// ---  Variables for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+       struct _lte_pcell_meas *lte_pcell_meas = NULL;
+       PcmdReport *node_3_0 = NULL;
+       PcmdReport__TpUeMeasTraceRecord *node_3_1 = NULL;
+       PcmdReport__TpMeasResultPCell *node_3_2 = NULL;
+
+// --------------------------------------------------
+// ---  Specialized processing for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+
+       lte_thpt_meas = (struct _lte_thpt_meas *)(cur_packet.record.packed.values);
+       cur_packet.schema = 10000;
+
+       hdr = geo_msg__unpack(NULL, buflen, buffer);
+       if(hdr==NULL) return -1;
+
+       node_0_0 = hdr->report;
+       if(node_0_0==NULL) return -2;
+       if(hdr->hdr==NULL) return -3;
+
+       ts_lo = hdr->hdr->timestamp & 0xffffffff;
+       ts_hi = hdr->hdr->timestamp >> 32;
+       lte_thpt_meas->timestamp_ms = (ts_hi) * 1000 + ((ts_lo * 1000) >> 32);
+       lte_thpt_meas->eci = hdr->hdr->eci;
+       lte_thpt_meas->plmn = hdr->hdr->plmn;
+       lte_thpt_meas->eutran_trace_id = hdr->hdr->eutrantraceid;
+       lte_thpt_meas->crnti = hdr->hdr->crnti;
+
+       if(node_0_0->dlschedulingrecord){
+               lte_thpt_meas->numOfTtiUeSched = node_0_0->dlschedulingrecord->numofttiuesched;
+       }else{
+               lte_thpt_meas->numOfTtiUeSched = -1;
+       }
+       if(node_0_0->sessioninfo){
+               lte_thpt_meas->imei = node_0_0->sessioninfo->imei;
+       }else{
+               lte_thpt_meas->imei = -1;
+       }
+       if(node_0_0->sessioninfo){
+               lte_thpt_meas->imsi = node_0_0->sessioninfo->imsi;
+       }else{
+               lte_thpt_meas->imsi = -1;
+       }
+       node_0_1 = node_0_0->dluethroughputmeasurementsrecord;
+       if(node_0_0->dluethroughputmeasurementsrecord){
+               lte_thpt_meas->numOfTtiPositiveDlBuf = node_0_1->numofttipositivedlbuf;
+               lte_thpt_meas->sumOfSentNonGbrBytes = node_0_1->sumofsentnongbrbytes;
+               lte_thpt_meas->sumOfSentGbrBytes = node_0_1->sumofsentgbrbytes;
+               rts_fta_process_packet(&cur_packet);
+       }
+// --------------------------------------------------
+// ---  Specialized processing for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+
+       lte_rb_thpt = (struct _lte_rb_thpt *)(cur_packet.record.packed.values);
+       cur_packet.schema = 10001;
+       node_1_0 = node_0_0;
+       ts_lo = hdr->hdr->timestamp & 0xffffffff;
+       ts_hi = hdr->hdr->timestamp >> 32;
+       lte_rb_thpt->timestamp_ms = (ts_hi) * 1000 + ((ts_lo * 1000) >> 32);
+       lte_rb_thpt->eci = hdr->hdr->eci;
+       lte_rb_thpt->plmn = hdr->hdr->plmn;
+       lte_rb_thpt->eutran_trace_id = hdr->hdr->eutrantraceid;
+       lte_rb_thpt->crnti = hdr->hdr->crnti;
+
+       if(node_1_0->sessioninfo){
+               lte_rb_thpt->imei = node_1_0->sessioninfo->imei;
+       }else{
+               lte_rb_thpt->imei = -1;
+       }
+       if(node_1_0->sessioninfo){
+               lte_rb_thpt->imsi = node_1_0->sessioninfo->imsi;
+       }else{
+               lte_rb_thpt->imsi = -1;
+       }
+       node_1_1 = node_1_0->dlrbpdcpthroughputrecord;
+       if(node_1_0->dlrbpdcpthroughputrecord){
+               for(i_1_2=0;i_1_2<node_1_1->n_dlradiobearerpdcpthroughputlist; i_1_2++){
+                       node_1_2 = node_1_1->dlradiobearerpdcpthroughputlist[i_1_2];
+                       lte_rb_thpt->dataCollectionDuration = node_1_2->datacollectionduration;
+                       lte_rb_thpt->numOfPdcpPduRcvdForTx = node_1_2->numofpdcppdurcvdfortx;
+                       lte_rb_thpt->numOfPdcpPduDiscarded = node_1_2->numofpdcppdudiscarded;
+                       lte_rb_thpt->drb_Id = node_1_2->drb_id;
+                       rts_fta_process_packet(&cur_packet);
+               }
+       }
+// --------------------------------------------------
+// ---  Specialized processing for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+
+       lte_dl_sched_trace = (struct _lte_dl_sched_trace *)(cur_packet.record.packed.values);
+       cur_packet.schema = 10002;
+       node_2_0 = node_1_0;
+       ts_lo = hdr->hdr->timestamp & 0xffffffff;
+       ts_hi = hdr->hdr->timestamp >> 32;
+       lte_dl_sched_trace->timestamp_ms = (ts_hi) * 1000 + ((ts_lo * 1000) >> 32);
+       lte_dl_sched_trace->eci = hdr->hdr->eci;
+       lte_dl_sched_trace->plmn = hdr->hdr->plmn;
+       lte_dl_sched_trace->eutran_trace_id = hdr->hdr->eutrantraceid;
+       lte_dl_sched_trace->crnti = hdr->hdr->crnti;
+
+       if(node_2_0->sessioninfo){
+               lte_dl_sched_trace->imei = node_2_0->sessioninfo->imei;
+       }else{
+               lte_dl_sched_trace->imei = -1;
+       }
+       if(node_2_0->sessioninfo){
+               lte_dl_sched_trace->imsi = node_2_0->sessioninfo->imsi;
+       }else{
+               lte_dl_sched_trace->imsi = -1;
+       }
+       node_2_1 = node_2_0->dlschedulingrecord;
+       if(node_2_0->dlschedulingrecord){
+               if(node_2_1->numofharqretx){
+                       lte_dl_sched_trace->numOfHarqReTx = node_2_1->numofharqretx->value;
+                       lte_dl_sched_trace->numOfHarqReTx_exists = 1;
+               }else{
+                       lte_dl_sched_trace->numOfHarqReTx_exists = 0;
+               }
+               lte_dl_sched_trace->numOfTtiUeSched = node_2_1->numofttiuesched;
+               lte_dl_sched_trace->numOfHarq1stTx = node_2_1->numofharq1sttx;
+               lte_dl_sched_trace->recordCollectionDuration = node_2_1->recordcollectionduration;
+               if(node_2_1->numofttiueschedmimo){
+                       lte_dl_sched_trace->numOfTtiUeSchedMimo = node_2_1->numofttiueschedmimo->value;
+                       lte_dl_sched_trace->numOfTtiUeSchedMimo_exists = 1;
+               }else{
+                       lte_dl_sched_trace->numOfTtiUeSchedMimo_exists = 0;
+               }
+               lte_dl_sched_trace->numOfPrbUsed = node_2_1->numofprbused;
+               if(node_2_1->numofbad1stmacpdutx){
+                       lte_dl_sched_trace->numOfBad1stMacPduTx = node_2_1->numofbad1stmacpdutx->value;
+                       lte_dl_sched_trace->numOfBad1stMacPduTx_exists = 1;
+               }else{
+                       lte_dl_sched_trace->numOfBad1stMacPduTx_exists = 0;
+               }
+               if(node_2_1->numofbadlastmacpdutx){
+                       lte_dl_sched_trace->numOfBadLastMacPduTx = node_2_1->numofbadlastmacpdutx->value;
+                       lte_dl_sched_trace->numOfBadLastMacPduTx_exists = 1;
+               }else{
+                       lte_dl_sched_trace->numOfBadLastMacPduTx_exists = 0;
+               }
+               rts_fta_process_packet(&cur_packet);
+       }
+// --------------------------------------------------
+// ---  Specialized processing for .proto ricgeomessages_pcmdreport.json, path lte_pcmd.json
+
+       lte_pcell_meas = (struct _lte_pcell_meas *)(cur_packet.record.packed.values);
+       cur_packet.schema = 10003;
+       node_3_0 = node_2_0;
+       ts_lo = hdr->hdr->timestamp & 0xffffffff;
+       ts_hi = hdr->hdr->timestamp >> 32;
+       lte_pcell_meas->timestamp_ms = (ts_hi) * 1000 + ((ts_lo * 1000) >> 32);
+       lte_pcell_meas->eci = hdr->hdr->eci;
+       lte_pcell_meas->plmn = hdr->hdr->plmn;
+       lte_pcell_meas->eutran_trace_id = hdr->hdr->eutrantraceid;
+       lte_pcell_meas->crnti = hdr->hdr->crnti;
+
+       if(node_3_0->sessioninfo){
+               lte_pcell_meas->imei = node_3_0->sessioninfo->imei;
+       }else{
+               lte_pcell_meas->imei = -1;
+       }
+       if(node_3_0->sessioninfo){
+               lte_pcell_meas->imsi = node_3_0->sessioninfo->imsi;
+       }else{
+               lte_pcell_meas->imsi = -1;
+       }
+       node_3_1 = node_3_0->uemeastracerecord;
+       if(node_3_0->uemeastracerecord){
+               node_3_2 = node_3_1->measresultpcell;
+               if(node_3_1->measresultpcell){
+                       lte_pcell_meas->pci = node_3_2->pci;
+                       lte_pcell_meas->rsrq = node_3_2->rsrq;
+                       lte_pcell_meas->rsrp = node_3_2->rsrp;
+                       rts_fta_process_packet(&cur_packet);
+               }
+       }
+       pcmd_report__free_unpacked(node_0_0,NULL);
+       return 0;
+}
+
 gs_uint32_t process_buffer_RATDATAUSAGE(gs_uint8_t * buffer, gs_uint32_t buflen){
        char *empty_string = "";
 unsigned long long int ts_lo, ts_hi;
@@ -1441,46 +1649,45 @@ unsigned long long int ts_lo, ts_hi;
        StreamingProtobufs__ERABItem *node_0_3 = NULL;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _eRABs_acked_for_admit_for_ue *eRABs_acked_for_admit_for_ue = NULL;
+       struct _add_req_ack_cellid *add_req_ack_cellid = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_1_0 = NULL;
-       StreamingProtobufs__ERABsAdmittedToBeAddedSgNBAddReqAckList *node_1_1 = NULL;
-       StreamingProtobufs__ERABsAdmittedToBeAddedSgNBAddReqAckItem *node_1_2 = NULL;
-       gs_uint32_t i_1_2;
+       StreamingProtobufs__CGConfig *node_1_1 = NULL;
+       StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_1_2 = NULL;
+       StreamingProtobufs__CGConfigIEs *node_1_3 = NULL;
+       StreamingProtobufs__RRCReconfiguration *node_1_4 = NULL;
+       StreamingProtobufs__RRCReconfigurationIEs *node_1_5 = NULL;
+       StreamingProtobufs__CellGroupConfig *node_1_6 = NULL;
+       StreamingProtobufs__SpCellConfig *node_1_7 = NULL;
+       StreamingProtobufs__ReconfigurationWithSync *node_1_8 = NULL;
+       StreamingProtobufs__ServingCellConfigCommon *node_1_9 = NULL;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _SgNB_ack_for_ue_NRfreqs *SgNB_ack_for_ue_NRfreqs = NULL;
+       struct _eRABs_acked_for_admit_for_ue *eRABs_acked_for_admit_for_ue = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_2_0 = NULL;
-       StreamingProtobufs__CGConfig *node_2_1 = NULL;
-       StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_2_2 = NULL;
-       StreamingProtobufs__CGConfigIEs *node_2_3 = NULL;
+       StreamingProtobufs__ERABsAdmittedToBeAddedSgNBAddReqAckList *node_2_1 = NULL;
+       StreamingProtobufs__ERABsAdmittedToBeAddedSgNBAddReqAckItem *node_2_2 = NULL;
+       gs_uint32_t i_2_2;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _SgNB_ack_for_add_mod_for_ue *SgNB_ack_for_add_mod_for_ue = NULL;
+       struct _SgNB_ack_for_ue_NRfreqs *SgNB_ack_for_ue_NRfreqs = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_3_0 = NULL;
        StreamingProtobufs__CGConfig *node_3_1 = NULL;
        StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_3_2 = NULL;
        StreamingProtobufs__CGConfigIEs *node_3_3 = NULL;
-       StreamingProtobufs__RadioBearerConfig *node_3_4 = NULL;
-       StreamingProtobufs__DRBToAddModList *node_3_5 = NULL;
-       StreamingProtobufs__DRBToAddMod *node_3_6 = NULL;
-       gs_uint32_t i_3_6;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _SgNB_ack_for_ue_measurements *SgNB_ack_for_ue_measurements = NULL;
+       struct _SgNB_ack_for_add_mod_for_ue *SgNB_ack_for_add_mod_for_ue = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_4_0 = NULL;
        StreamingProtobufs__CGConfig *node_4_1 = NULL;
        StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_4_2 = NULL;
        StreamingProtobufs__CGConfigIEs *node_4_3 = NULL;
-       StreamingProtobufs__MeasResultList2NR *node_4_4 = NULL;
-       StreamingProtobufs__MeasResult2NR *node_4_5 = NULL;
-       gs_uint32_t i_4_5;
-       StreamingProtobufs__MeasResultNR *node_4_6 = NULL;
-       StreamingProtobufs__MeasResult *node_4_7 = NULL;
-       StreamingProtobufs__CellResults *node_4_8 = NULL;
-       StreamingProtobufs__MeasQuantityResults *node_4_9 = NULL;
+       StreamingProtobufs__RadioBearerConfig *node_4_4 = NULL;
+       StreamingProtobufs__DRBToAddModList *node_4_5 = NULL;
+       StreamingProtobufs__DRBToAddMod *node_4_6 = NULL;
+       gs_uint32_t i_4_6;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _SgNB_ack_for_ue_beam_csi *SgNB_ack_for_ue_beam_csi = NULL;
+       struct _SgNB_ack_for_ue_measurements *SgNB_ack_for_ue_measurements = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_5_0 = NULL;
        StreamingProtobufs__CGConfig *node_5_1 = NULL;
        StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_5_2 = NULL;
@@ -1490,14 +1697,11 @@ unsigned long long int ts_lo, ts_hi;
        gs_uint32_t i_5_5;
        StreamingProtobufs__MeasResultNR *node_5_6 = NULL;
        StreamingProtobufs__MeasResult *node_5_7 = NULL;
-       StreamingProtobufs__RsIndexResults *node_5_8 = NULL;
-       StreamingProtobufs__ResultsPerCSIRSIndexList *node_5_9 = NULL;
-       StreamingProtobufs__ResultsPerCSIRSIndex *node_5_10 = NULL;
-       gs_uint32_t i_5_10;
-       StreamingProtobufs__MeasQuantityResults *node_5_11 = NULL;
+       StreamingProtobufs__CellResults *node_5_8 = NULL;
+       StreamingProtobufs__MeasQuantityResults *node_5_9 = NULL;
 // ------------------------------------------
 // ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
-       struct _SgNB_ack_for_ue_beam_ssb *SgNB_ack_for_ue_beam_ssb = NULL;
+       struct _SgNB_ack_for_ue_beam_csi *SgNB_ack_for_ue_beam_csi = NULL;
        StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_6_0 = NULL;
        StreamingProtobufs__CGConfig *node_6_1 = NULL;
        StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_6_2 = NULL;
@@ -1508,10 +1712,27 @@ unsigned long long int ts_lo, ts_hi;
        StreamingProtobufs__MeasResultNR *node_6_6 = NULL;
        StreamingProtobufs__MeasResult *node_6_7 = NULL;
        StreamingProtobufs__RsIndexResults *node_6_8 = NULL;
-       StreamingProtobufs__ResultsPerSSBIndexList *node_6_9 = NULL;
-       StreamingProtobufs__ResultsPerSSBIndex *node_6_10 = NULL;
+       StreamingProtobufs__ResultsPerCSIRSIndexList *node_6_9 = NULL;
+       StreamingProtobufs__ResultsPerCSIRSIndex *node_6_10 = NULL;
        gs_uint32_t i_6_10;
        StreamingProtobufs__MeasQuantityResults *node_6_11 = NULL;
+// ------------------------------------------
+// ---  Variables for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
+       struct _SgNB_ack_for_ue_beam_ssb *SgNB_ack_for_ue_beam_ssb = NULL;
+       StreamingProtobufs__SgNBAdditionRequestAcknowledge *node_7_0 = NULL;
+       StreamingProtobufs__CGConfig *node_7_1 = NULL;
+       StreamingProtobufs__CGConfigCriticalExtensionsChoice1 *node_7_2 = NULL;
+       StreamingProtobufs__CGConfigIEs *node_7_3 = NULL;
+       StreamingProtobufs__MeasResultList2NR *node_7_4 = NULL;
+       StreamingProtobufs__MeasResult2NR *node_7_5 = NULL;
+       gs_uint32_t i_7_5;
+       StreamingProtobufs__MeasResultNR *node_7_6 = NULL;
+       StreamingProtobufs__MeasResult *node_7_7 = NULL;
+       StreamingProtobufs__RsIndexResults *node_7_8 = NULL;
+       StreamingProtobufs__ResultsPerSSBIndexList *node_7_9 = NULL;
+       StreamingProtobufs__ResultsPerSSBIndex *node_7_10 = NULL;
+       gs_uint32_t i_7_10;
+       StreamingProtobufs__MeasQuantityResults *node_7_11 = NULL;
 
 // --------------------------------------------------
 // ---  Specialized processing for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
@@ -1573,11 +1794,66 @@ unsigned long long int ts_lo, ts_hi;
                }
        }
 // --------------------------------------------------
+// ---  Specialized processing for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
+
+       add_req_ack_cellid = (struct _add_req_ack_cellid *)(cur_packet.record.packed.values);
+       cur_packet.schema = 10004;
+       node_1_0 = node_0_0;
+       ts_lo = hdr->header->timestamp & 0xffffffff;
+       ts_hi = hdr->header->timestamp >> 32;
+       add_req_ack_cellid->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
+       if(hdr->header->gnbid==NULL)
+               add_req_ack_cellid->gnb_id = empty_string;
+       else
+               add_req_ack_cellid->gnb_id = hdr->header->gnbid->value;
+
+       add_req_ack_cellid->id_MeNB_UE_X2AP_ID = node_1_0->id_menb_ue_x2ap_id;
+       add_req_ack_cellid->id_SgNB_UE_X2AP_ID = node_1_0->id_sgnb_ue_x2ap_id;
+       if(node_1_0->id_menb_ue_x2ap_id_extension){
+               add_req_ack_cellid->id_MeNB_UE_X2AP_ID_Extension = node_1_0->id_menb_ue_x2ap_id_extension->value;
+       }else{
+               add_req_ack_cellid->id_MeNB_UE_X2AP_ID_Extension = 0;
+       }
+       node_1_1 = node_1_0->id_sgnbtomenbcontainer;
+       if(node_1_0->id_sgnbtomenbcontainer){
+               node_1_2 = node_1_1->criticalextensionschoice1;
+               if(node_1_1->criticalextensionschoice1){
+                       node_1_3 = node_1_2->protocolies;
+                       if(node_1_2->protocolies){
+                               node_1_4 = node_1_3->scg_cellgroupconfig;
+                               if(node_1_3->scg_cellgroupconfig){
+                                       node_1_5 = node_1_4->rrcreconfiguration;
+                                       if(node_1_4->rrcreconfiguration){
+                                               node_1_6 = node_1_5->secondarycellgroup;
+                                               if(node_1_5->secondarycellgroup){
+                                                       node_1_7 = node_1_6->spcellconfig;
+                                                       if(node_1_6->spcellconfig){
+                                                               node_1_8 = node_1_7->reconfigurationwithsync;
+                                                               if(node_1_7->reconfigurationwithsync){
+                                                                       node_1_9 = node_1_8->spcellconfigcommon;
+                                                                       if(node_1_8->spcellconfigcommon){
+                                                                               if(node_1_9->physcellid){
+                                                                                       add_req_ack_cellid->physCellId = node_1_9->physcellid->value;
+                                                                                       add_req_ack_cellid->physCellId_exists = 1;
+                                                                               }else{
+                                                                                       add_req_ack_cellid->physCellId_exists = 0;
+                                                                               }
+                                                                               rts_fta_process_packet(&cur_packet);
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+// --------------------------------------------------
 // ---  Specialized processing for .proto sgnb_addition_request_acknowledge.json, path sgnb_addition_ack.json
 
        eRABs_acked_for_admit_for_ue = (struct _eRABs_acked_for_admit_for_ue *)(cur_packet.record.packed.values);
        cur_packet.schema = 502;
-       node_1_0 = node_0_0;
+       node_2_0 = node_1_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        eRABs_acked_for_admit_for_ue->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -1586,55 +1862,55 @@ unsigned long long int ts_lo, ts_hi;
        else
                eRABs_acked_for_admit_for_ue->gnb_id = hdr->header->gnbid->value;
 
-       eRABs_acked_for_admit_for_ue->id_MeNB_UE_X2AP_ID = node_1_0->id_menb_ue_x2ap_id;
-       eRABs_acked_for_admit_for_ue->id_SgNB_UE_X2AP_ID = node_1_0->id_sgnb_ue_x2ap_id;
-       if(node_1_0->id_menb_ue_x2ap_id_extension){
-               eRABs_acked_for_admit_for_ue->id_MeNB_UE_X2AP_ID_Extension = node_1_0->id_menb_ue_x2ap_id_extension->value;
+       eRABs_acked_for_admit_for_ue->id_MeNB_UE_X2AP_ID = node_2_0->id_menb_ue_x2ap_id;
+       eRABs_acked_for_admit_for_ue->id_SgNB_UE_X2AP_ID = node_2_0->id_sgnb_ue_x2ap_id;
+       if(node_2_0->id_menb_ue_x2ap_id_extension){
+               eRABs_acked_for_admit_for_ue->id_MeNB_UE_X2AP_ID_Extension = node_2_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                eRABs_acked_for_admit_for_ue->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_1_1 = node_1_0->id_e_rabs_admitted_tobeadded_sgnbaddreqacklist;
-       if(node_1_0->id_e_rabs_admitted_tobeadded_sgnbaddreqacklist){
-               for(i_1_2=0;i_1_2<node_1_1->n_id_e_rabs_admitted_tobeadded_sgnbaddreqack_item; i_1_2++){
-                       node_1_2 = node_1_1->id_e_rabs_admitted_tobeadded_sgnbaddreqack_item[i_1_2];
-                       if(node_1_2->sgnbpdcppresent && node_1_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters && node_1_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->allocationandretentionpriority){
-                               eRABs_acked_for_admit_for_ue->ARP = node_1_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->allocationandretentionpriority->prioritylevel;
+       node_2_1 = node_2_0->id_e_rabs_admitted_tobeadded_sgnbaddreqacklist;
+       if(node_2_0->id_e_rabs_admitted_tobeadded_sgnbaddreqacklist){
+               for(i_2_2=0;i_2_2<node_2_1->n_id_e_rabs_admitted_tobeadded_sgnbaddreqack_item; i_2_2++){
+                       node_2_2 = node_2_1->id_e_rabs_admitted_tobeadded_sgnbaddreqack_item[i_2_2];
+                       if(node_2_2->sgnbpdcppresent && node_2_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters && node_2_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->allocationandretentionpriority){
+                               eRABs_acked_for_admit_for_ue->ARP = node_2_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->allocationandretentionpriority->prioritylevel;
                        }else{
                                eRABs_acked_for_admit_for_ue->ARP = 0;
                        }
-                       if(node_1_2->sgnbpdcppresent && node_1_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint){
-                               eRABs_acked_for_admit_for_ue->gTP_TEID_dl = node_1_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint->gtp_teid;
+                       if(node_2_2->sgnbpdcppresent && node_2_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint){
+                               eRABs_acked_for_admit_for_ue->gTP_TEID_dl = node_2_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint->gtp_teid;
                                eRABs_acked_for_admit_for_ue->gTP_TEID_dl_exists = 1;
                        }else{
                                eRABs_acked_for_admit_for_ue->gTP_TEID_dl_exists = 0;
                        }
-                       if(node_1_2->en_dc_resourceconfiguration){
-                               eRABs_acked_for_admit_for_ue->mCGresources = node_1_2->en_dc_resourceconfiguration->mcgresources;
+                       if(node_2_2->en_dc_resourceconfiguration){
+                               eRABs_acked_for_admit_for_ue->mCGresources = node_2_2->en_dc_resourceconfiguration->mcgresources;
                                eRABs_acked_for_admit_for_ue->mCGresources_exists = 1;
                        }else{
                                eRABs_acked_for_admit_for_ue->mCGresources_exists = 0;
                        }
-                       if(node_1_2->sgnbpdcppresent && node_1_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint){
-                               eRABs_acked_for_admit_for_ue->transportLayerAddress_dl = node_1_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint->transportlayeraddress;
+                       if(node_2_2->sgnbpdcppresent && node_2_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint){
+                               eRABs_acked_for_admit_for_ue->transportLayerAddress_dl = node_2_2->sgnbpdcppresent->dl_forwarding_gtptunnelendpoint->transportlayeraddress;
                                eRABs_acked_for_admit_for_ue->transportLayerAddress_dl_exists = 1;
                        }else{
                                eRABs_acked_for_admit_for_ue->transportLayerAddress_dl_exists = 0;
                        }
-                       if(node_1_2->en_dc_resourceconfiguration){
-                               eRABs_acked_for_admit_for_ue->pDCPatSgNB = node_1_2->en_dc_resourceconfiguration->pdcpatsgnb;
+                       if(node_2_2->en_dc_resourceconfiguration){
+                               eRABs_acked_for_admit_for_ue->pDCPatSgNB = node_2_2->en_dc_resourceconfiguration->pdcpatsgnb;
                                eRABs_acked_for_admit_for_ue->pDCPatSgNB_exists = 1;
                        }else{
                                eRABs_acked_for_admit_for_ue->pDCPatSgNB_exists = 0;
                        }
-                       if(node_1_2->en_dc_resourceconfiguration){
-                               eRABs_acked_for_admit_for_ue->sCGresources = node_1_2->en_dc_resourceconfiguration->scgresources;
+                       if(node_2_2->en_dc_resourceconfiguration){
+                               eRABs_acked_for_admit_for_ue->sCGresources = node_2_2->en_dc_resourceconfiguration->scgresources;
                                eRABs_acked_for_admit_for_ue->sCGresources_exists = 1;
                        }else{
                                eRABs_acked_for_admit_for_ue->sCGresources_exists = 0;
                        }
-                       eRABs_acked_for_admit_for_ue->e_RAB_ID = node_1_2->e_rab_id;
-                       if(node_1_2->sgnbpdcppresent && node_1_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters){
-                               eRABs_acked_for_admit_for_ue->qCI = node_1_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->qci;
+                       eRABs_acked_for_admit_for_ue->e_RAB_ID = node_2_2->e_rab_id;
+                       if(node_2_2->sgnbpdcppresent && node_2_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters){
+                               eRABs_acked_for_admit_for_ue->qCI = node_2_2->sgnbpdcppresent->mcg_e_rab_level_qos_parameters->qci;
                        }else{
                                eRABs_acked_for_admit_for_ue->qCI = 0;
                        }
@@ -1646,7 +1922,7 @@ unsigned long long int ts_lo, ts_hi;
 
        SgNB_ack_for_ue_NRfreqs = (struct _SgNB_ack_for_ue_NRfreqs *)(cur_packet.record.packed.values);
        cur_packet.schema = 503;
-       node_2_0 = node_1_0;
+       node_3_0 = node_2_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        SgNB_ack_for_ue_NRfreqs->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -1655,111 +1931,111 @@ unsigned long long int ts_lo, ts_hi;
        else
                SgNB_ack_for_ue_NRfreqs->gnb_id = hdr->header->gnbid->value;
 
-       SgNB_ack_for_ue_NRfreqs->id_MeNB_UE_X2AP_ID = node_2_0->id_menb_ue_x2ap_id;
-       SgNB_ack_for_ue_NRfreqs->id_SgNB_UE_X2AP_ID = node_2_0->id_sgnb_ue_x2ap_id;
-       if(node_2_0->id_menb_ue_x2ap_id_extension){
-               SgNB_ack_for_ue_NRfreqs->id_MeNB_UE_X2AP_ID_Extension = node_2_0->id_menb_ue_x2ap_id_extension->value;
+       SgNB_ack_for_ue_NRfreqs->id_MeNB_UE_X2AP_ID = node_3_0->id_menb_ue_x2ap_id;
+       SgNB_ack_for_ue_NRfreqs->id_SgNB_UE_X2AP_ID = node_3_0->id_sgnb_ue_x2ap_id;
+       if(node_3_0->id_menb_ue_x2ap_id_extension){
+               SgNB_ack_for_ue_NRfreqs->id_MeNB_UE_X2AP_ID_Extension = node_3_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                SgNB_ack_for_ue_NRfreqs->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_2_1 = node_2_0->id_sgnbtomenbcontainer;
-       if(node_2_0->id_sgnbtomenbcontainer){
-               node_2_2 = node_2_1->criticalextensionschoice1;
-               if(node_2_1->criticalextensionschoice1){
-                       node_2_3 = node_2_2->protocolies;
-                       if(node_2_2->protocolies){
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 0 && node_2_3->measconfigsn->measuredfrequenciessn[0]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN0 = node_2_3->measconfigsn->measuredfrequenciessn[0]->measuredfrequency->value;
+       node_3_1 = node_3_0->id_sgnbtomenbcontainer;
+       if(node_3_0->id_sgnbtomenbcontainer){
+               node_3_2 = node_3_1->criticalextensionschoice1;
+               if(node_3_1->criticalextensionschoice1){
+                       node_3_3 = node_3_2->protocolies;
+                       if(node_3_2->protocolies){
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 0 && node_3_3->measconfigsn->measuredfrequenciessn[0]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN0 = node_3_3->measconfigsn->measuredfrequenciessn[0]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN0_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN0_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 1 && node_2_3->measconfigsn->measuredfrequenciessn[1]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN1 = node_2_3->measconfigsn->measuredfrequenciessn[1]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 1 && node_3_3->measconfigsn->measuredfrequenciessn[1]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN1 = node_3_3->measconfigsn->measuredfrequenciessn[1]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN1_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN1_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 2 && node_2_3->measconfigsn->measuredfrequenciessn[2]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN2 = node_2_3->measconfigsn->measuredfrequenciessn[2]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 2 && node_3_3->measconfigsn->measuredfrequenciessn[2]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN2 = node_3_3->measconfigsn->measuredfrequenciessn[2]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN2_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN2_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 3 && node_2_3->measconfigsn->measuredfrequenciessn[3]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN3 = node_2_3->measconfigsn->measuredfrequenciessn[3]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 3 && node_3_3->measconfigsn->measuredfrequenciessn[3]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN3 = node_3_3->measconfigsn->measuredfrequenciessn[3]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN3_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN3_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 4 && node_2_3->measconfigsn->measuredfrequenciessn[4]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN4 = node_2_3->measconfigsn->measuredfrequenciessn[4]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 4 && node_3_3->measconfigsn->measuredfrequenciessn[4]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN4 = node_3_3->measconfigsn->measuredfrequenciessn[4]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN4_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN4_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 5 && node_2_3->measconfigsn->measuredfrequenciessn[5]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN5 = node_2_3->measconfigsn->measuredfrequenciessn[5]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 5 && node_3_3->measconfigsn->measuredfrequenciessn[5]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN5 = node_3_3->measconfigsn->measuredfrequenciessn[5]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN5_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN5_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 6 && node_2_3->measconfigsn->measuredfrequenciessn[6]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN6 = node_2_3->measconfigsn->measuredfrequenciessn[6]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 6 && node_3_3->measconfigsn->measuredfrequenciessn[6]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN6 = node_3_3->measconfigsn->measuredfrequenciessn[6]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN6_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN6_exists = 0;
                                }
-                               if(node_2_3->measconfigsn && node_2_3->measconfigsn->measuredfrequenciessn && node_2_3->measconfigsn->n_measuredfrequenciessn > 7 && node_2_3->measconfigsn->measuredfrequenciessn[7]->measuredfrequency){
-                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN7 = node_2_3->measconfigsn->measuredfrequenciessn[7]->measuredfrequency->value;
+                               if(node_3_3->measconfigsn && node_3_3->measconfigsn->measuredfrequenciessn && node_3_3->measconfigsn->n_measuredfrequenciessn > 7 && node_3_3->measconfigsn->measuredfrequenciessn[7]->measuredfrequency){
+                                       SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN7 = node_3_3->measconfigsn->measuredfrequenciessn[7]->measuredfrequency->value;
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN7_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->measuredFrequenciesSN7_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 0){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs0 = node_2_3->candidateservingfreqlistnr->items[0];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 0){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs0 = node_3_3->candidateservingfreqlistnr->items[0];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs0_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs0_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 1){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs1 = node_2_3->candidateservingfreqlistnr->items[1];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 1){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs1 = node_3_3->candidateservingfreqlistnr->items[1];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs1_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs1_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 2){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs2 = node_2_3->candidateservingfreqlistnr->items[2];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 2){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs2 = node_3_3->candidateservingfreqlistnr->items[2];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs2_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs2_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 3){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs3 = node_2_3->candidateservingfreqlistnr->items[3];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 3){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs3 = node_3_3->candidateservingfreqlistnr->items[3];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs3_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs3_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 4){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs4 = node_2_3->candidateservingfreqlistnr->items[4];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 4){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs4 = node_3_3->candidateservingfreqlistnr->items[4];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs4_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs4_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 5){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs5 = node_2_3->candidateservingfreqlistnr->items[5];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 5){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs5 = node_3_3->candidateservingfreqlistnr->items[5];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs5_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs5_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 6){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs6 = node_2_3->candidateservingfreqlistnr->items[6];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 6){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs6 = node_3_3->candidateservingfreqlistnr->items[6];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs6_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs6_exists = 0;
                                }
-                               if(node_2_3->candidateservingfreqlistnr && node_2_3->candidateservingfreqlistnr->n_items > 7){
-                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs7 = node_2_3->candidateservingfreqlistnr->items[7];
+                               if(node_3_3->candidateservingfreqlistnr && node_3_3->candidateservingfreqlistnr->n_items > 7){
+                                       SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs7 = node_3_3->candidateservingfreqlistnr->items[7];
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs7_exists = 1;
                                }else{
                                        SgNB_ack_for_ue_NRfreqs->candidate_serving_cell_freqs7_exists = 0;
@@ -1773,7 +2049,7 @@ unsigned long long int ts_lo, ts_hi;
 
        SgNB_ack_for_add_mod_for_ue = (struct _SgNB_ack_for_add_mod_for_ue *)(cur_packet.record.packed.values);
        cur_packet.schema = 504;
-       node_3_0 = node_2_0;
+       node_4_0 = node_3_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        SgNB_ack_for_add_mod_for_ue->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -1782,63 +2058,63 @@ unsigned long long int ts_lo, ts_hi;
        else
                SgNB_ack_for_add_mod_for_ue->gnb_id = hdr->header->gnbid->value;
 
-       SgNB_ack_for_add_mod_for_ue->id_MeNB_UE_X2AP_ID = node_3_0->id_menb_ue_x2ap_id;
-       SgNB_ack_for_add_mod_for_ue->id_SgNB_UE_X2AP_ID = node_3_0->id_sgnb_ue_x2ap_id;
-       if(node_3_0->id_menb_ue_x2ap_id_extension){
-               SgNB_ack_for_add_mod_for_ue->id_MeNB_UE_X2AP_ID_Extension = node_3_0->id_menb_ue_x2ap_id_extension->value;
+       SgNB_ack_for_add_mod_for_ue->id_MeNB_UE_X2AP_ID = node_4_0->id_menb_ue_x2ap_id;
+       SgNB_ack_for_add_mod_for_ue->id_SgNB_UE_X2AP_ID = node_4_0->id_sgnb_ue_x2ap_id;
+       if(node_4_0->id_menb_ue_x2ap_id_extension){
+               SgNB_ack_for_add_mod_for_ue->id_MeNB_UE_X2AP_ID_Extension = node_4_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                SgNB_ack_for_add_mod_for_ue->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_3_1 = node_3_0->id_sgnbtomenbcontainer;
-       if(node_3_0->id_sgnbtomenbcontainer){
-               node_3_2 = node_3_1->criticalextensionschoice1;
-               if(node_3_1->criticalextensionschoice1){
-                       node_3_3 = node_3_2->protocolies;
-                       if(node_3_2->protocolies){
-                               node_3_4 = node_3_3->scg_rb_config;
-                               if(node_3_3->scg_rb_config){
-                                       if(node_3_4->drb_toreleaselist && node_3_4->drb_toreleaselist->n_items > 0){
-                                               SgNB_ack_for_add_mod_for_ue->toRelease0 = node_3_4->drb_toreleaselist->items[0];
+       node_4_1 = node_4_0->id_sgnbtomenbcontainer;
+       if(node_4_0->id_sgnbtomenbcontainer){
+               node_4_2 = node_4_1->criticalextensionschoice1;
+               if(node_4_1->criticalextensionschoice1){
+                       node_4_3 = node_4_2->protocolies;
+                       if(node_4_2->protocolies){
+                               node_4_4 = node_4_3->scg_rb_config;
+                               if(node_4_3->scg_rb_config){
+                                       if(node_4_4->drb_toreleaselist && node_4_4->drb_toreleaselist->n_items > 0){
+                                               SgNB_ack_for_add_mod_for_ue->toRelease0 = node_4_4->drb_toreleaselist->items[0];
                                                SgNB_ack_for_add_mod_for_ue->toRelease0_exists = 1;
                                        }else{
                                                SgNB_ack_for_add_mod_for_ue->toRelease0_exists = 0;
                                        }
-                                       if(node_3_4->drb_toreleaselist && node_3_4->drb_toreleaselist->n_items > 1){
-                                               SgNB_ack_for_add_mod_for_ue->toRelease1 = node_3_4->drb_toreleaselist->items[1];
+                                       if(node_4_4->drb_toreleaselist && node_4_4->drb_toreleaselist->n_items > 1){
+                                               SgNB_ack_for_add_mod_for_ue->toRelease1 = node_4_4->drb_toreleaselist->items[1];
                                                SgNB_ack_for_add_mod_for_ue->toRelease1_exists = 1;
                                        }else{
                                                SgNB_ack_for_add_mod_for_ue->toRelease1_exists = 0;
                                        }
-                                       if(node_3_4->drb_toreleaselist && node_3_4->drb_toreleaselist->n_items > 2){
-                                               SgNB_ack_for_add_mod_for_ue->toRelease2 = node_3_4->drb_toreleaselist->items[2];
+                                       if(node_4_4->drb_toreleaselist && node_4_4->drb_toreleaselist->n_items > 2){
+                                               SgNB_ack_for_add_mod_for_ue->toRelease2 = node_4_4->drb_toreleaselist->items[2];
                                                SgNB_ack_for_add_mod_for_ue->toRelease2_exists = 1;
                                        }else{
                                                SgNB_ack_for_add_mod_for_ue->toRelease2_exists = 0;
                                        }
-                                       if(node_3_4->drb_toreleaselist && node_3_4->drb_toreleaselist->n_items > 3){
-                                               SgNB_ack_for_add_mod_for_ue->toRelease3 = node_3_4->drb_toreleaselist->items[3];
+                                       if(node_4_4->drb_toreleaselist && node_4_4->drb_toreleaselist->n_items > 3){
+                                               SgNB_ack_for_add_mod_for_ue->toRelease3 = node_4_4->drb_toreleaselist->items[3];
                                                SgNB_ack_for_add_mod_for_ue->toRelease3_exists = 1;
                                        }else{
                                                SgNB_ack_for_add_mod_for_ue->toRelease3_exists = 0;
                                        }
-                                       node_3_5 = node_3_4->drb_toaddmodlist;
-                                       if(node_3_4->drb_toaddmodlist){
-                                               for(i_3_6=0;i_3_6<node_3_5->n_items; i_3_6++){
-                                                       node_3_6 = node_3_5->items[i_3_6];
-                                                       if(node_3_6->recoverpdcp){
-                                                               SgNB_ack_for_add_mod_for_ue->recoverPDCP = node_3_6->recoverpdcp->value;
+                                       node_4_5 = node_4_4->drb_toaddmodlist;
+                                       if(node_4_4->drb_toaddmodlist){
+                                               for(i_4_6=0;i_4_6<node_4_5->n_items; i_4_6++){
+                                                       node_4_6 = node_4_5->items[i_4_6];
+                                                       if(node_4_6->recoverpdcp){
+                                                               SgNB_ack_for_add_mod_for_ue->recoverPDCP = node_4_6->recoverpdcp->value;
                                                                SgNB_ack_for_add_mod_for_ue->recoverPDCP_exists = 1;
                                                        }else{
                                                                SgNB_ack_for_add_mod_for_ue->recoverPDCP_exists = 0;
                                                        }
-                                                       if(node_3_6->reestablishpdcp){
-                                                               SgNB_ack_for_add_mod_for_ue->reestablishPDCP = node_3_6->reestablishpdcp->value;
+                                                       if(node_4_6->reestablishpdcp){
+                                                               SgNB_ack_for_add_mod_for_ue->reestablishPDCP = node_4_6->reestablishpdcp->value;
                                                                SgNB_ack_for_add_mod_for_ue->reestablishPDCP_exists = 1;
                                                        }else{
                                                                SgNB_ack_for_add_mod_for_ue->reestablishPDCP_exists = 0;
                                                        }
-                                                       SgNB_ack_for_add_mod_for_ue->drb_Identity = node_3_6->drb_identity;
-                                                       SgNB_ack_for_add_mod_for_ue->eps_BearerIdentity = node_3_6->eps_beareridentity;
+                                                       SgNB_ack_for_add_mod_for_ue->drb_Identity = node_4_6->drb_identity;
+                                                       SgNB_ack_for_add_mod_for_ue->eps_BearerIdentity = node_4_6->eps_beareridentity;
                                                        rts_fta_process_packet(&cur_packet);
                                                }
                                        }
@@ -1851,7 +2127,7 @@ unsigned long long int ts_lo, ts_hi;
 
        SgNB_ack_for_ue_measurements = (struct _SgNB_ack_for_ue_measurements *)(cur_packet.record.packed.values);
        cur_packet.schema = 505;
-       node_4_0 = node_3_0;
+       node_5_0 = node_4_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        SgNB_ack_for_ue_measurements->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -1860,63 +2136,63 @@ unsigned long long int ts_lo, ts_hi;
        else
                SgNB_ack_for_ue_measurements->gnb_id = hdr->header->gnbid->value;
 
-       SgNB_ack_for_ue_measurements->id_MeNB_UE_X2AP_ID = node_4_0->id_menb_ue_x2ap_id;
-       SgNB_ack_for_ue_measurements->id_SgNB_UE_X2AP_ID = node_4_0->id_sgnb_ue_x2ap_id;
-       if(node_4_0->id_menb_ue_x2ap_id_extension){
-               SgNB_ack_for_ue_measurements->id_MeNB_UE_X2AP_ID_Extension = node_4_0->id_menb_ue_x2ap_id_extension->value;
+       SgNB_ack_for_ue_measurements->id_MeNB_UE_X2AP_ID = node_5_0->id_menb_ue_x2ap_id;
+       SgNB_ack_for_ue_measurements->id_SgNB_UE_X2AP_ID = node_5_0->id_sgnb_ue_x2ap_id;
+       if(node_5_0->id_menb_ue_x2ap_id_extension){
+               SgNB_ack_for_ue_measurements->id_MeNB_UE_X2AP_ID_Extension = node_5_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                SgNB_ack_for_ue_measurements->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_4_1 = node_4_0->id_sgnbtomenbcontainer;
-       if(node_4_0->id_sgnbtomenbcontainer){
-               node_4_2 = node_4_1->criticalextensionschoice1;
-               if(node_4_1->criticalextensionschoice1){
-                       node_4_3 = node_4_2->protocolies;
-                       if(node_4_2->protocolies){
-                               node_4_4 = node_4_3->candidatecellinfolistsn;
-                               if(node_4_3->candidatecellinfolistsn){
-                                       for(i_4_5=0;i_4_5<node_4_4->n_items; i_4_5++){
-                                               node_4_5 = node_4_4->items[i_4_5];
-                                               if(node_4_5->ssbfrequency){
-                                                       SgNB_ack_for_ue_measurements->ssbFrequency = node_4_5->ssbfrequency->value;
+       node_5_1 = node_5_0->id_sgnbtomenbcontainer;
+       if(node_5_0->id_sgnbtomenbcontainer){
+               node_5_2 = node_5_1->criticalextensionschoice1;
+               if(node_5_1->criticalextensionschoice1){
+                       node_5_3 = node_5_2->protocolies;
+                       if(node_5_2->protocolies){
+                               node_5_4 = node_5_3->candidatecellinfolistsn;
+                               if(node_5_3->candidatecellinfolistsn){
+                                       for(i_5_5=0;i_5_5<node_5_4->n_items; i_5_5++){
+                                               node_5_5 = node_5_4->items[i_5_5];
+                                               if(node_5_5->ssbfrequency){
+                                                       SgNB_ack_for_ue_measurements->ssbFrequency = node_5_5->ssbfrequency->value;
                                                        SgNB_ack_for_ue_measurements->ssbFrequency_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_measurements->ssbFrequency_exists = 0;
                                                }
-                                               if(node_4_5->reffreqcsi_rs){
-                                                       SgNB_ack_for_ue_measurements->refFreqCSI_RS = node_4_5->reffreqcsi_rs->value;
+                                               if(node_5_5->reffreqcsi_rs){
+                                                       SgNB_ack_for_ue_measurements->refFreqCSI_RS = node_5_5->reffreqcsi_rs->value;
                                                        SgNB_ack_for_ue_measurements->refFreqCSI_RS_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_measurements->refFreqCSI_RS_exists = 0;
                                                }
-                                               node_4_6 = node_4_5->measresultservingcell;
-                                               if(node_4_5->measresultservingcell){
-                                                       if(node_4_6->physcellid){
-                                                               SgNB_ack_for_ue_measurements->physCellId = node_4_6->physcellid->value;
+                                               node_5_6 = node_5_5->measresultservingcell;
+                                               if(node_5_5->measresultservingcell){
+                                                       if(node_5_6->physcellid){
+                                                               SgNB_ack_for_ue_measurements->physCellId = node_5_6->physcellid->value;
                                                                SgNB_ack_for_ue_measurements->physCellId_exists = 1;
                                                        }else{
                                                                SgNB_ack_for_ue_measurements->physCellId_exists = 0;
                                                        }
-                                                       node_4_7 = node_4_6->measresult;
-                                                       if(node_4_6->measresult){
-                                                               node_4_8 = node_4_7->cellresults;
-                                                               if(node_4_7->cellresults){
-                                                                       node_4_9 = node_4_8->resultscsi_rs_cell;
-                                                                       if(node_4_8->resultscsi_rs_cell){
-                                                                               if(node_4_9->rsrq){
-                                                                                       SgNB_ack_for_ue_measurements->rsrq = node_4_9->rsrq->value;
+                                                       node_5_7 = node_5_6->measresult;
+                                                       if(node_5_6->measresult){
+                                                               node_5_8 = node_5_7->cellresults;
+                                                               if(node_5_7->cellresults){
+                                                                       node_5_9 = node_5_8->resultscsi_rs_cell;
+                                                                       if(node_5_8->resultscsi_rs_cell){
+                                                                               if(node_5_9->rsrq){
+                                                                                       SgNB_ack_for_ue_measurements->rsrq = node_5_9->rsrq->value;
                                                                                        SgNB_ack_for_ue_measurements->rsrq_exists = 1;
                                                                                }else{
                                                                                        SgNB_ack_for_ue_measurements->rsrq_exists = 0;
                                                                                }
-                                                                               if(node_4_9->rsrp){
-                                                                                       SgNB_ack_for_ue_measurements->rsrp = node_4_9->rsrp->value;
+                                                                               if(node_5_9->rsrp){
+                                                                                       SgNB_ack_for_ue_measurements->rsrp = node_5_9->rsrp->value;
                                                                                        SgNB_ack_for_ue_measurements->rsrp_exists = 1;
                                                                                }else{
                                                                                        SgNB_ack_for_ue_measurements->rsrp_exists = 0;
                                                                                }
-                                                                               if(node_4_9->sinr){
-                                                                                       SgNB_ack_for_ue_measurements->sinr = node_4_9->sinr->value;
+                                                                               if(node_5_9->sinr){
+                                                                                       SgNB_ack_for_ue_measurements->sinr = node_5_9->sinr->value;
                                                                                        SgNB_ack_for_ue_measurements->sinr_exists = 1;
                                                                                }else{
                                                                                        SgNB_ack_for_ue_measurements->sinr_exists = 0;
@@ -1936,7 +2212,7 @@ unsigned long long int ts_lo, ts_hi;
 
        SgNB_ack_for_ue_beam_csi = (struct _SgNB_ack_for_ue_beam_csi *)(cur_packet.record.packed.values);
        cur_packet.schema = 506;
-       node_5_0 = node_4_0;
+       node_6_0 = node_5_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        SgNB_ack_for_ue_beam_csi->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -1945,68 +2221,68 @@ unsigned long long int ts_lo, ts_hi;
        else
                SgNB_ack_for_ue_beam_csi->gnb_id = hdr->header->gnbid->value;
 
-       SgNB_ack_for_ue_beam_csi->id_MeNB_UE_X2AP_ID = node_5_0->id_menb_ue_x2ap_id;
-       SgNB_ack_for_ue_beam_csi->id_SgNB_UE_X2AP_ID = node_5_0->id_sgnb_ue_x2ap_id;
-       if(node_5_0->id_menb_ue_x2ap_id_extension){
-               SgNB_ack_for_ue_beam_csi->id_MeNB_UE_X2AP_ID_Extension = node_5_0->id_menb_ue_x2ap_id_extension->value;
+       SgNB_ack_for_ue_beam_csi->id_MeNB_UE_X2AP_ID = node_6_0->id_menb_ue_x2ap_id;
+       SgNB_ack_for_ue_beam_csi->id_SgNB_UE_X2AP_ID = node_6_0->id_sgnb_ue_x2ap_id;
+       if(node_6_0->id_menb_ue_x2ap_id_extension){
+               SgNB_ack_for_ue_beam_csi->id_MeNB_UE_X2AP_ID_Extension = node_6_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                SgNB_ack_for_ue_beam_csi->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_5_1 = node_5_0->id_sgnbtomenbcontainer;
-       if(node_5_0->id_sgnbtomenbcontainer){
-               node_5_2 = node_5_1->criticalextensionschoice1;
-               if(node_5_1->criticalextensionschoice1){
-                       node_5_3 = node_5_2->protocolies;
-                       if(node_5_2->protocolies){
-                               node_5_4 = node_5_3->candidatecellinfolistsn;
-                               if(node_5_3->candidatecellinfolistsn){
-                                       for(i_5_5=0;i_5_5<node_5_4->n_items; i_5_5++){
-                                               node_5_5 = node_5_4->items[i_5_5];
-                                               if(node_5_5->ssbfrequency){
-                                                       SgNB_ack_for_ue_beam_csi->ssbFrequency = node_5_5->ssbfrequency->value;
+       node_6_1 = node_6_0->id_sgnbtomenbcontainer;
+       if(node_6_0->id_sgnbtomenbcontainer){
+               node_6_2 = node_6_1->criticalextensionschoice1;
+               if(node_6_1->criticalextensionschoice1){
+                       node_6_3 = node_6_2->protocolies;
+                       if(node_6_2->protocolies){
+                               node_6_4 = node_6_3->candidatecellinfolistsn;
+                               if(node_6_3->candidatecellinfolistsn){
+                                       for(i_6_5=0;i_6_5<node_6_4->n_items; i_6_5++){
+                                               node_6_5 = node_6_4->items[i_6_5];
+                                               if(node_6_5->ssbfrequency){
+                                                       SgNB_ack_for_ue_beam_csi->ssbFrequency = node_6_5->ssbfrequency->value;
                                                        SgNB_ack_for_ue_beam_csi->ssbFrequency_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_beam_csi->ssbFrequency_exists = 0;
                                                }
-                                               if(node_5_5->reffreqcsi_rs){
-                                                       SgNB_ack_for_ue_beam_csi->refFreqCSI_RS = node_5_5->reffreqcsi_rs->value;
+                                               if(node_6_5->reffreqcsi_rs){
+                                                       SgNB_ack_for_ue_beam_csi->refFreqCSI_RS = node_6_5->reffreqcsi_rs->value;
                                                        SgNB_ack_for_ue_beam_csi->refFreqCSI_RS_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_beam_csi->refFreqCSI_RS_exists = 0;
                                                }
-                                               node_5_6 = node_5_5->measresultservingcell;
-                                               if(node_5_5->measresultservingcell){
-                                                       if(node_5_6->physcellid){
-                                                               SgNB_ack_for_ue_beam_csi->physCellId = node_5_6->physcellid->value;
+                                               node_6_6 = node_6_5->measresultservingcell;
+                                               if(node_6_5->measresultservingcell){
+                                                       if(node_6_6->physcellid){
+                                                               SgNB_ack_for_ue_beam_csi->physCellId = node_6_6->physcellid->value;
                                                                SgNB_ack_for_ue_beam_csi->physCellId_exists = 1;
                                                        }else{
                                                                SgNB_ack_for_ue_beam_csi->physCellId_exists = 0;
                                                        }
-                                                       node_5_7 = node_5_6->measresult;
-                                                       if(node_5_6->measresult){
-                                                               node_5_8 = node_5_7->rsindexresults;
-                                                               if(node_5_7->rsindexresults){
-                                                                       node_5_9 = node_5_8->resultscsi_rs_indexes;
-                                                                       if(node_5_8->resultscsi_rs_indexes){
-                                                                               for(i_5_10=0;i_5_10<node_5_9->n_items; i_5_10++){
-                                                                                       node_5_10 = node_5_9->items[i_5_10];
-                                                                                       SgNB_ack_for_ue_beam_csi->csi_rs_index = node_5_10->csi_rs_index;
-                                                                                       node_5_11 = node_5_10->csi_rs_results;
-                                                                                       if(node_5_10->csi_rs_results){
-                                                                                               if(node_5_11->rsrq){
-                                                                                                       SgNB_ack_for_ue_beam_csi->rsrq = node_5_11->rsrq->value;
+                                                       node_6_7 = node_6_6->measresult;
+                                                       if(node_6_6->measresult){
+                                                               node_6_8 = node_6_7->rsindexresults;
+                                                               if(node_6_7->rsindexresults){
+                                                                       node_6_9 = node_6_8->resultscsi_rs_indexes;
+                                                                       if(node_6_8->resultscsi_rs_indexes){
+                                                                               for(i_6_10=0;i_6_10<node_6_9->n_items; i_6_10++){
+                                                                                       node_6_10 = node_6_9->items[i_6_10];
+                                                                                       SgNB_ack_for_ue_beam_csi->csi_rs_index = node_6_10->csi_rs_index;
+                                                                                       node_6_11 = node_6_10->csi_rs_results;
+                                                                                       if(node_6_10->csi_rs_results){
+                                                                                               if(node_6_11->rsrq){
+                                                                                                       SgNB_ack_for_ue_beam_csi->rsrq = node_6_11->rsrq->value;
                                                                                                        SgNB_ack_for_ue_beam_csi->rsrq_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_csi->rsrq_exists = 0;
                                                                                                }
-                                                                                               if(node_5_11->rsrp){
-                                                                                                       SgNB_ack_for_ue_beam_csi->rsrp = node_5_11->rsrp->value;
+                                                                                               if(node_6_11->rsrp){
+                                                                                                       SgNB_ack_for_ue_beam_csi->rsrp = node_6_11->rsrp->value;
                                                                                                        SgNB_ack_for_ue_beam_csi->rsrp_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_csi->rsrp_exists = 0;
                                                                                                }
-                                                                                               if(node_5_11->sinr){
-                                                                                                       SgNB_ack_for_ue_beam_csi->sinr = node_5_11->sinr->value;
+                                                                                               if(node_6_11->sinr){
+                                                                                                       SgNB_ack_for_ue_beam_csi->sinr = node_6_11->sinr->value;
                                                                                                        SgNB_ack_for_ue_beam_csi->sinr_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_csi->sinr_exists = 0;
@@ -2028,7 +2304,7 @@ unsigned long long int ts_lo, ts_hi;
 
        SgNB_ack_for_ue_beam_ssb = (struct _SgNB_ack_for_ue_beam_ssb *)(cur_packet.record.packed.values);
        cur_packet.schema = 507;
-       node_6_0 = node_5_0;
+       node_7_0 = node_6_0;
        ts_lo = hdr->header->timestamp & 0xffffffff;
        ts_hi = hdr->header->timestamp >> 32;
        SgNB_ack_for_ue_beam_ssb->timestamp_ms = (ts_hi - 2208988800) * 1000 + ((ts_lo * 1000) >> 32);
@@ -2037,68 +2313,68 @@ unsigned long long int ts_lo, ts_hi;
        else
                SgNB_ack_for_ue_beam_ssb->gnb_id = hdr->header->gnbid->value;
 
-       SgNB_ack_for_ue_beam_ssb->id_MeNB_UE_X2AP_ID = node_6_0->id_menb_ue_x2ap_id;
-       SgNB_ack_for_ue_beam_ssb->id_SgNB_UE_X2AP_ID = node_6_0->id_sgnb_ue_x2ap_id;
-       if(node_6_0->id_menb_ue_x2ap_id_extension){
-               SgNB_ack_for_ue_beam_ssb->id_MeNB_UE_X2AP_ID_Extension = node_6_0->id_menb_ue_x2ap_id_extension->value;
+       SgNB_ack_for_ue_beam_ssb->id_MeNB_UE_X2AP_ID = node_7_0->id_menb_ue_x2ap_id;
+       SgNB_ack_for_ue_beam_ssb->id_SgNB_UE_X2AP_ID = node_7_0->id_sgnb_ue_x2ap_id;
+       if(node_7_0->id_menb_ue_x2ap_id_extension){
+               SgNB_ack_for_ue_beam_ssb->id_MeNB_UE_X2AP_ID_Extension = node_7_0->id_menb_ue_x2ap_id_extension->value;
        }else{
                SgNB_ack_for_ue_beam_ssb->id_MeNB_UE_X2AP_ID_Extension = 0;
        }
-       node_6_1 = node_6_0->id_sgnbtomenbcontainer;
-       if(node_6_0->id_sgnbtomenbcontainer){
-               node_6_2 = node_6_1->criticalextensionschoice1;
-               if(node_6_1->criticalextensionschoice1){
-                       node_6_3 = node_6_2->protocolies;
-                       if(node_6_2->protocolies){
-                               node_6_4 = node_6_3->candidatecellinfolistsn;
-                               if(node_6_3->candidatecellinfolistsn){
-                                       for(i_6_5=0;i_6_5<node_6_4->n_items; i_6_5++){
-                                               node_6_5 = node_6_4->items[i_6_5];
-                                               if(node_6_5->ssbfrequency){
-                                                       SgNB_ack_for_ue_beam_ssb->ssbFrequency = node_6_5->ssbfrequency->value;
+       node_7_1 = node_7_0->id_sgnbtomenbcontainer;
+       if(node_7_0->id_sgnbtomenbcontainer){
+               node_7_2 = node_7_1->criticalextensionschoice1;
+               if(node_7_1->criticalextensionschoice1){
+                       node_7_3 = node_7_2->protocolies;
+                       if(node_7_2->protocolies){
+                               node_7_4 = node_7_3->candidatecellinfolistsn;
+                               if(node_7_3->candidatecellinfolistsn){
+                                       for(i_7_5=0;i_7_5<node_7_4->n_items; i_7_5++){
+                                               node_7_5 = node_7_4->items[i_7_5];
+                                               if(node_7_5->ssbfrequency){
+                                                       SgNB_ack_for_ue_beam_ssb->ssbFrequency = node_7_5->ssbfrequency->value;
                                                        SgNB_ack_for_ue_beam_ssb->ssbFrequency_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_beam_ssb->ssbFrequency_exists = 0;
                                                }
-                                               if(node_6_5->reffreqcsi_rs){
-                                                       SgNB_ack_for_ue_beam_ssb->refFreqCSI_RS = node_6_5->reffreqcsi_rs->value;
+                                               if(node_7_5->reffreqcsi_rs){
+                                                       SgNB_ack_for_ue_beam_ssb->refFreqCSI_RS = node_7_5->reffreqcsi_rs->value;
                                                        SgNB_ack_for_ue_beam_ssb->refFreqCSI_RS_exists = 1;
                                                }else{
                                                        SgNB_ack_for_ue_beam_ssb->refFreqCSI_RS_exists = 0;
                                                }
-                                               node_6_6 = node_6_5->measresultservingcell;
-                                               if(node_6_5->measresultservingcell){
-                                                       if(node_6_6->physcellid){
-                                                               SgNB_ack_for_ue_beam_ssb->physCellId = node_6_6->physcellid->value;
+                                               node_7_6 = node_7_5->measresultservingcell;
+                                               if(node_7_5->measresultservingcell){
+                                                       if(node_7_6->physcellid){
+                                                               SgNB_ack_for_ue_beam_ssb->physCellId = node_7_6->physcellid->value;
                                                                SgNB_ack_for_ue_beam_ssb->physCellId_exists = 1;
                                                        }else{
                                                                SgNB_ack_for_ue_beam_ssb->physCellId_exists = 0;
                                                        }
-                                                       node_6_7 = node_6_6->measresult;
-                                                       if(node_6_6->measresult){
-                                                               node_6_8 = node_6_7->rsindexresults;
-                                                               if(node_6_7->rsindexresults){
-                                                                       node_6_9 = node_6_8->resultsssb_indexes;
-                                                                       if(node_6_8->resultsssb_indexes){
-                                                                               for(i_6_10=0;i_6_10<node_6_9->n_items; i_6_10++){
-                                                                                       node_6_10 = node_6_9->items[i_6_10];
-                                                                                       SgNB_ack_for_ue_beam_ssb->ssb_Index = node_6_10->ssb_index;
-                                                                                       node_6_11 = node_6_10->ssb_results;
-                                                                                       if(node_6_10->ssb_results){
-                                                                                               if(node_6_11->rsrq){
-                                                                                                       SgNB_ack_for_ue_beam_ssb->rsrq = node_6_11->rsrq->value;
+                                                       node_7_7 = node_7_6->measresult;
+                                                       if(node_7_6->measresult){
+                                                               node_7_8 = node_7_7->rsindexresults;
+                                                               if(node_7_7->rsindexresults){
+                                                                       node_7_9 = node_7_8->resultsssb_indexes;
+                                                                       if(node_7_8->resultsssb_indexes){
+                                                                               for(i_7_10=0;i_7_10<node_7_9->n_items; i_7_10++){
+                                                                                       node_7_10 = node_7_9->items[i_7_10];
+                                                                                       SgNB_ack_for_ue_beam_ssb->ssb_Index = node_7_10->ssb_index;
+                                                                                       node_7_11 = node_7_10->ssb_results;
+                                                                                       if(node_7_10->ssb_results){
+                                                                                               if(node_7_11->rsrq){
+                                                                                                       SgNB_ack_for_ue_beam_ssb->rsrq = node_7_11->rsrq->value;
                                                                                                        SgNB_ack_for_ue_beam_ssb->rsrq_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_ssb->rsrq_exists = 0;
                                                                                                }
-                                                                                               if(node_6_11->rsrp){
-                                                                                                       SgNB_ack_for_ue_beam_ssb->rsrp = node_6_11->rsrp->value;
+                                                                                               if(node_7_11->rsrp){
+                                                                                                       SgNB_ack_for_ue_beam_ssb->rsrp = node_7_11->rsrp->value;
                                                                                                        SgNB_ack_for_ue_beam_ssb->rsrp_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_ssb->rsrp_exists = 0;
                                                                                                }
-                                                                                               if(node_6_11->sinr){
-                                                                                                       SgNB_ack_for_ue_beam_ssb->sinr = node_6_11->sinr->value;
+                                                                                               if(node_7_11->sinr){
+                                                                                                       SgNB_ack_for_ue_beam_ssb->sinr = node_7_11->sinr->value;
                                                                                                        SgNB_ack_for_ue_beam_ssb->sinr_exists = 1;
                                                                                                }else{
                                                                                                        SgNB_ack_for_ue_beam_ssb->sinr_exists = 0;
@@ -2282,7 +2558,7 @@ unsigned long long int ts_lo, ts_hi;
 // ---  Specialized processing for .proto sgnb_addition_request.json, path sgnb_addition_req.json
 
        sgnb_addreq_gtp_teid = (struct _sgnb_addreq_gtp_teid *)(cur_packet.record.packed.values);
-       cur_packet.schema = 10000;
+       cur_packet.schema = 10005;
 
        hdr = streaming_protobufs__x2_apstreaming__unpack(NULL, buflen, buffer);
        if(hdr==NULL) return -1;
@@ -3516,7 +3792,7 @@ static gs_uint32_t gs_read_buffer(gs_uint8_t * buffer, gs_uint32_t length){
     
     while(used < length) {
         if ((cur=read(socket_desc,&(buffer[used]),length-used))<=0) {
-            print_error("ERROR:could not read data from gdat stream");
+            print_error("ERROR:could not read data from PROTO stream");
             return -2;
         }
         used+=cur;
@@ -3558,8 +3834,32 @@ static void init_socket() {
     
 }
 
+int read_fifo(struct pollfd* pfd, char* buffer, size_t len, time_t timeout) {
+    int i, bytes_read = 0;
+    while (bytes_read < len) {      
+        if (poll(pfd, 1, timeout)) {         
+            if (pfd->revents & POLLIN) {
+                               while ((i = read(pfd->fd,buffer+bytes_read,len-bytes_read))==-1 && errno==EINTR);
+                if (i <= 0) {
+                    break;             // writer closed fifo or error
+                } else {
+                    bytes_read += i;
+                } 
+            } else
+                break;                 // writer closed fifo
+        }
+        if (!bytes_read)
+            return -1;                 // timeout
+    }
+    return bytes_read;  
+}
+
 //     proceed to the next file
 static void next_file() {
+       int open_flag = O_RDONLY;
+       if (fifo)
+               open_flag |= O_NONBLOCK;
+
        struct stat s;
        if (verbose) {
                fprintf(stderr,"Opening %s\n",name);
@@ -3572,13 +3872,17 @@ static void next_file() {
                dproto_replay_check_messages();
                usleep(10000);
        }
-       if  (pd!=0) {
-               fclose(pd);
-               }
-    if ((pd=fopen(name,"r"))==0) {
+       if  (fd > 0) {
+               close(fd);
+       }
+    if ((fd=open(name,open_flag)) <= 0) {
         print_error("dproto::open failed ");
         exit(10);
     }
+       // setup polling for this file descriptor
+       pfd.fd = fd;
+       pfd.events = POLLIN;
+
        if (singlefile==0) {
                unlink(name);
        }
@@ -3591,6 +3895,7 @@ static gs_retval_t dproto_replay_init(gs_sp_t device) {
     gs_sp_t  gshubtmp;
     gs_sp_t  tempdel;
     gs_sp_t  singlefiletmp;
+    gs_sp_t  fifotmp;  
     
     if ((name=get_iface_properties(device,"filename"))==0) {
                print_error("dproto_init::No protobuf \"Filename\" defined");
@@ -3615,6 +3920,16 @@ static gs_retval_t dproto_replay_init(gs_sp_t device) {
                 fprintf(stderr,"SINGLEFILE DISABLED\n");
         }
     }
+    if ((fifotmp=get_iface_properties(device,"fifo"))!=0) {
+        if (strncmp(fifotmp,"TRUE",4)==0) {
+            fifo=1;
+            if (verbose)
+                fprintf(stderr,"FIFO ENABLED\n");
+        } else {
+            if (verbose)
+                fprintf(stderr,"FIFO DISABLED\n");
+        }
+    }  
     
     if ((delaytmp=get_iface_properties(device,"startupdelay"))!=0) {
         if (verbose) {
@@ -3624,7 +3939,7 @@ static gs_retval_t dproto_replay_init(gs_sp_t device) {
     }
     if ((gshubtmp=get_iface_properties(device,"gshub"))!=0) {
         if (verbose) {
-            fprintf(stderr,"GDAT format using gshub\n");
+            fprintf(stderr,"PROTO format using gshub\n");
         }
         gshub=1;
     }
@@ -3662,7 +3977,7 @@ static gs_retval_t dproto_read_socket()
 }
     
 // read one message from a file
-static void dproto_read_tuple(){
+static gs_retval_t dproto_read_tuple(){
     gs_uint32_t retlen=0;
     gs_uint32_t done=0;
     gs_uint32_t pkg_len=0;
@@ -3671,12 +3986,15 @@ static void dproto_read_tuple(){
        char *timestamp_s;
        gs_retval_t ret;
 
-    if (pd==0) next_file();
+    if (fd==-1) next_file();
+
+       retlen = read_fifo(&pfd, line, 28, 10); // use 10ms timeout
 
-       retlen = fread(line, sizeof(char), 28, pd);
        if(retlen==0){
                eof=1;
-       }else{
+       }else if(retlen==-1) {          
+               return -1;              // -1 indicates a timeout
+       }else if(retlen == 28) {
                pkg_len_s = line+4;
                timestamp_s = line+12;
                pkg_len = atoi(pkg_len_s);
@@ -3689,7 +4007,8 @@ static void dproto_read_tuple(){
                        exit(10);
                }
 
-               retlen = fread(line, sizeof(char), pkg_len, pd);
+               // once we received header we will wait for the main message indefinetly
+               retlen = read_fifo(&pfd, line, pkg_len, -1);
                if(retlen<pkg_len){
                        print_error("Error in dproto_read_tuple, line too short.");
                        fprintf(stderr,"Error, read %d bytes, expecting %d\n",retlen, pkg_len);
@@ -3709,15 +4028,16 @@ static void dproto_read_tuple(){
                if(verbose) {
                        fprintf(stderr,"SINGLEFILE PROCESSING DONE!\n");
                }
-               rts_fta_done();
                if (verbose) {
                        fprintf(stderr,"RTS SAYS BYe\n");
                }
-               while(1==1) sleep(1);
+               return -2;
                } else {
                next_file();
                }
        }
+
+       return 0;
 }
     
 //     Main loop for processing records from a file or socket    
@@ -3725,25 +4045,25 @@ static gs_retval_t dproto_process_file(){
     unsigned cnt=0;
     static unsigned totalcnt=0;
 
-    for(cnt=0;cnt<5/*0000*/;cnt++) {
+    gs_retval_t retval;
+    for(cnt=0;cnt<50000;cnt++) {
         if (gshub!=0) {
-            gs_retval_t retval;
             retval=dproto_read_socket();
-            if (retval==-1) return 0; // got a timeout so service message queue
-            if ((retval==-2) || (ftaschema_is_eof_tuple(cur_packet.record.gdat.schema,(void *)cur_packet.record.gdat.data))) {
-                // we signal that everything is done if we either see an EOF tuple OR the socket is closed by the peer
-                if (verbose)
-                    fprintf(stderr,"Done processing waiting for things to shut down\n");
-                rts_fta_done();
-                // now just service message queue until we get killed or loose connectivity
-                while (0==0) {
-                    fta_start_service(0); // service all waiting messages
-                    usleep(1000); // sleep a millisecond
-                }
-            }
         } else {
-            dproto_read_tuple();
+            retval=dproto_read_tuple();
         }
+        if (retval==-1) return 0; // got a timeout so service message queue
+        if (retval==-2) {
+            // we signal that everything is done if we either see an EOF tuple OR the socket is closed by the peer
+            if (verbose)
+                fprintf(stderr,"Done processing waiting for things to shut down\n");
+            rts_fta_done();
+            // now just service message queue until we get killed or loose connectivity
+            while (0==0) {
+                fta_start_service(0); // service all waiting messages
+                usleep(1000); // sleep a millisecond
+            }
+        } 
     }
     totalcnt=totalcnt+cnt;
     if (verbose) {
@@ -3775,6 +4095,9 @@ gs_retval_t main_dproto(gs_int32_t devicenum, gs_sp_t device, gs_int32_t mapcnt,
        if(strcmp(device,"CONRELEASE")==0){
                process_buffer = &process_buffer_CONRELEASE;
        }
+       if(strcmp(device,"LTE_PCMD")==0){
+               process_buffer = &process_buffer_LTE_PCMD;
+       }
        if(strcmp(device,"RATDATAUSAGE")==0){
                process_buffer = &process_buffer_RATDATAUSAGE;
        }