Commit 30feed86 authored by wangdong's avatar wangdong

addmod_complete

parent dc6e10f6
...@@ -1035,6 +1035,7 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) { ...@@ -1035,6 +1035,7 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) {
} else { } else {
LOG_I(FLEXRAN_AGENT, "updating DL slice ID %d\n", s->id); LOG_I(FLEXRAN_AGENT, "updating DL slice ID %d\n", s->id);
const int rc = flexran_create_dl_slice(mod_id, s); const int rc = flexran_create_dl_slice(mod_id, s);
//pack
if (rc < 0){ if (rc < 0){
LOG_W(FLEXRAN_AGENT, LOG_W(FLEXRAN_AGENT,
"error while update slice ID %d: flexran_create_dl_slice() -> %d\n ", "error while update slice ID %d: flexran_create_dl_slice() -> %d\n ",
......
...@@ -84,6 +84,7 @@ message flex_slice_scn19 { ...@@ -84,6 +84,7 @@ message flex_slice_scn19 {
optional uint32 tau = 7; optional uint32 tau = 7;
optional uint32 delay = 8; optional uint32 delay = 8;
optional string type = 9; optional string type = 9;
optional uint32 typeid = 10;
} }
......
...@@ -3142,6 +3142,8 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) { ...@@ -3142,6 +3142,8 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
params = malloc(sizeof(scn19_slice_param_t)); params = malloc(sizeof(scn19_slice_param_t));
if (!params) return 0; if (!params) return 0;
((scn19_slice_param_t *)params)->type = s->scn19->type; ((scn19_slice_param_t *)params)->type = s->scn19->type;
if(s->scn19->has_typeid_)
((scn19_slice_param_t *)params)->typeid = s->scn19->typeid_;
if(s->scn19->has_poshigh){ if(s->scn19->has_poshigh){
((scn19_slice_param_t *)params)->posLow = s->scn19->poslow; ((scn19_slice_param_t *)params)->posLow = s->scn19->poslow;
((scn19_slice_param_t *)params)->posHigh = s->scn19->poshigh; ((scn19_slice_param_t *)params)->posHigh = s->scn19->poshigh;
...@@ -3149,7 +3151,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) { ...@@ -3149,7 +3151,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
((scn19_slice_param_t *)params)->posLow = NULL; ((scn19_slice_param_t *)params)->posLow = NULL;
((scn19_slice_param_t *)params)->posHigh = NULL; ((scn19_slice_param_t *)params)->posHigh = NULL;
} }
if(s->scn19->has_kpsrequired){ if(s->scn19->kpsreference){
((scn19_slice_param_t *)params)->kpsRequired = s->scn19->kpsrequired; ((scn19_slice_param_t *)params)->kpsRequired = s->scn19->kpsrequired;
((scn19_slice_param_t *)params)->kpsReference = s->scn19->kpsreference; ((scn19_slice_param_t *)params)->kpsReference = s->scn19->kpsreference;
}else{ }else{
...@@ -3157,6 +3159,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) { ...@@ -3157,6 +3159,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
((scn19_slice_param_t *)params)->kpsReference = NULL; ((scn19_slice_param_t *)params)->kpsReference = NULL;
} }
if(s->scn19->has_tau){ if(s->scn19->has_tau){
((scn19_slice_param_t *)params)->kpsRequired = s->scn19->kpsrequired;
((scn19_slice_param_t *)params)->tmax = s->scn19->tmax; ((scn19_slice_param_t *)params)->tmax = s->scn19->tmax;
((scn19_slice_param_t *)params)->logdelta = s->scn19->logdelta; ((scn19_slice_param_t *)params)->logdelta = s->scn19->logdelta;
((scn19_slice_param_t *)params)->tau = s->scn19->tau; ((scn19_slice_param_t *)params)->tau = s->scn19->tau;
...@@ -3183,6 +3186,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) { ...@@ -3183,6 +3186,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
return -15; return -15;
} }
} }
return dl->addmod_slice(dl->slices, s->id, l, algo, params); return dl->addmod_slice(dl->slices, s->id, l, algo, params);
} }
...@@ -3231,39 +3235,28 @@ void flexran_get_dl_slice(mid_t mod_id, ...@@ -3231,39 +3235,28 @@ void flexran_get_dl_slice(mid_t mod_id,
protocol__flex_slice_scn19__init(slice->scn19); protocol__flex_slice_scn19__init(slice->scn19);
// slice->scn19->has_type = 1; // slice->scn19->has_type = 1;
slice->scn19->type = ((scn19_slice_param_t *)s_->algo_data)->type; slice->scn19->type = ((scn19_slice_param_t *)s_->algo_data)->type;
if(((scn19_slice_param_t *)s_->algo_data)->kpsRequired != NULL){ slice->scn19->typeid_ = ((scn19_slice_param_t *)s_->algo_data)->typeid;
if(strcmp(slice->scn19->type ,"dynamic")==0){
slice->scn19->has_kpsrequired = 1; slice->scn19->has_kpsrequired = 1;
slice->scn19->kpsrequired = ((scn19_slice_param_t *)s_->algo_data)->kpsRequired; slice->scn19->kpsrequired = ((scn19_slice_param_t *)s_->algo_data)->kpsRequired;
}
if(((scn19_slice_param_t *)s_->algo_data)->kpsReference != NULL){
slice->scn19->has_kpsreference = 1; slice->scn19->has_kpsreference = 1;
slice->scn19->kpsrequired = ((scn19_slice_param_t *)s_->algo_data)->kpsRequired; slice->scn19->kpsreference = ((scn19_slice_param_t *)s_->algo_data)->kpsReference;
} }
if(((scn19_slice_param_t *)s_->algo_data)->posLow != NULL){ if(strcmp(slice->scn19->type ,"static")==0){
slice->scn19->has_poslow = 1; slice->scn19->has_poslow = 1;
slice->scn19->poslow = ((scn19_slice_param_t *)s_->algo_data)->posLow; slice->scn19->poslow = ((scn19_slice_param_t *)s_->algo_data)->posLow;
}
if(((scn19_slice_param_t *)s_->algo_data)->posHigh != NULL){
slice->scn19->has_poshigh = 1; slice->scn19->has_poshigh = 1;
slice->scn19->poshigh = ((scn19_slice_param_t *)s_->algo_data)->posHigh; slice->scn19->poshigh = ((scn19_slice_param_t *)s_->algo_data)->posHigh;
} }
if(((scn19_slice_param_t *)s_->algo_data)->posHigh != NULL){ if(strcmp(slice->scn19->type ,"ondemand")==0 ){
slice->scn19->has_poshigh = 1; slice->scn19->has_kpsrequired = 1;
slice->scn19->poshigh = ((scn19_slice_param_t *)s_->algo_data)->posHigh; slice->scn19->kpsrequired = ((scn19_slice_param_t *)s_->algo_data)->kpsRequired;
}
if(((scn19_slice_param_t *)s_->algo_data)->tmax != NULL){
slice->scn19->has_tmax = 1; slice->scn19->has_tmax = 1;
slice->scn19->tmax = ((scn19_slice_param_t *)s_->algo_data)->tmax; slice->scn19->tmax = ((scn19_slice_param_t *)s_->algo_data)->tmax;
}
if(((scn19_slice_param_t *)s_->algo_data)->logdelta != NULL){
slice->scn19->has_logdelta = 1; slice->scn19->has_logdelta = 1;
slice->scn19->logdelta = ((scn19_slice_param_t *)s_->algo_data)->logdelta; slice->scn19->logdelta = ((scn19_slice_param_t *)s_->algo_data)->logdelta;
}
if(((scn19_slice_param_t *)s_->algo_data)->tau != NULL){
slice->scn19->has_tau = 1; slice->scn19->has_tau = 1;
slice->scn19->tau = ((scn19_slice_param_t *)s_->algo_data)->tau; slice->scn19->tau = ((scn19_slice_param_t *)s_->algo_data)->tau;
}
if(((scn19_slice_param_t *)s_->algo_data)->delay != NULL){
slice->scn19->has_delay = 1; slice->scn19->has_delay = 1;
slice->scn19->delay = ((scn19_slice_param_t *)s_->algo_data)->delay; slice->scn19->delay = ((scn19_slice_param_t *)s_->algo_data)->delay;
} }
......
This diff is collapsed.
...@@ -64,6 +64,8 @@ int slicing_get_UE_slice_idx(slice_info_t *si, int UE_id); ...@@ -64,6 +64,8 @@ int slicing_get_UE_slice_idx(slice_info_t *si, int UE_id);
#define SCN19_SLICING 11 #define SCN19_SLICING 11
/* only four static slices for UL, DL resp. (not enough DCIs) */ /* only four static slices for UL, DL resp. (not enough DCIs) */
#define MAX_STATIC_SLICES 4 #define MAX_STATIC_SLICES 4
#define MAX_DYNAMIC_SLICES 10
#define RB_NUMS 25
typedef struct { typedef struct {
uint16_t posLow; uint16_t posLow;
uint16_t posHigh; uint16_t posHigh;
...@@ -79,6 +81,8 @@ typedef struct { ...@@ -79,6 +81,8 @@ typedef struct {
uint16_t tau; uint16_t tau;
uint16_t delay; uint16_t delay;
} ondemand_slice_param_t; } ondemand_slice_param_t;
typedef struct { typedef struct {
uint16_t posLow; uint16_t posLow;
uint16_t posHigh; uint16_t posHigh;
...@@ -88,8 +92,20 @@ typedef struct { ...@@ -88,8 +92,20 @@ typedef struct {
uint16_t logdelta; uint16_t logdelta;
uint16_t tau; uint16_t tau;
uint16_t delay; uint16_t delay;
uint16_t typeid;
char *type; char *type;
uint16_t fexp;
uint16_t rbs;
uint16_t texp;
uint16_t eff;
} scn19_slice_param_t; } scn19_slice_param_t;
typedef struct {
uint16_t fexp;
uint16_t rbs;
uint16_t texp;
} stats_param_t;
pp_impl_param_t static_dl_init(module_id_t mod_id, int CC_id); pp_impl_param_t static_dl_init(module_id_t mod_id, int CC_id);
pp_impl_param_t static_ul_init(module_id_t mod_id, int CC_id); pp_impl_param_t static_ul_init(module_id_t mod_id, int CC_id);
......
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