package protocol;

//import "header.proto";
import "stats_common.proto";

//
// Bodies of statistics report requests
//

message flex_complete_stats_request {
	optional flex_stats_report_freq report_frequency = 1;
	optional uint32 sf = 2;
	optional uint32 cell_report_flags = 3;
	optional uint32 ue_report_flags = 4;
}

message flex_cell_stats_request {
	repeated uint32 cell = 1;
	optional uint32 flags = 2;
}

message flex_ue_stats_request {
	repeated uint32 rnti = 1;
	optional uint32 flags = 2;
}

//
// Bodies of statistics reports
//

// The full statistics report for a specific cell
message flex_cell_stats_report {
	optional uint32 carrier_index = 1;
	optional uint32 flags = 2;
	optional flex_noise_interference_report noise_inter_report = 3;
}

// Statistics report for a specific UE
message flex_ue_stats_report {
	optional uint32 rnti = 1;
	optional uint32 flags = 2;
	repeated uint32 bsr = 3;
	optional uint32 phr = 4;
	repeated flex_rlc_bsr rlc_report = 5;
	optional uint32 pending_mac_ces = 6;
	optional flex_dl_cqi_report dl_cqi_report = 7;
	optional flex_paging_buffer_report pbr = 8;
	optional flex_ul_cqi_report ul_cqi_report = 9;
}

//
// Types of statistics related enums
//


//Types of statistics requested by the controller
enum flex_stats_type {
     FLST_COMPLETE_STATS = 0;
     FLST_CELL_STATS = 1;
     FLST_UE_STATS = 2;
}

// Report frequency for the requested statistics
enum flex_stats_report_freq {
     FLSRF_ONCE = 0;
     FLSRF_PERIODICAL = 1;
     FLSRF_CONTINUOUS = 2;
     FLSRF_OFF = 3;
}

// Flags for cell statistics
enum flex_cell_stats_type {
     FLCST_NOISE_INTERFERENCE = 1;
}

// Flags for UE-related statistics
enum flex_ue_stats_type {
     FLUST_BSR = 1;
     FLUST_PRH = 2;
     FLUST_RLC_BS = 4;
     FLUST_MAC_CE_BS = 8;
     FLUST_DL_CQI = 16;
     FLUST_PBS = 32;
     FLUST_UL_CQI = 64;
     // To be extended with more types of stats
}