Custom Service Models
Custom Service Models
MAC
This SM has data related to the MAC 5G sublayer. Concretely, the following parameters are provided per UE:
uint64_t dl_aggr_tbs; // Downlink (DL) aggregated Transport Block size
uint64_t ul_aggr_tbs; // Uplink (UL) aggregated Transport Block size
uint64_t dl_aggr_bytes_sdus;
uint64_t ul_aggr_bytes_sdus;
uint64_t dl_curr_tbs; // DL current Transport Block size
uint64_t ul_curr_tbs;
uint64_t dl_sched_rb; // DL Scheduled Resource blocks
uint64_t ul_sched_rb;
float pusch_snr; // PUSCH SNR
float pucch_snr; // PUCCH SNR
float dl_bler; // DL bler
float ul_bler; // UL bler
uint32_t dl_harq[5];
uint32_t ul_harq[5];
uint32_t dl_num_harq;
uint32_t ul_num_harq;
uint32_t rnti; // Radio Network Temporary Identifier
uint32_t dl_aggr_prb; // DL Aggregated PRBs
uint32_t ul_aggr_prb;
uint32_t dl_aggr_sdus; // DL aggregated SDUs
uint32_t ul_aggr_sdus;
uint32_t dl_aggr_retx_prb; // DL aggregated retransmitted PRB
uint32_t ul_aggr_retx_prb;
uint32_t bsr; // Buffer Status Report
uint16_t frame; // Last frame number
uint16_t slot; // Last slot number
uint8_t wb_cqi; // Wideband Channel Quality Indicator
uint8_t dl_mcs1; // MCS1 PT-RS
uint8_t ul_mcs1;
uint8_t dl_mcs2;
uint8_t ul_mcs2;
int8_t phr; // Power Head Room
RLC
This SM has data related to the RLC 5G sublayer. Concretely, the following parameters are provided per UE:
/* PDU stats */
/* TX */
uint32_t txpdu_pkts; /* aggregated number of transmitted RLC PDUs */
uint32_t txpdu_bytes; /* aggregated amount of transmitted bytes in RLC PDUs */
uint32_t txpdu_wt_ms; /* TODO: aggregated head-of-line tx packet waiting time to be transmitted (i.e. send to the MAC layer) */
uint32_t txpdu_dd_pkts; /* aggregated number of dropped or discarded tx packets by RLC */
uint32_t txpdu_dd_bytes; /* aggregated amount of bytes dropped or discarded tx packets by RLC */
uint32_t txpdu_retx_pkts; /* aggregated number of tx pdus/pkts to be re-transmitted (only applicable to RLC AM) */
uint32_t txpdu_retx_bytes; /* aggregated amount of bytes to be re-transmitted (only applicable to RLC AM) */
uint32_t txpdu_segmented; /* aggregated number of segmentations */
uint32_t txpdu_status_pkts; /* aggregated number of tx status pdus/pkts (only applicable to RLC AM) */
uint32_t txpdu_status_bytes; /* aggregated amount of tx status bytes (only applicable to RLC AM) */
uint32_t txbuf_occ_bytes; /* (IMPLEMENTED) transmitting bytes currently in buffer */
uint32_t txbuf_occ_pkts; /* TODO: current tx buffer occupancy in terms of number of packets (average: NOT IMPLEMENTED) */
/* txbuf_wd_ms: the time window for which the txbuf occupancy value is obtained - NOT IMPLEMENTED */
/* RX */
uint32_t rxpdu_pkts; /* aggregated number of received RLC PDUs */
uint32_t rxpdu_bytes; /* amount of bytes received by the RLC */
uint32_t rxpdu_dup_pkts; /* aggregated number of duplicate packets */
uint32_t rxpdu_dup_bytes; /* aggregated amount of duplicated bytes */
uint32_t rxpdu_dd_pkts; /* aggregated number of rx packets dropped or discarded by RLC */
uint32_t rxpdu_dd_bytes; /* aggregated amount of rx bytes dropped or discarded by RLC */
uint32_t rxpdu_ow_pkts; /* aggregated number of out of window received RLC pdu */
uint32_t rxpdu_ow_bytes; /* aggregated number of out of window bytes received RLC pdu */
uint32_t rxpdu_status_pkts; /* aggregated number of rx status pdus/pkts (only applicable to RLC AM) */
uint32_t rxpdu_status_bytes; /* aggregated amount of rx status bytes (only applicable to RLC AM) */
/* rxpdu_rotout_ms: flag indicating rx reordering timeout in ms - NOT IMPLEMENTED */
/* rxpdu_potout_ms: flag indicating the poll retransmit time out in ms - NOT IMPLEMENTED */
/* rxpdu_sptout_ms: flag indicating status prohibit timeout in ms - NOT IMPLEMENTED */
uint32_t rxbuf_occ_bytes; /* (IMPLEMENTED) received bytes currently in buffer */
uint32_t rxbuf_occ_pkts; /* TODO: current rx buffer occupancy in terms of number of packets (average: NOT IMPLEMENTED) */
/* SDU stats */
/* TX */
uint32_t txsdu_pkts; /* number of SDUs delivered */
uint64_t txsdu_bytes; /* (UPDATED) number of SDUs bytes successfully transmitted so far (counter) */
/* Average time for an SDU to be passed to MAC:
* Actually measures the time it takes for THE FULL SDU to be passed to MAC FOR THE FIRST TIME.
* Since the MAC schedules in advance, it does not measure the time of
* transmission over the air, just the time to reach the MAC layer.
* => to control it, 'txsdu_hol_waittime' that measures the current HOL-delay is added.
*/
double txsdu_avg_time_to_tx; /* (100ms-windowed) per-packet sojourn (SDU to PDU) in microseconds */
uint32_t txsdu_wt_us; /* HOL delay of the current radio bearer, in microseconds */
/* RX */
uint32_t rxsdu_pkts; /* number of SDUs received */
uint64_t rxsdu_bytes; /* (UPDATED) number of SDUs bytes arrived so far (counter) */
uint32_t rxsdu_dd_pkts; /* number of dropped or discarded SDUs */
uint32_t rxsdu_dd_bytes; /* number of bytes of SDUs dropped or discarded */
uint32_t rnti;
uint8_t mode; /* 0: RLC AM, 1: RLC UM, 2: RLC TM */
uint8_t rbid; // Radio Bearer ID
PDCP
This SM has data related to the PDCP 5G sublayer. Concretely, the following parameters are provided per UE:
uint32_t txpdu_pkts; /* aggregated number of tx packets */
uint32_t txpdu_bytes; /* aggregated bytes of tx packets */
uint32_t txpdu_sn; /* current sequence number of last tx packet (or TX_NEXT) */
uint32_t rxpdu_pkts; /* aggregated number of rx packets */
uint32_t rxpdu_bytes; /* aggregated bytes of rx packets */
uint32_t rxpdu_sn; /* current sequence number of last rx packet (or RX_NEXT) */
uint32_t rxpdu_oo_pkts; /* aggregated number of out-of-order rx pkts (or RX_REORD) */
uint32_t rxpdu_oo_bytes; /* aggregated amount of out-of-order rx bytes */
uint32_t rxpdu_dd_pkts; /* aggregated number of duplicated discarded packets */
uint32_t rxpdu_dd_bytes; /* aggregated amount of discarded packets' bytes */
uint32_t rxpdu_ro_count; /* this state variable indicates the COUNT value */
uint32_t txsdu_pkts; /* number of SDUs delivered */
uint32_t txsdu_bytes; /* number of bytes of SDUs delivered */
uint32_t rxsdu_pkts; /* number of SDUs received */
uint32_t rxsdu_bytes; /* number of bytes of SDUs received */
uint32_t rnti;
uint8_t mode; /* 0: PDCP AM, 1: PDCP UM, 2: PDCP TM */
uint8_t rbid;
GTP
This SM has data related to the GTP interface in 5G. Concretely, the following parameters are provided per UE:
// ngu tunnel stats
uint32_t rnti; // user id
uint32_t teidgnb; // tunnel id from gnb
uint32_t teidupf; // tunnel id from upf
uint8_t qfi; // QoS flow indicator
SLICE
This SM has data related to Slice SM. Concretely, the following parameters are provided per UE:
ToDO: Chieh. Please, explain the parameters
typedef enum{
SLICE_ALG_SM_V0_NONE = 0,
SLICE_ALG_SM_V0_STATIC = 1,
SLICE_ALG_SM_V0_NVS = 2,
SLICE_ALG_SM_V0_SCN19 = 3,
SLICE_ALG_SM_V0_EDF = 4,
SLICE_ALG_SM_V0_EEDF = 5,
SLICE_ALG_SM_V0_PR = 6,
SLICE_ALG_SM_V0_END
} slice_algorithm_e;
typedef struct{
uint32_t pos_low;
uint32_t pos_high;
} static_slice_t ;
typedef enum {
SLICE_SM_NVS_V0_RATE,
SLICE_SM_NVS_V0_CAPACITY,
SLICE_SM_NVS_V0_END
} nvs_slice_conf_e;
typedef union {
uint8_t mbps_required_byte[4];
float mbps_required;
} nvs_rate_req_u;
typedef union {
uint8_t mbps_reference_byte[4];
float mbps_reference;
} nvs_rate_ref_u;
typedef struct{
nvs_rate_req_u u1;
nvs_rate_ref_u u2;
} nvs_rate_t ;
typedef union{
uint8_t pct_reserved_byte[4];
float pct_reserved;
} nvs_capacity_u;
typedef struct{
nvs_capacity_u u;
} nvs_capacity_t;
typedef union{
nvs_rate_t rate;
nvs_capacity_t capacity;
} nvs_slice_u;
typedef struct{
nvs_slice_conf_e conf;
nvs_slice_u u;
} nvs_slice_t ;
typedef enum{
SLICE_SCN19_SM_V0_DYNAMIC,
SLICE_SCN19_SM_V0_FIXED,
SLICE_SCN19_SM_V0_ON_DEMAND,
SLICE_SCN19_SM_V0_END,
} scn19_slice_conf_e ;
typedef struct{
float pct_reserved;
float log_delta;
uint32_t tau;
} scn19_on_demand_t ;
typedef union{
nvs_rate_t dynamic;
static_slice_t fixed;
scn19_on_demand_t on_demand;
} scn19_slice_u;
typedef struct{
scn19_slice_conf_e conf;
scn19_slice_u u;
} scn19_slice_t;
typedef struct{
int32_t deadline;
int32_t guaranteed_prbs;
int16_t max_replenish;
int8_t len_over;
int32_t* over;
} edf_slice_t ;
typedef enum {
SLICE_SM_EEDF_V0_STATIC,
SLICE_SM_EEDF_V0_RATE,
SLICE_SM_EEDF_V0_END
} eedf_slice_conf_e;
typedef enum {
EEDF_STATIC_HARD,
EEDF_STATIC_SOFT,
END_EEDF_STATIC
} eedf_static_type_t;
typedef struct{
int16_t reserved_prbs;
eedf_static_type_t reserved_type;
} eedf_static_t;
typedef struct{
int32_t deadline;
int32_t guaranteed_rate;
} eedf_rate_t;
typedef union{
eedf_static_t fixed;
eedf_rate_t rate;
} eedf_slice2_t;
typedef struct{
eedf_slice_conf_e conf;
eedf_slice2_t u;
} eedf_slice_t ;
typedef struct{
uint8_t max_ratio;
uint8_t min_ratio;
uint8_t dedicated_ratio;
} pr_slice_t;
typedef union{
static_slice_t sta;
nvs_slice_t nvs;
scn19_slice_t scn19;
edf_slice_t edf;
eedf_slice_t eedf;
pr_slice_t pr;
} slice_params_u;
typedef struct{
slice_algorithm_e type;
slice_params_u u;
} slice_params_t;
typedef struct{
uint32_t id;
uint32_t len_label;
char* label;
uint32_t len_sched;
char* sched;
slice_params_t params;
} fr_slice_t ;
typedef struct{
uint32_t len_slices;
fr_slice_t* slices;
uint32_t len_sched_name;
char* sched_name;
} ul_dl_slice_conf_t ;
typedef struct{
ul_dl_slice_conf_t dl;
ul_dl_slice_conf_t ul;
} slice_conf_t ;
typedef struct{
uint32_t dl_id;
uint32_t ul_id;
uint16_t rnti;
} ue_slice_assoc_t;
typedef struct{
uint32_t len_ue_slice;
ue_slice_assoc_t * ues;
} ue_slice_conf_t;
typedef struct {
slice_conf_t slice_conf;
ue_slice_conf_t ue_slice_conf;
int64_t tstamp;
} slice_ind_msg_t;
ISAC
This SM has data related to ISAC SM. Concretely, the following parameters are provided:
typedef struct {
int64_t tstamp;
uint64_t len_srs_iq; // amount of I/Q samples
// Flexible Array Member
int16_t srs_iq[]; // Estimated SRS IQ samples
} isac_ind_msg_t;
TC
This SM is experimental for the moment.