f1 du: get list of sst/sd from configuration file
may not be the best place to get data from conf file, to be refined later if needed
This commit is contained in:
committed by
Raymond Knopp
parent
0cacf29dbb
commit
d4356efc70
@@ -37,6 +37,8 @@
|
||||
#include "f1ap_du_interface_management.h"
|
||||
#include "assertions.h"
|
||||
|
||||
#include "GNB_APP/gnb_paramdef.h"
|
||||
|
||||
int to_NRNRB(int nrb) {
|
||||
for (int i=0; i<sizeofArray(nrb_lut); i++)
|
||||
if (nrb_lut[i] == nrb)
|
||||
@@ -180,12 +182,30 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
|
||||
served_plmns_itemExtIEs->extensionValue.present = F1AP_ServedPLMNs_ItemExtIEs__extensionValue_PR_SliceSupportList;
|
||||
F1AP_SliceSupportList_t *slice_support_list = &served_plmns_itemExtIEs->extensionValue.choice.SliceSupportList;
|
||||
|
||||
asn1cSequenceAdd(slice_support_list->list, F1AP_SliceSupportItem_t, SliceSupport_item);
|
||||
INT8_TO_OCTET_STRING(1,&SliceSupport_item->sNSSAI.sST);
|
||||
asn1cCalloc(SliceSupport_item->sNSSAI.sD, tmp);
|
||||
INT24_TO_OCTET_STRING(10203,tmp);
|
||||
//INT24_TO_OCTET_STRING(1,tmp);
|
||||
|
||||
/* get list of sst/sd from configuration file */
|
||||
paramdef_t SNSSAIParams[] = GNBSNSSAIPARAMS_DESC;
|
||||
paramlist_def_t SNSSAIParamList = {GNB_CONFIG_STRING_SNSSAI_LIST, NULL, 0};
|
||||
char sstr[100];
|
||||
/* TODO: be sure that %d in the line below is at the right place */
|
||||
sprintf(sstr, "%s.[%d].%s.[0]", GNB_CONFIG_STRING_GNB_LIST, i, GNB_CONFIG_STRING_PLMN_LIST);
|
||||
config_getlist(&SNSSAIParamList, SNSSAIParams, sizeof(SNSSAIParams)/sizeof(paramdef_t), sstr);
|
||||
AssertFatal(SNSSAIParamList.numelt > 0, "no slice configuration found (snssaiList in the configuration file)\n");
|
||||
AssertFatal(SNSSAIParamList.numelt <= 1024, "maximum size for slice support list is 1024, see F1AP 38.473 9.3.1.37\n");
|
||||
for (int s = 0; s < SNSSAIParamList.numelt; s++) {
|
||||
uint32_t sst;
|
||||
uint32_t sd;
|
||||
bool has_sd;
|
||||
sst = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
|
||||
has_sd = *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr != 0xffffff;
|
||||
asn1cSequenceAdd(slice_support_list->list, F1AP_SliceSupportItem_t, slice);
|
||||
INT8_TO_OCTET_STRING(sst, &slice->sNSSAI.sST);
|
||||
if (has_sd) {
|
||||
sd = *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr;
|
||||
asn1cCalloc(slice->sNSSAI.sD, tmp);
|
||||
INT24_TO_OCTET_STRING(sd, tmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (f1ap_req(false, instance)->fdd_flag) { // FDD
|
||||
nR_Mode_Info->present = F1AP_NR_Mode_Info_PR_fDD;
|
||||
asn1cCalloc(nR_Mode_Info->choice.fDD, fDD_Info);
|
||||
|
||||
Reference in New Issue
Block a user