Commit 6f94f1ea authored by Konstantinos Alexandris's avatar Konstantinos Alexandris Committed by Robert Schmidt

Create RRC struct and getters for Periodic, A1-A5 event and offsets related to...

Create RRC struct and getters for Periodic, A1-A5 event and offsets related to RRC Measurement Report
parent 7578cd31
......@@ -1565,6 +1565,102 @@ float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id) {
return RSRQ_meas_mapping[*(ue_context_p->ue_context.measResults->measResultNeighCells->choice.measResultListEUTRA.list.array[cell_id]->measResult.rsrqResult)];
}
long flexran_get_rrc_ofp(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
return ue_context_p->ue_context.measurement_info->offsetFreq;
}
long flexran_get_rrc_ofn(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
return ue_context_p->ue_context.measurement_info->offsetFreq;
}
long flexran_get_rrc_ocp(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
return ue_context_p->ue_context.measurement_info->cellIndividualOffset;
}
long flexran_get_rrc_ocn(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
return ue_context_p->ue_context.measurement_info->cellIndividualOffset;
}
/* Periodic event */
long flexran_get_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->per_event) return -1;
return ue_context_p->ue_context.measurement_info->events->per_event->maxReportCells;
}
/* A3 event */
long flexran_get_rrc_a3_event_hysteresis(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
return ue_context_p->ue_context.measurement_info->events->a3_event->hysteresis;
}
long flexran_get_rrc_a3_event_timeToTrigger(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
return ue_context_p->ue_context.measurement_info->events->a3_event->timeToTrigger;
}
long flexran_get_rrc_a3_event_maxReportCells(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
return ue_context_p->ue_context.measurement_info->events->a3_event->maxReportCells;
}
long flexran_get_rrc_a3_event_a3_offset(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
return ue_context_p->ue_context.measurement_info->events->a3_event->a3_offset;
}
int flexran_get_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti) {
if (!rrc_is_present(mod_id)) return -1;
struct rrc_eNB_ue_context_s* ue_context_p = rrc_eNB_get_ue_context(RC.rrc[mod_id], rnti);
if (!ue_context_p) return -1;
if (!ue_context_p->ue_context.measurement_info) return -1;
if (!ue_context_p->ue_context.measurement_info->events) return -1;
if (!ue_context_p->ue_context.measurement_info->events->a3_event) return -1;
return ue_context_p->ue_context.measurement_info->events->a3_event->reportOnLeave;
}
uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id) {
if (!rrc_is_present(mod_id)) return 0;
return RC.rrc[mod_id]->configuration.num_plmn;
......
......@@ -540,6 +540,36 @@ float flexran_get_rrc_neigh_rsrp(mid_t mod_id, rnti_t rnti, long cell_id);
/* Get RSRQ of neighbouring Cell */
float flexran_get_rrc_neigh_rsrq(mid_t mod_id, rnti_t rnti, long cell_id);
/* Get ofp offset */
long flexran_get_rrc_ofp(mid_t mod_id, rnti_t rnti);
/* Get ofn offset */
long flexran_get_rrc_ofn(mid_t mod_id, rnti_t rnti);
/* Get ocp offset */
long flexran_get_rrc_ocp(mid_t mod_id, rnti_t rnti);
/* Get ocn offset */
long flexran_get_rrc_ocn(mid_t mod_id, rnti_t rnti);
/* Get Periodic Event max reported cells */
long flexran_get_rrc_per_event_maxReportCells(mid_t mod_id, rnti_t rnti);
/* Get A3 Event hysteresis */
long flexran_get_rrc_a3_event_hysteresis(mid_t mod_id, rnti_t rnti);
/* Get A3 Event time to trigger */
long flexran_get_rrc_a3_event_timeToTrigger(mid_t mod_id, rnti_t rnti);
/* Get A3 Event max reported cells */
long flexran_get_rrc_a3_event_maxReportCells(mid_t mod_id, rnti_t rnti);
/* Get A3 Event a3 offset */
long flexran_get_rrc_a3_event_a3_offset(mid_t mod_id, rnti_t rnti);
/* Get A3 Event report on leave */
int flexran_get_rrc_a3_event_reportOnLeave(mid_t mod_id, rnti_t rnti);
/* Get number of PLMNs that is broadcasted in SIB1 */
uint8_t flexran_get_rrc_num_plmn_ids(mid_t mod_id);
......
......@@ -477,6 +477,71 @@ typedef struct HANDOVER_INFO_s {
int x2_id; /* X2AP UE ID in the target eNB */
} HANDOVER_INFO;
typedef struct PER_EVENT_s {
long maxReportCells;
} PER_EVENT_t;
typedef struct A1_EVENT_s {
long threshold_RSRP;
long hysteresis;
long timeToTrigger;
long maxReportCells;
} A1_EVENT_t;
typedef struct A2_EVENT_s {
long threshold_RSRP;
long hysteresis;
long timeToTrigger;
long maxReportCells;
} A2_EVENT_t;
typedef struct A3_EVENT_s {
long a3_offset;
int reportOnLeave;
long hysteresis;
long timeToTrigger;
long maxReportCells;
} A3_EVENT_t;
typedef struct A4_EVENT_s {
long threshold_RSRP;
long hysteresis;
long timeToTrigger;
long maxReportCells;
} A4_EVENT_t;
typedef struct A5_EVENT_s {
long threshold_RSRP_1;
long threshold_RSRP_2;
long hysteresis;
long timeToTrigger;
long maxReportCells;
} A5_EVENT_t;
typedef struct EVENTS_s {
PER_EVENT_t *per_event;
A1_EVENT_t *a1_event;
A2_EVENT_t *a2_event;
A3_EVENT_t *a3_event;
A4_EVENT_t *a4_event;
A5_EVENT_t *a5_event;
} EVENTS_t;
typedef struct MEASUREMENT_INFO_s {
//TODO: Extend to multiple meas objects for OFP/OFN offsets
long offsetFreq;
//TODO: extend to multiple cells for OCP/OCN offsets
long cellIndividualOffset;
EVENTS_t *events;
} MEASUREMENT_INFO;
#define RRC_HEADER_SIZE_MAX 64
#define RRC_BUFFER_SIZE_MAX 1024
typedef struct {
......@@ -559,6 +624,7 @@ typedef struct eNB_RRC_UE_s {
SRB_INFO_TABLE_ENTRY Srb2;
LTE_MeasConfig_t *measConfig;
HANDOVER_INFO *handover_info;
MEASUREMENT_INFO *measurement_info;
LTE_MeasResults_t *measResults;
LTE_MobilityControlInfo_t *mobilityInfo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment