Merge remote-tracking branch 'origin/nrppa_ngap_integration' into integration_2026_w10 (!3884)

Integrate NRPPA and NGAP messages required for positioning

This MR integrates NRPPA and NGAP messages required for positioning.
The following NGAP messages are integrated (3GPP 38.413 Version 16.0.0):

NGAP UPLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP UPLINK NON UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK UE ASSOCIATED NRPPA TRANSPORT
NGAP DOWNLINK NON UE ASSOCIATED NRPPA TRANSPORT

The following NRPPA messages are integrated (3GPP 38.455 Version 16.7.1):

TRP Information Request
TRP Information Response
Positioning Information Request
Positioning Information Response
Positioning activation request
Positioning Activation Response
Measurement Request
Measurement Response

This MR tests these messages via a standalone tester nr-cu-nrppa-test that
connects to the AMF to perform NGAP enc/dec and NRPPA enc/dec

Core Network:
To pull the docker images:

docker pull oaisoftwarealliance/ims:latest
docker pull oaisoftwarealliance/oai-amf:develop
docker pull oaisoftwarealliance/oai-nrf:develop
docker pull oaisoftwarealliance/oai-smf:develop
docker pull oaisoftwarealliance/oai-udr:develop
docker pull oaisoftwarealliance/oai-upf:develop
docker pull oaisoftwarealliance/oai-udm:develop
docker pull oaisoftwarealliance/oai-ausf:develop
docker pull oaisoftwarealliance/oai-lmf:develop

openairinterface5g$ cd doc/tutorial_resources/oai-cn5g
To deploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml up -d

To undeploy:
openairinterface5g/doc/tutorial_resources/oai-cn5g$ docker compose -f docker-compose-positioning.yaml down -t 0

RAN:
To compile:
openairinterface5g$ mkdir build
openairinterface5g$ cd build
openairinterface5g/build$ cmake .. -GNinja
openairinterface5g/build$ ninja nr-cu-nrppa-test

To run:
openairinterface5g/build$ LD_LIBRARY_PATH=. ./tests/nr-cu-nrppa/nr-cu-nrppa-test -O ../tests/nr-cu-nrppa/nr-nrppa-test.conf

To initiate positioning procedure:
openairinterface5g$ cd doc/tutorial_resources/positioning/
openairinterface5g/doc/tutorial_resources/positioning$ curl --http2-prior-knowledge -H "Content-Type: application/json" -d "@InputData.json" -X POST http://192.168.70.141:8080/nlmf-loc/v1/determine-location
This commit is contained in:
Jaroslava Fiedlerova
2026-03-06 09:59:34 +01:00
52 changed files with 6530 additions and 174 deletions
+15
View File
@@ -88,3 +88,18 @@ MESSAGE_DEF(NGAP_HANDOVER_CANCEL_ACK, MESSAGE_PRIORITY_MED, ngap_handover_cancel
/* NGAP <-> RRC messages (can be initiated either by MME or gNB) */
MESSAGE_DEF(NGAP_UE_CONTEXT_RELEASE_REQ , MESSAGE_PRIORITY_MED, ngap_ue_release_req_t , ngap_ue_release_req)
/* NGAP -> NRPPA messages*/
MESSAGE_DEF(NGAP_DOWNLINKUEASSOCIATEDNRPPA,
MESSAGE_PRIORITY_MED,
ngap_downlink_ue_associated_nrppa_t,
ngap_downlink_ue_associated_nrppa)
MESSAGE_DEF(NGAP_DOWNLINKNONUEASSOCIATEDNRPPA,
MESSAGE_PRIORITY_MED,
ngap_downlink_non_ue_associated_nrppa_t,
ngap_downlink_non_ue_associated_nrppa)
MESSAGE_DEF(NGAP_UPLINKUEASSOCIATEDNRPPA, MESSAGE_PRIORITY_MED, ngap_uplink_ue_associated_nrppa_t, ngap_uplink_ue_associated_nrppa)
MESSAGE_DEF(NGAP_UPLINKNONUEASSOCIATEDNRPPA,
MESSAGE_PRIORITY_MED,
ngap_uplink_non_ue_associated_nrppa_t,
ngap_uplink_non_ue_associated_nrppa)
+45
View File
@@ -79,6 +79,11 @@
#define NGAP_UL_RAN_STATUS_TRANSFER(mSGpTR) (mSGpTR)->ittiMsg.ngap_ul_ran_status_transfer
#define NGAP_DL_RAN_STATUS_TRANSFER(mSGpTR) (mSGpTR)->ittiMsg.ngap_dl_ran_status_transfer
#define NGAP_DOWNLINKUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_ue_associated_nrppa
#define NGAP_DOWNLINKNONUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_downlink_non_ue_associated_nrppa
#define NGAP_UPLINKUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_uplink_ue_associated_nrppa
#define NGAP_UPLINKNONUEASSOCIATEDNRPPA(mSGpTR) (mSGpTR)->ittiMsg.ngap_uplink_non_ue_associated_nrppa
//-------------------------------------------------------------------------------------------//
/* Length of the transport layer address string
@@ -1007,4 +1012,44 @@ typedef struct {
ngap_ran_status_container_t ran_status;
} ngap_ran_status_transfer_t;
// Uplink UE Associated NRPPA Transport message (9.2.9.2 3GPP 38.413 v16.0.0)
typedef struct {
// AMF UE NGAP ID (Mandatory)
uint64_t amf_ue_ngap_id;
// RAN UE NGAP ID (Mandatory)
uint32_t gNB_ue_ngap_id;
// Routing ID (Mandatory)
byte_array_t routing_id;
// NRPPa pdu (Mandatory)
byte_array_t nrppa_pdu;
} ngap_uplink_ue_associated_nrppa_t;
// Uplink NON UE Associated NRPPA Transport message (9.2.9.4 3GPP 38.413 v16.0.0)
typedef struct {
// Routing ID (Mandatory)
byte_array_t routing_id;
// NRPPa pdu (Mandatory)
byte_array_t nrppa_pdu;
} ngap_uplink_non_ue_associated_nrppa_t;
// Downlink UE Associated NRPPA Transport message (9.2.9.1 3GPP 38.413 v16.0.0)
typedef struct {
// AMF UE NGAP ID (Mandatory)
uint64_t amf_ue_ngap_id;
// RAN UE NGAP ID (Mandatory)
uint32_t gNB_ue_ngap_id;
// Routing ID (Mandatory)
byte_array_t routing_id;
// NRPPa pdu (Mandatory)
byte_array_t nrppa_pdu;
} ngap_downlink_ue_associated_nrppa_t;
// Downlink NON UE Associated NRPPA Transport message (9.2.9.3 3GPP 38.413 v16.0.0)
typedef struct {
// Routing ID (Mandatory)
byte_array_t routing_id;
// NRPPa pdu (Mandatory)
byte_array_t nrppa_pdu;
} ngap_downlink_non_ue_associated_nrppa_t;
#endif /* NGAP_MESSAGES_TYPES_H_ */
+44
View File
@@ -0,0 +1,44 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "openair2/COMMON/nrppa_messages_types.h"
// LMF -> CU
MESSAGE_DEF(NRPPA_TRP_INFORMATION_REQ, MESSAGE_PRIORITY_MED, nrppa_trp_information_req_t, nrppa_trp_information_req)
MESSAGE_DEF(NRPPA_TRP_INFORMATION_RESP, MESSAGE_PRIORITY_MED, nrppa_trp_information_resp_t, nrppa_trp_information_resp)
MESSAGE_DEF(NRPPA_POSITIONING_INFORMATION_REQ,
MESSAGE_PRIORITY_MED,
nrppa_positioning_information_req_t,
nrppa_positioning_information_req)
MESSAGE_DEF(NRPPA_POSITIONING_INFORMATION_RESP,
MESSAGE_PRIORITY_MED,
nrppa_positioning_information_resp_t,
nrppa_positioning_information_resp)
MESSAGE_DEF(NRPPA_POSITIONING_ACTIVATION_REQ,
MESSAGE_PRIORITY_MED,
nrppa_positioning_activation_req_t,
nrppa_positioning_activation_req)
MESSAGE_DEF(NRPPA_POSITIONING_ACTIVATION_RESP,
MESSAGE_PRIORITY_MED,
nrppa_positioning_activation_resp_t,
nrppa_positioning_activation_resp)
MESSAGE_DEF(NRPPA_MEASUREMENT_REQ, MESSAGE_PRIORITY_MED, nrppa_measurement_req_t, nrppa_measurement_req)
MESSAGE_DEF(NRPPA_MEASUREMENT_RESP, MESSAGE_PRIORITY_MED, nrppa_measurement_resp_t, nrppa_measurement_resp)
+824
View File
@@ -0,0 +1,824 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef NRPPA_MESSAGES_TYPES_H_
#define NRPPA_MESSAGES_TYPES_H_
// Defines to access message fields.
#define NRPPA_TRP_INFORMATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrppa_trp_information_req
#define NRPPA_TRP_INFORMATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.nrppa_trp_information_resp
#define NRPPA_POSITIONING_INFORMATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrppa_positioning_information_req
#define NRPPA_POSITIONING_INFORMATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.nrppa_positioning_information_resp
#define NRPPA_POSITIONING_ACTIVATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrppa_positioning_activation_req
#define NRPPA_POSITIONING_ACTIVATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.nrppa_positioning_activation_resp
#define NRPPA_MEASUREMENT_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrppa_measurement_req
#define NRPPA_MEASUREMENT_RESP(mSGpTR) (mSGpTR)->ittiMsg.nrppa_measurement_resp
/* Structure of Positioning related NRPPA messages */
/* IE structures for Positioning related messages as per TS 38.455 V16.7.1*/
typedef enum nrppa_trp_information_type_item_e {
NRPPA_TRP_INFORMATION_TYPE_ITEM_NR_PCI,
NRPPA_TRP_INFORMATION_TYPE_ITEM_NG_RAN_CGI,
NRPPA_TRP_INFORMATION_TYPE_ITEM_NR_ARFCN,
NRPPA_TRP_INFORMATION_TYPE_ITEM_PRS_CONFIG,
NRPPA_TRP_INFORMATION_TYPE_ITEM_SSB_CONFIG,
NRPPA_TRP_INFORMATION_TYPE_ITEM_SFN_INIT_TIME,
NRPPA_TRP_INFORMATION_TYPE_ITEM_SPATIAL_DIRECTION_INFO,
NRPPA_TRP_INFORMATION_TYPE_ITEM_GEO_COORDINATES
} nrppa_trp_information_type_item_pr;
typedef struct nrppa_trp_information_type_list_s {
nrppa_trp_information_type_item_pr *trp_information_type_item;
uint8_t trp_information_type_list_length;
} nrppa_trp_information_type_list_t;
typedef struct nrppa_trp_list_item_s {
uint32_t trp_id;
} nrppa_trp_list_item_t;
typedef struct nrppa_trp_list_s {
nrppa_trp_list_item_t *trp_list_item;
uint32_t trp_list_length;
} nrppa_trp_list_t;
typedef struct nrppa_access_point_position_s {
long latitude_sign;
long latitude;
long longitude;
long direction_of_altitude;
long altitude;
long uncertainty_semi_major;
long uncertainty_semi_minor;
long orientation_of_major_axis;
long uncertainty_altitude;
long confidence;
} nrppa_access_point_position_t;
typedef struct nrppa_ngran_high_accuracy_access_point_position_s {
long latitude;
long longitude;
long altitude;
long uncertainty_semi_major;
long uncertainty_semi_minor;
long orientation_of_major_axis;
long horizontal_confidence;
long uncertainty_altitude;
long vertical_confidence;
} nrppa_ngran_high_accuracy_access_point_position_t;
typedef union nrppa_trp_position_direct_accuracy_c {
nrppa_access_point_position_t trp_position;
nrppa_ngran_high_accuracy_access_point_position_t trp_HAposition;
} nrppa_trp_position_direct_accuracy_u;
typedef enum nrppa_trp_position_direct_accuracy_e {
NRPPA_TRP_POSITION_DIRECT_ACCURACY_PR_NOTHING,
NRPPA_TRP_POSITION_DIRECT_ACCURACY_PR_TRPPOSITION,
NRPPA_TRP_POSITION_DIRECT_ACCURACY_PR_TRPHAPOSITION
} nrppa_trp_position_direct_accuracy_pr;
typedef struct nrppa_trp_position_direct_accuracy_s {
nrppa_trp_position_direct_accuracy_pr present;
nrppa_trp_position_direct_accuracy_u choice;
} nrppa_trp_position_direct_accuracy_t;
typedef struct nrppa_trp_position_direct_s {
nrppa_trp_position_direct_accuracy_t accuracy;
} nrppa_trp_position_direct_t;
typedef enum nrppa_reference_point_e {
NRPPA_REFERENCE_POINT_PR_NOTHING,
NRPPA_REFERENCE_POINT_PR_COORDINATEID,
NRPPA_REFERENCE_POINT_PR_REFERENCEPOINTCOORDINATE,
NRPPA_REFERENCE_POINT_PR_REFERENCEPOINTCOORDINATEHA
} nrppa_reference_point_pr;
typedef union nrppa_reference_point_c {
long coordinate_id;
nrppa_access_point_position_t reference_point_coordinate;
nrppa_ngran_high_accuracy_access_point_position_t reference_point_coordinateHA;
} nrppa_reference_point_u;
typedef struct nrppa_reference_point_s {
nrppa_reference_point_pr present;
nrppa_reference_point_u choice;
} nrppa_reference_point_t;
typedef struct nrppa_location_uncertainty_s {
long horizontal_uncertainty;
long horizontal_confidence;
long vertical_uncertainty;
long vertical_confidence;
} nrppa_location_uncertainty_t;
typedef struct nrppa_relative_geodetic_location_s {
long milli_arc_second_units;
long height_units;
long delta_latitude;
long delta_longitude;
long delta_height;
nrppa_location_uncertainty_t location_uncertainty;
} nrppa_relative_geodetic_location_t;
typedef struct nrppa_relative_cartesian_location_s {
long xyz_unit;
long xvalue;
long yvalue;
long zvalue;
nrppa_location_uncertainty_t location_uncertainty;
} nrppa_relative_cartesian_location_t;
typedef union nrppa_trp_reference_point_type_c {
nrppa_relative_geodetic_location_t trp_position_relative_geodetic;
nrppa_relative_cartesian_location_t trp_position_relative_cartesian;
} nrppa_trp_reference_point_type_u;
typedef enum nrppa_trp_reference_point_type_e {
NRPPA_TRP_REFERENCE_POINT_TYPE_PR_NOTHING,
NRPPA_TRP_REFERENCE_POINT_TYPE_PR_TRPPOSITION_RELATIVE_GEODETIC,
NRPPA_TRP_REFERENCE_POINT_TYPE_PR_TRPPOSITION_RELATIVE_CARTESIAN
} nrppa_trp_reference_point_type_pr;
typedef struct nrppa_trp_reference_point_type_t {
nrppa_trp_reference_point_type_pr present;
nrppa_trp_reference_point_type_u choice;
} nrppa_trp_reference_point_type_t;
typedef struct nrppa_trp_position_referenced_t {
nrppa_reference_point_t reference_point;
nrppa_trp_reference_point_type_t reference_point_type;
} nrppa_trp_position_referenced_t;
typedef union nrppa_trp_position_definition_type_c {
nrppa_trp_position_direct_t direct;
nrppa_trp_position_referenced_t referenced;
} nrppa_trp_position_definition_type_u;
typedef enum nrppa_trp_position_definition_type_e {
NRPPA_TRP_POSITION_DEFINITION_TYPE_PR_NOTHING,
NRPPA_TRP_POSITION_DEFINITION_TYPE_PR_DIRECT,
NRPPA_TRP_POSITION_DEFINITION_TYPE_PR_REFERENCED
} nrppa_trp_position_definition_type_pr;
typedef struct nrppa_trp_position_definition_type_s {
nrppa_trp_position_definition_type_u choice;
nrppa_trp_position_definition_type_pr present;
} nrppa_trp_position_definition_type_t;
typedef struct nrppa_geographical_coordinates_s {
nrppa_trp_position_definition_type_t trp_position_definition_type;
} nrppa_geographical_coordinates_t;
typedef struct nrppa_ng_ran_cgi_s {
plmn_id_t plmn;
uint64_t nr_cellid;
} nrppa_ng_ran_cgi_t;
typedef union nrppa_trp_information_type_response_item_c {
uint16_t pci_nr;
nrppa_ng_ran_cgi_t ng_ran_cgi;
uint32_t nr_arfcn;
nrppa_geographical_coordinates_t geographical_coordinates;
} nrppa_trp_information_type_response_item_u;
typedef enum nrppa_trp_information_type_response_item_e {
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_NOTHING,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_PCI_NR,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_NG_RAN_CGI,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_NRARFCN,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_PRSCONFIGURATION,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_SSBINFORMATION,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_SFNINITIALISATIONTIME,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_SPATIALDIRECTIONINFORMATION,
NRPPA_TRP_INFORMATION_TYPE_RESPONSE_ITEM_PR_GEOGRAPHICALCOORDINATES
} nrppa_trp_information_type_response_item_pr;
typedef struct nrppa_trp_information_type_response_item_s {
nrppa_trp_information_type_response_item_pr present;
nrppa_trp_information_type_response_item_u choice;
} nrppa_trp_information_type_response_item_t;
typedef struct nrppa_trp_information_type_response_list_s {
nrppa_trp_information_type_response_item_t *trp_information_type_response_item;
uint8_t trp_information_type_response_item_length;
} nrppa_trp_information_type_response_list_t;
typedef struct nrppa_trp_information_s {
uint32_t trp_id;
nrppa_trp_information_type_response_list_t trp_information_type_response_list;
} nrppa_trp_information_t;
typedef enum nrppa_subcarrier_spacing_e {
NRPPA_SUBCARRIER_SPACING_15KHZ,
NRPPA_SUBCARRIER_SPACING_30KHZ,
NRPPA_SUBCARRIER_SPACING_60KHZ,
NRPPA_SUBCARRIER_SPACING_120KHZ
} nrppa_subcarrier_spacing_pr;
typedef struct nrppa_scs_specific_carrier_s {
uint32_t offset_to_carrier;
nrppa_subcarrier_spacing_pr subcarrier_spacing;
uint16_t carrier_bandwidth;
} nrppa_scs_specific_carrier_t;
typedef struct nrppa_uplink_channel_bw_per_scs_list_s {
nrppa_scs_specific_carrier_t *scs_specific_carrier;
uint32_t scs_specific_carrier_list_length;
} nrppa_uplink_channel_bw_per_scs_list_t;
typedef enum nrppa_transmission_comb_e {
NRPPA_TRANSMISSION_COMB_PR_NOTHING,
NRPPA_TRANSMISSION_COMB_PR_N2,
NRPPA_TRANSMISSION_COMB_PR_N4
} nrppa_transmission_comb_pr;
typedef struct nrppa_transmission_comb_n2_s {
uint8_t comb_offset_n2;
uint8_t cyclic_shift_n2;
} nrppa_transmission_comb_n2_t, nrppa_transmission_comb_pos_n2_t;
typedef struct nrppa_transmission_comb_n4_s {
uint8_t comb_offset_n4;
uint8_t cyclic_shift_n4;
} nrppa_transmission_comb_n4_t, nrppa_transmission_comb_pos_n4_t;
typedef union nrppa_transmission_comb_c {
nrppa_transmission_comb_n2_t n2;
nrppa_transmission_comb_n4_t n4;
} nrppa_transmission_comb_u;
typedef struct nrppa_transmission_comb_s {
nrppa_transmission_comb_pr present;
nrppa_transmission_comb_u choice;
} nrppa_transmission_comb_t;
typedef enum nrppa_srs_resource_type_periodicity_e {
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT1 = 0,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT2,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT4,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT5,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT8,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT10,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT16,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT20,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT32,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT40,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT64,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT80,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT160,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT320,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT640,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT1280,
NRPPA_SRS_RESOURCE_TYPE_PERIODICITY_SLOT2560
} nrppa_srs_resource_type_periodicity_pr;
typedef struct nrppa_resource_type_periodic_s {
nrppa_srs_resource_type_periodicity_pr periodicity;
uint16_t offset;
} nrppa_resource_type_periodic_t, nrppa_resource_type_semi_persistent_t;
typedef union nrppa_resource_type_c {
nrppa_resource_type_periodic_t periodic;
nrppa_resource_type_semi_persistent_t semi_persistent;
bool aperiodic;
} nrppa_resource_type_u;
typedef enum nrppa_resource_type_e {
NRPPA_RESOURCE_TYPE_PR_NOTHING,
NRPPA_RESOURCE_TYPE_PR_PERIODIC,
NRPPA_RESOURCE_TYPE_PR_SEMI_PERSISTENT,
NRPPA_RESOURCE_TYPE_PR_APERIODIC
} nrppa_resource_type_pr;
typedef struct nrppa_resource_type_s {
nrppa_resource_type_pr present;
nrppa_resource_type_u choice;
} nrppa_resource_type_t;
typedef struct nrppa_transmission_comb_n8_s {
uint8_t comb_offset_n8;
uint8_t cyclic_shift_n8;
} nrppa_transmission_comb_pos_n8_t;
typedef union nrppa_transmission_comb_pos_c {
nrppa_transmission_comb_pos_n2_t n2;
nrppa_transmission_comb_pos_n4_t n4;
nrppa_transmission_comb_pos_n8_t n8;
} nrppa_transmission_comb_pos_u;
typedef enum nrppa_transmission_comb_pos_e {
NRPPA_TRANSMISSION_COMB_POS_PR_NOTHING,
NRPPA_TRANSMISSION_COMB_POS_PR_N2,
NRPPA_TRANSMISSION_COMB_POS_PR_N4,
NRPPA_TRANSMISSION_COMB_POS_PR_N8
} nrppa_transmission_comb_pos_pr;
typedef struct nrppa_transmission_comb_pos_s {
nrppa_transmission_comb_pos_pr present;
nrppa_transmission_comb_pos_u choice;
} nrppa_transmission_comb_pos_t;
typedef enum nrppa_srs_resource_type_pos_periodicity_e {
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT1 = 0,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT2,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT4,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT8,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT10,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT16,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT20,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT32,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT40,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT64,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT80,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT160,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT320,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT640,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT1280,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT2560,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5120,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT10240,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT20480,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT40960,
NRPPA_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT81920
} nrppa_srs_resource_type_pos_periodicity_pr;
typedef struct nrppa_resource_type_periodic_pos_s {
nrppa_srs_resource_type_pos_periodicity_pr periodicity;
uint16_t offset;
} nrppa_resource_type_periodic_pos_t, nrppa_resource_type_semi_persistent_pos_t;
typedef struct nrppa_resource_type_aperiodic_pos_s {
uint8_t slot_offset;
} nrppa_resource_type_aperiodic_pos_t;
typedef union nrppa_resource_type_pos_c {
nrppa_resource_type_periodic_pos_t periodic;
nrppa_resource_type_semi_persistent_pos_t semi_persistent;
nrppa_resource_type_aperiodic_pos_t aperiodic;
} nrppa_resource_type_pos_u;
typedef enum nrppa_resource_type_pos_e {
NRPPA_RESOURCE_TYPE_POS_PR_NOTHING,
NRPPA_RESOURCE_TYPE_POS_PR_PERIODIC,
NRPPA_RESOURCE_TYPE_POS_PR_SEMI_PERSISTENT,
NRPPA_RESOURCE_TYPE_POS_PR_APERIODIC
} nrppa_resource_type_pos_pr;
typedef struct nrppa_resource_type_pos_s {
nrppa_resource_type_pos_pr present;
nrppa_resource_type_pos_u choice;
} nrppa_resource_type_pos_t;
typedef struct nrppa_srs_resource_id_list_s {
long *srs_resource_id;
uint8_t srs_resource_id_list_length;
} nrppa_srs_resource_id_list_t;
typedef struct nrppa_resource_set_type_aperiodic_s {
uint8_t srs_resource_trigger;
long slot_offset;
} nrppa_resource_set_type_aperiodic_t;
typedef union nrppa_resource_set_type_c {
bool periodic;
bool semi_persistent;
nrppa_resource_set_type_aperiodic_t aperiodic;
} nrppa_resource_set_type_u;
typedef enum nrppa_resource_set_type_e {
NRPPA_RESOURCE_SET_TYPE_PR_NOTHING,
NRPPA_RESOURCE_SET_TYPE_PR_PERIODIC,
NRPPA_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT,
NRPPA_RESOURCE_SET_TYPE_PR_APERIODIC
} nrppa_resource_set_type_pr;
typedef struct nrppa_resource_set_type_s {
nrppa_resource_set_type_pr present;
nrppa_resource_set_type_u choice;
} nrppa_resource_set_type_t;
typedef struct nrppa_pos_srs_resource_id_list_s {
long *srs_pos_resource_id;
uint32_t pos_srs_resource_id_list_length;
} nrppa_pos_srs_resource_id_list_t;
typedef union nrppa_pos_resource_set_type_c {
bool periodic;
bool semi_persistent;
uint8_t srs_resource;
} nrppa_pos_resource_set_type_u;
typedef enum nrppa_pos_resource_set_type_e {
NRPPA_POS_RESOURCE_SET_TYPE_PR_NOTHING,
NRPPA_POS_RESOURCE_SET_TYPE_PR_PERIODIC,
NRPPA_POS_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT,
NRPPA_POS_RESOURCE_SET_TYPE_PR_APERIODIC
} nrppa_pos_resource_set_type_pr;
typedef struct nrppa_pos_resource_set_type_s {
nrppa_pos_resource_set_type_pr present;
nrppa_pos_resource_set_type_u choice;
} nrppa_pos_resource_set_type_t;
typedef enum nrppa_srs_resource_number_of_ports_e {
NRPPA_SRS_NUMBER_OF_PORTS_N1,
NRPPA_SRS_NUMBER_OF_PORTS_N2,
NRPPA_SRS_NUMBER_OF_PORTS_N4
} nrppa_srs_resource_number_of_ports_pr;
typedef enum nrppa_srs_resource_number_of_symbols_e {
NRPPA_SRS_NUMBER_OF_SYMBOLS_N1,
NRPPA_SRS_NUMBER_OF_SYMBOLS_N2,
NRPPA_SRS_NUMBER_OF_SYMBOLS_N4
} nrppa_srs_resource_number_of_symbols_pr;
typedef enum nrppa_srs_repetition_factor_e {
NRPPA_SRS_REPETITION_FACTOR_RF1,
NRPPA_SRS_REPETITION_FACTOR_RF2,
NRPPA_SRS_REPETITION_FACTOR_RF4
} nrppa_srs_repetition_factor_pr;
typedef enum nrppa_srs_group_or_sequencehopping_e {
NRPPA_GROUPORSEQUENCEHOPPING_NOTHING,
NRPPA_GROUPORSEQUENCEHOPPING_GROUPHOPPING,
NRPPA_GROUPORSEQUENCEHOPPING_SEQUENCEHOPPING
} nrppa_srs_group_or_sequencehopping_pr;
typedef struct nrppa_srs_resource_s {
uint32_t srs_resource_id;
nrppa_srs_resource_number_of_ports_pr nr_of_srs_ports;
nrppa_transmission_comb_t transmission_comb;
uint8_t start_position;
nrppa_srs_resource_number_of_symbols_pr nr_of_symbols;
nrppa_srs_repetition_factor_pr repetition_factor;
uint8_t freq_domain_position;
uint16_t freq_domain_shift;
uint8_t c_srs;
uint8_t b_srs;
uint8_t b_hop;
nrppa_srs_group_or_sequencehopping_pr group_or_sequence_hopping;
nrppa_resource_type_t resource_type;
uint16_t sequence_id;
} nrppa_srs_resource_t;
typedef enum nrppa_srs_resource_item_number_of_symbols_e {
NRPPA_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N1,
NRPPA_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N2,
NRPPA_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N4,
NRPPA_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N8,
NRPPA_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N12
} nrppa_srs_resource_item_number_of_symbols_pr;
typedef struct nrppa_pos_srs_resource_item_s {
uint32_t srs_pos_resource_id;
nrppa_transmission_comb_pos_t transmission_comb_pos;
uint8_t start_position;
nrppa_srs_resource_item_number_of_symbols_pr nr_of_symbols;
uint16_t freq_domain_shift;
uint8_t c_srs;
nrppa_srs_group_or_sequencehopping_pr group_or_sequence_hopping;
nrppa_resource_type_pos_t resource_type_pos;
uint32_t sequence_id;
} nrppa_pos_srs_resource_item_t;
typedef struct nrppa_srs_resource_set_s {
uint8_t srs_resource_set_id;
nrppa_srs_resource_id_list_t srs_resource_id_list;
nrppa_resource_set_type_t resource_set_type;
} nrppa_srs_resource_set_t;
typedef struct nrppa_pos_srs_resource_set_item_s {
uint8_t pos_srs_resource_set_id;
nrppa_pos_srs_resource_id_list_t pos_srs_resource_id_list;
nrppa_pos_resource_set_type_t pos_resource_set_type;
} nrppa_pos_srs_resource_set_item_t;
typedef struct nrppa_srs_resource_list_s {
nrppa_srs_resource_t *srs_resource;
uint32_t srs_resource_list_length;
} nrppa_srs_resource_list_t;
typedef struct nrppa_pos_srs_resource_list_s {
nrppa_pos_srs_resource_item_t *pos_srs_resource_item;
uint32_t pos_srs_resource_list_length;
} nrppa_pos_srs_resource_list_t;
typedef struct nrppa_srs_resource_set_list_s {
nrppa_srs_resource_set_t *srs_resource_set;
uint32_t srs_resource_set_list_length;
} nrppa_srs_resource_set_list_t;
typedef struct nrppa_pos_srs_resource_set_list_s {
nrppa_pos_srs_resource_set_item_t *pos_srs_resource_set_item;
uint32_t pos_srs_resource_set_list_length;
} nrppa_pos_srs_resource_set_list_t;
typedef struct nrppa_srs_config_s {
nrppa_srs_resource_list_t *srs_resource_list;
nrppa_pos_srs_resource_list_t *pos_srs_resource_list;
nrppa_srs_resource_set_list_t *srs_resource_set_list;
nrppa_pos_srs_resource_set_list_t *pos_srs_resource_set_list;
} nrppa_srs_config_t;
typedef enum nrppa_cp_type_e { NRPPA_CP_TYPE_NORMAL, NRPPA_CP_TYPE_EXTENDED } nrppa_cp_type_pr;
typedef struct nrppa_active_ul_bwp_s {
uint32_t location_and_bandwidth;
nrppa_subcarrier_spacing_pr subcarrier_spacing;
nrppa_cp_type_pr cyclic_prefix;
uint32_t tx_direct_current_location;
uint8_t shift_7_dot_5kHz;
nrppa_srs_config_t srs_config;
} nrppa_active_ul_bwp_t;
typedef struct nrppa_srs_carrier_list_item_s {
uint32_t pointA;
nrppa_uplink_channel_bw_per_scs_list_t uplink_channel_bw_per_scs_list;
nrppa_active_ul_bwp_t active_ul_bwp;
uint16_t pci;
} nrppa_srs_carrier_list_item_t;
typedef struct nrppa_srs_carrier_list_s {
nrppa_srs_carrier_list_item_t *srs_carrier_list_item;
uint32_t srs_carrier_list_length;
} nrppa_srs_carrier_list_t;
typedef struct nrppa_srs_configuration_s {
nrppa_srs_carrier_list_t srs_carrier_list;
} nrppa_srs_configuration_t;
// IE 9.3.1.176 (TS 38.473 V16.21.0)
typedef struct nrppa_trp_information_list_s {
nrppa_trp_information_t *trp_information_item;
uint32_t trp_information_item_length;
} nrppa_trp_information_list_t;
typedef union nrppa_srs_type_c {
uint8_t *srs_resource_set_id;
bool *aperiodic;
} nrppa_srs_type_u;
typedef enum nrppa_srs_type_e {
NRPPA_SRS_TYPE_PR_NOTHING,
NRPPA_SRS_TYPE_PR_SEMIPERSISTENTSRS,
NRPPA_SRS_TYPE_PR_APERIODICSRS
} nrppa_srs_type_pr;
typedef struct nrppa_srs_type_s {
nrppa_srs_type_pr present;
nrppa_srs_type_u choice;
} nrppa_srs_type_t;
typedef struct nrppa_trp_measurement_request_item_s {
uint32_t trp_id;
} nrppa_trp_measurement_request_item_t;
typedef struct nrppa_trp_measurement_request_list_s {
nrppa_trp_measurement_request_item_t *trp_measurement_request_item;
uint32_t trp_measurement_request_list_length;
} nrppa_trp_measurement_request_list_t;
typedef enum nrppa_pos_report_characteristics_e {
NRPPA_POSREPORTCHARACTERISTICS_ONDEMAND = 0,
NRPPA_POSREPORTCHARACTERISTICS_PERIODIC = 1
} nrppa_report_characteristics_pr;
typedef enum nrppa_pos_measurement_periodicity_e {
NRPPA_POSMEASUREMENTPERIODICITY_MS120 = 0,
NRPPA_POSMEASUREMENTPERIODICITY_MS240 = 1,
NRPPA_POSMEASUREMENTPERIODICITY_MS480 = 2,
NRPPA_POSMEASUREMENTPERIODICITY_MS640 = 3,
NRPPA_POSMEASUREMENTPERIODICITY_MS1024 = 4,
NRPPA_POSMEASUREMENTPERIODICITY_MS2048 = 5,
NRPPA_POSMEASUREMENTPERIODICITY_MS5120 = 6,
NRPPA_POSMEASUREMENTPERIODICITY_MS10240 = 7,
NRPPA_POSMEASUREMENTPERIODICITY_MIN1 = 8,
NRPPA_POSMEASUREMENTPERIODICITY_MIN6 = 9,
NRPPA_POSMEASUREMENTPERIODICITY_MIN12 = 10,
NRPPA_POSMEASUREMENTPERIODICITY_MIN30 = 11,
NRPPA_POSMEASUREMENTPERIODICITY_MIN60 = 12
} nrppa_measurement_periodicity_pr;
typedef enum nrppa_pos_measurement_type_e {
NRPPA_POSMEASUREMENTTYPE_GNB_RX_TX = 0,
NRPPA_POSMEASUREMENTTYPE_UL_SRS_RSRP = 1,
NRPPA_POSMEASUREMENTTYPE_UL_AOA = 2,
NRPPA_POSMEASUREMENTTYPE_UL_RTOA = 3
} nrppa_measurement_type_pr;
typedef struct nrppa_pos_measurement_quantities_item_s {
nrppa_measurement_type_pr measurement_type;
} nrppa_measurement_quantities_item_t;
typedef struct nrppa_pos_measurement_quantities_s {
nrppa_measurement_quantities_item_t *measurement_quantities_item;
uint32_t measurement_quantities_length;
} nrppa_measurement_quantities_t;
typedef struct nrppa_lcs_to_gcs_translationaoa_c {
uint16_t alpha;
uint16_t beta;
uint16_t gamma;
} nrppa_lcs_to_gcs_translationaoa_t;
typedef struct nrppa_ul_aoa_s {
uint16_t azimuth_aoa;
uint16_t *zenith_aoa;
nrppa_lcs_to_gcs_translationaoa_t *lcs_to_gcs_translation_aoa;
} nrppa_ul_aoa_t;
typedef union nrppa_relative_path_delay_c {
uint32_t k0;
uint32_t k1;
uint32_t k2;
uint32_t k3;
uint32_t k4;
uint32_t k5;
} nrppa_relative_path_delay_u, nrppa_ul_rtoa_measurement_u, nrppa_gnb_rx_tx_time_diff_u;
typedef enum nrppa_gnb_rx_tx_time_diff_meas_e {
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_NOTHING,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K0,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K1,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K2,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K3,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K4,
NRPPA_GNBRXTXTIMEDIFFMEAS_PR_K5
} nrppa_gnb_rx_tx_time_diff_pr;
typedef struct nrppa_gnb_rx_tx_time_diff_s {
nrppa_gnb_rx_tx_time_diff_pr present;
nrppa_gnb_rx_tx_time_diff_u choice;
} nrppa_gnb_rx_tx_time_diff_t;
typedef enum nrppa_ul_rtoa_measurement_e {
NRPPA_ULRTOAMEAS_PR_NOTHING,
NRPPA_ULRTOAMEAS_PR_K0,
NRPPA_ULRTOAMEAS_PR_K1,
NRPPA_ULRTOAMEAS_PR_K2,
NRPPA_ULRTOAMEAS_PR_K3,
NRPPA_ULRTOAMEAS_PR_K4,
NRPPA_ULRTOAMEAS_PR_K5
} nrppa_ul_rtoa_measurement_pr;
typedef struct nrppa_ul_rtoa_measurement_s {
nrppa_ul_rtoa_measurement_pr present;
nrppa_ul_rtoa_measurement_u choice;
} nrppa_ul_rtoa_measurement_t;
typedef union nrppa_measured_results_value_c {
nrppa_ul_aoa_t ul_angle_of_arrival;
uint8_t ul_srs_rsrp;
nrppa_ul_rtoa_measurement_t ul_rtoa;
nrppa_gnb_rx_tx_time_diff_t gnb_rx_tx_time_diff;
} nrppa_measured_results_value_u;
typedef enum nrppa_measured_results_value_e {
NRPPA_MEASURED_RESULTS_VALUE_PR_NOTHING,
NRPPA_MEASURED_RESULTS_VALUE_PR_UL_ANGLEOFARRIVAL,
NRPPA_MEASURED_RESULTS_VALUE_PR_UL_SRS_RSRP,
NRPPA_MEASURED_RESULTS_VALUE_PR_UL_RTOA,
NRPPA_MEASURED_RESULTS_VALUE_PR_GNB_RXTXTIMEDIFF
} nrppa_measured_results_value_pr;
typedef struct nrppa_measured_results_value_s {
nrppa_measured_results_value_pr present;
nrppa_measured_results_value_u choice;
} nrppa_measured_results_value_t;
typedef union nrppa_time_stamp_slot_index_c {
uint8_t scs_15;
uint8_t scs_30;
uint8_t scs_60;
uint8_t scs_120;
} nrppa_time_stamp_slot_index_u;
typedef enum nrppa_time_stamp_slot_index_e {
NRPPA_TIME_STAMP_SLOT_INDEX_PR_NOTHING,
NRPPA_TIME_STAMP_SLOT_INDEX_PR_SCS_15,
NRPPA_TIME_STAMP_SLOT_INDEX_PR_SCS_30,
NRPPA_TIME_STAMP_SLOT_INDEX_PR_SCS_60,
NRPPA_TIME_STAMP_SLOT_INDEX_PR_SCS_120
} nrppa_time_stamp_slot_index_pr;
typedef struct nrppa_time_stamp_slot_index_s {
nrppa_time_stamp_slot_index_pr present;
nrppa_time_stamp_slot_index_u choice;
} nrppa_time_stamp_slot_index_t;
typedef struct nrppa_time_stamp_s {
uint16_t system_frame_number;
nrppa_time_stamp_slot_index_t slot_index;
} nrppa_time_stamp_t;
typedef struct nrppa_measurement_result_item_s {
nrppa_measured_results_value_t measured_results_value;
nrppa_time_stamp_t time_stamp;
} nrppa_measurement_result_item_t;
typedef struct nrppa_measurement_result_s {
nrppa_measurement_result_item_t *measurement_result_item;
uint32_t measurement_result_item_length;
} nrppa_measurement_result_t;
typedef struct nrppa_measurement_response_item_s {
nrppa_measurement_result_t measurement_result;
uint32_t trp_id;
} nrppa_measurement_response_item_t;
typedef struct nrppa_measurement_response_list_s {
nrppa_measurement_response_item_t *measurement_response_item;
uint32_t measurement_response_list_length;
} nrppa_measurement_response_list_t;
typedef struct nrppa_trp_information_req_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
bool has_trp_list;
// mandatory
nrppa_trp_list_t trp_list;
// mandatory
nrppa_trp_information_type_list_t trp_information_type_list;
} nrppa_trp_information_req_t;
typedef struct nrppa_trp_information_resp_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
// mandatory
nrppa_trp_information_list_t trp_information_list;
} nrppa_trp_information_resp_t;
typedef struct nrppa_positioning_information_req_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
} nrppa_positioning_information_req_t;
typedef struct nrppa_positioning_information_resp_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
// IE 9.2.28 (optional)
nrppa_srs_configuration_t *srs_configuration;
} nrppa_positioning_information_resp_t;
typedef struct nrppa_positioning_activation_req_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
// (mandatory)
nrppa_srs_type_t srs_type;
} nrppa_positioning_activation_req_t;
typedef struct nrppa_positioning_activation_resp_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
} nrppa_positioning_activation_resp_t;
typedef struct nrppa_measurement_req_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
// (mandatory)
uint32_t lmf_measurement_id;
// (mandatory)
nrppa_trp_measurement_request_list_t trp_measurement_request_list;
// (mandatory) ondemand = 0, periodic = 1
nrppa_report_characteristics_pr report_characteristics;
// if report characteristics periodic
nrppa_measurement_periodicity_pr measurement_periodicity;
// (mandatory)
nrppa_measurement_quantities_t measurement_quantities;
// IE 9.2.28 (optional)
nrppa_srs_configuration_t *srs_configuration;
} nrppa_measurement_req_t;
typedef struct nrppa_measurement_resp_s {
// IE 9.2.4 (mandatory)
uint16_t transaction_id;
// (mandatory)
uint32_t lmf_measurement_id;
// (mandatory)
uint32_t ran_measurement_id;
// (optional)
nrppa_measurement_response_list_t *measurement_response_list;
} nrppa_measurement_resp_t;
#endif // NRPPA_MESSAGES_TYPES_H_
+62
View File
@@ -0,0 +1,62 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __POSITIONING_NR_PARAMDEF__H__
#define __POSITIONING_NR_PARAMDEF__H__
/* Positioning configuration section names */
#define CONFIG_STRING_POSITIONING_CONFIG "positioning_config"
/* Global parameters */
/* TRP configuration parameters names */
#define CONFIG_STRING_POSITIONING_NUM_TRPS "NumTRPs"
#define CONFIG_STRING_POSITIONING_TRP_IDS_LIST "TRPIDs"
#define CONFIG_STRING_POSITIONING_TRP_X_AXIS_LIST "TRPxAxis"
#define CONFIG_STRING_POSITIONING_TRP_Y_AXIS_LIST "TRPyAxis"
#define CONFIG_STRING_POSITIONING_TRP_Z_AXIS_LIST "TRPzAxis"
#define CONFIG_STRING_POSITIONING_TRP_UNIT_LIST "Units"
/* Help string for Positioning parameters */
#define HELP_STRING_POSITIONING_NUM_TRPS "Number of TRPs connected with gNB(max 4)\n"
#define HELP_STRING_POSITIONING_TRP_IDS_LIST "User defined IDs for each TRP \n"
#define HELP_STRING_POSITIONING_TRP_X_AXIS_LIST "x-axis value of each TRP \n"
#define HELP_STRING_POSITIONING_TRP_Y_AXIS_LIST "y-axis value of each TRP \n"
#define HELP_STRING_POSITIONING_TRP_Z_AXIS_LIST "z-axis value of each TRP \n"
#define HELP_STRING_POSITIONING_TRP_UNIT_LIST "XYZ unit value of each TRP \n"
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* TRP configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type
* numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off
#define POSITIONING_PARAMS_DESC { \
{CONFIG_STRING_POSITIONING_NUM_TRPS, HELP_STRING_POSITIONING_NUM_TRPS, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \
{CONFIG_STRING_POSITIONING_TRP_IDS_LIST, HELP_STRING_POSITIONING_TRP_IDS_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \
{CONFIG_STRING_POSITIONING_TRP_X_AXIS_LIST, HELP_STRING_POSITIONING_TRP_X_AXIS_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \
{CONFIG_STRING_POSITIONING_TRP_Y_AXIS_LIST, HELP_STRING_POSITIONING_TRP_Y_AXIS_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \
{CONFIG_STRING_POSITIONING_TRP_Z_AXIS_LIST, HELP_STRING_POSITIONING_TRP_Z_AXIS_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \
{CONFIG_STRING_POSITIONING_TRP_UNIT_LIST, HELP_STRING_POSITIONING_TRP_UNIT_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \
}
// clang-format on
#endif
+1
View File
@@ -53,6 +53,7 @@
#include "openair2/E1AP/e1ap.h"
#include "gnb_config.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/GNB_APP/gnb_config_ng.h"
extern RAN_CONTEXT_t RC;
/*------------------------------------------------------------------------------*/
+2 -164
View File
@@ -79,7 +79,8 @@
#include "uper_encoder.h"
#include "utils.h"
#include "x2ap_messages_types.h"
#include "gnb_config_common.h"
#include "positioning_nr_paramdef.h"
static int DEFBANDS[] = {7};
static int DEFENBS[] = {0};
@@ -96,45 +97,6 @@ static int DEFRUTPCORES[] = {-1,-1,-1,-1};
(element)->choice.setup = CALLOC(1, sizeof(*((element)->choice.setup))); \
} while (0)
static uint16_t set_snssai_config(nssai_t *nssai, const int max_num_ssi, uint8_t k, uint8_t l)
{
char snssaistr[MAX_OPTNAME_SIZE * 2 + 8];
snprintf(snssaistr, sizeof(snssaistr), "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_PLMN_LIST, l);
GET_PARAMS_LIST(SNSSAIParamList,
SNSSAIParams,
GNBSNSSAIPARAMS_DESC,
GNB_CONFIG_STRING_SNSSAI_LIST,
snssaistr,
SNSSAIPARAMS_CHECK);
uint16_t num_ssi = SNSSAIParamList.numelt;
AssertFatal(num_ssi < max_num_ssi, "S-NSSAI size %d exceeds the max array size %d", num_ssi, max_num_ssi);
for (int s = 0; s < num_ssi; ++s) {
nssai[s].sst = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
// SD is optional
// 0xffffff is "no SD", see 23.003 Sec 28.4.2
nssai[s].sd = *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr;
AssertFatal(nssai[s].sd <= 0xffffff, "SD cannot be bigger than 0xffffff, but is %d\n", nssai[s].sd);
}
return num_ssi;
}
static uint8_t set_plmn_config(plmn_id_t *p, uint8_t idx)
{
char gnbpath[MAX_OPTNAME_SIZE * 2 + 8];
snprintf(gnbpath, sizeof(gnbpath), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, idx);
GET_PARAMS_LIST(PLMNParamList, PLMNParams, GNBPLMNPARAMS_DESC, GNB_CONFIG_STRING_PLMN_LIST, gnbpath, PLMNPARAMS_CHECK);
uint8_t num_plmn = PLMNParamList.numelt;
AssertFatal(num_plmn >= 1 && num_plmn <= 6, "The number of PLMN IDs must be in [1,6], but is %d\n", num_plmn);
for (int l = 0; l < num_plmn; ++l) {
plmn_id_t *plmn = &p[l];
plmn->mcc = *PLMNParamList.paramarray[l][GNB_MOBILE_COUNTRY_CODE_IDX].uptr;
plmn->mnc = *PLMNParamList.paramarray[l][GNB_MOBILE_NETWORK_CODE_IDX].uptr;
plmn->mnc_digit_length = *PLMNParamList.paramarray[l][GNB_MNC_DIGIT_LENGTH].u8ptr;
AssertFatal((plmn->mnc_digit_length == 2) || (plmn->mnc_digit_length == 3), "BAD MNC DIGIT LENGTH %d", plmn->mnc_digit_length);
}
return num_plmn;
}
/**
* Allocate memory and initialize ServingCellConfigCommon struct members
*/
@@ -2131,130 +2093,6 @@ gNB_RRC_INST *RCconfig_NRRRC()
return rrc;
}
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i)
{
int j,k = 0;
int gnb_id;
char* gnb_ipv4_address_for_NGU = NULL;
uint32_t gnb_port_for_NGU = 0;
char* gnb_ipv4_address_for_S1U = NULL;
uint32_t gnb_port_for_S1U = 0;
GET_PARAMS(GNBSParams, GNBSPARAMS_DESC, NULL);
AssertFatal (i<GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
"Failed to parse config file %s, %uth attribute %s \n",
RC.config_file_name, i, GNB_CONFIG_STRING_ACTIVE_GNBS);
if (GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt>0) {
// Output a list of all gNBs.
GET_PARAMS_LIST(GNBParamList, GNBParams, GNBPARAMS_DESC, GNB_CONFIG_STRING_GNB_LIST, NULL);
if (GNBParamList.numelt > 0) {
for (k = 0; k < GNBParamList.numelt; k++) {
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
// Calculate a default gNB ID
if (IS_SA_MODE(get_softmodem_params())) {
uint32_t hash;
hash = ngap_generate_gNB_id ();
gnb_id = k + (hash & 0xFFFFFF8);
} else {
gnb_id = k;
}
} else {
gnb_id = *(GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr);
}
// search if in active list
for (j=0; j < GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; j++) {
if (strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[j], *(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr)) == 0) {
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
NGAP_REGISTER_GNB_REQ (msg_p).gNB_id = gnb_id;
if (strcmp(*(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr), "CELL_MACRO_GNB") == 0) {
NGAP_REGISTER_GNB_REQ (msg_p).cell_type = CELL_MACRO_GNB;
} else if (strcmp(*(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr), "CELL_HOME_GNB") == 0) {
NGAP_REGISTER_GNB_REQ (msg_p).cell_type = CELL_HOME_ENB;
} else {
AssertFatal (0,
"Failed to parse gNB configuration file %s, gnb %u unknown value \"%s\" for cell_type choice: CELL_MACRO_GNB or CELL_HOME_GNB !\n",
RC.config_file_name, i, *(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr));
}
NGAP_REGISTER_GNB_REQ (msg_p).gNB_name = strdup(*(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr));
NGAP_REGISTER_GNB_REQ (msg_p).tac = *GNBParamList.paramarray[k][GNB_TRACKING_AREA_CODE_IDX].uptr;
AssertFatal(!GNBParamList.paramarray[k][GNB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
&& !GNBParamList.paramarray[k][GNB_MOBILE_NETWORK_CODE_IDX_OLD].strptr,
"It seems that you use an old configuration file. Please change the existing\n"
" tracking_area_code = \"1\";\n"
" mobile_country_code = \"208\";\n"
" mobile_network_code = \"93\";\n"
"to\n"
" tracking_area_code = 1; // no string!!\n"
" plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n");
// PLMN
plmn_id_t p[PLMN_LIST_MAX_SIZE] = {0};
NGAP_REGISTER_GNB_REQ(msg_p).num_plmn = set_plmn_config(p, 0);
for (int l = 0; l < NGAP_REGISTER_GNB_REQ(msg_p).num_plmn; ++l) {
NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].plmn = p[l];
// SNSSAI
NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].num_nssai = set_snssai_config(NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].s_nssai, 8, k, l);
}
NGAP_REGISTER_GNB_REQ(msg_p).default_drx = 0;
// NG
snprintf(aprefix, sizeof(aprefix), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, k);
GET_PARAMS_LIST(NGParamList, NGParams, GNBNGPARAMS_DESC, GNB_CONFIG_STRING_AMF_IP_ADDRESS, aprefix);
NGAP_REGISTER_GNB_REQ (msg_p).nb_amf = 0;
for (int l = 0; l < NGParamList.numelt; l++) {
NGAP_REGISTER_GNB_REQ (msg_p).nb_amf += 1;
strcpy(NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[l].ipv4_address,*(NGParamList.paramarray[l][GNB_AMF_IPV4_ADDRESS_IDX].strptr));
NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv4 = 1;
NGAP_REGISTER_GNB_REQ (msg_p).amf_ip_address[j].ipv6 = 0;
/* if no broadcasst_plmn array is defined, fill default values */
if (NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] == 0) {
NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = NGAP_REGISTER_GNB_REQ(msg_p).num_plmn;
for (int el = 0; el < NGAP_REGISTER_GNB_REQ(msg_p).num_plmn; ++el)
NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el] = el;
}
}
// SCTP SETTING
NGAP_REGISTER_GNB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
if (IS_SA_MODE(get_softmodem_params())) {
snprintf(aprefix, sizeof(aprefix), "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_SCTP_CONFIG);
GET_PARAMS(SCTPParams, GNBSCTPPARAMS_DESC, aprefix);
NGAP_REGISTER_GNB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
NGAP_REGISTER_GNB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[GNB_SCTP_OUTSTREAMS_IDX].uptr);
}
// NETWORK_INTERFACES
snprintf(aprefix, sizeof(aprefix), "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
GET_PARAMS(NETParams, GNBNETPARAMS_DESC, aprefix);
if (NETParams[GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX].strptr != NULL) {
char *cidr = *(NETParams[GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX].strptr);
char *save = NULL;
char *address = strtok_r(cidr, "/", &save);
strcpy(NGAP_REGISTER_GNB_REQ (msg_p).gnb_ip_address.ipv4_address, address);
LOG_I(GNB_APP, "Parsed IPv4 address for NG AMF: %s\n", address);
}
NGAP_REGISTER_GNB_REQ (msg_p).gnb_ip_address.ipv6 = 0;
NGAP_REGISTER_GNB_REQ (msg_p).gnb_ip_address.ipv4 = 1;
break;
}
}
}
}
}
return 0;
}
static pthread_mutex_t rc_mutex = PTHREAD_MUTEX_INITIALIZER;
static bool rc_done = false;
-1
View File
@@ -44,7 +44,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg);
void NRRCConfig(void);
gNB_RRC_INST *RCconfig_NRRRC();
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
void wait_f1_setup_response(void);
f1ap_tdd_info_t read_tdd_config(const NR_ServingCellConfigCommon_t *scc);
+66
View File
@@ -0,0 +1,66 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "openair2/GNB_APP/gnb_config_common.h"
#include "common/config/config_paramdesc.h"
#include "common/config/config_userapi.h"
#include "RRC_nr_paramsvalues.h"
#include "gnb_paramdef.h"
#include "sctp_default_values.h"
uint16_t set_snssai_config(nssai_t *nssai, const int max_num_ssi, uint8_t k, uint8_t l)
{
char snssaistr[MAX_OPTNAME_SIZE * 2 + 8];
snprintf(snssaistr, sizeof(snssaistr), "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_PLMN_LIST, l);
GET_PARAMS_LIST(SNSSAIParamList,
SNSSAIParams,
GNBSNSSAIPARAMS_DESC,
GNB_CONFIG_STRING_SNSSAI_LIST,
snssaistr,
SNSSAIPARAMS_CHECK);
uint16_t num_ssi = SNSSAIParamList.numelt;
AssertFatal(num_ssi < max_num_ssi, "S-NSSAI size %d exceeds the max array size %d", num_ssi, max_num_ssi);
for (int s = 0; s < num_ssi; ++s) {
nssai[s].sst = *SNSSAIParamList.paramarray[s][GNB_SLICE_SERVICE_TYPE_IDX].uptr;
// SD is optional
// 0xffffff is "no SD", see 23.003 Sec 28.4.2
nssai[s].sd = *SNSSAIParamList.paramarray[s][GNB_SLICE_DIFFERENTIATOR_IDX].uptr;
AssertFatal(nssai[s].sd <= 0xffffff, "SD cannot be bigger than 0xffffff, but is %d\n", nssai[s].sd);
}
return num_ssi;
}
uint8_t set_plmn_config(plmn_id_t *p, uint8_t idx)
{
char gnbpath[MAX_OPTNAME_SIZE * 2 + 8];
snprintf(gnbpath, sizeof(gnbpath), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, idx);
GET_PARAMS_LIST(PLMNParamList, PLMNParams, GNBPLMNPARAMS_DESC, GNB_CONFIG_STRING_PLMN_LIST, gnbpath, PLMNPARAMS_CHECK);
uint8_t num_plmn = PLMNParamList.numelt;
AssertFatal(num_plmn >= 1 && num_plmn <= 6, "The number of PLMN IDs must be in [1,6], but is %d\n", num_plmn);
for (int l = 0; l < num_plmn; ++l) {
plmn_id_t *plmn = &p[l];
plmn->mcc = *PLMNParamList.paramarray[l][GNB_MOBILE_COUNTRY_CODE_IDX].uptr;
plmn->mnc = *PLMNParamList.paramarray[l][GNB_MOBILE_NETWORK_CODE_IDX].uptr;
plmn->mnc_digit_length = *PLMNParamList.paramarray[l][GNB_MNC_DIGIT_LENGTH].u8ptr;
AssertFatal((plmn->mnc_digit_length == 2) || (plmn->mnc_digit_length == 3), "BAD MNC DIGIT LENGTH %d", plmn->mnc_digit_length);
}
return num_plmn;
}
+26
View File
@@ -0,0 +1,26 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <assert.h>
#include "common/5g_platform_types.h"
uint16_t set_snssai_config(nssai_t *nssai, const int max_num_ssi, uint8_t k, uint8_t l);
uint8_t set_plmn_config(plmn_id_t *p, uint8_t idx);
+162
View File
@@ -0,0 +1,162 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "gnb_config_ng.h"
#include <stdint.h>
#include "assertions.h"
#include "common/ran_context.h"
#include "openair2/GNB_APP/gnb_config_common.h"
#include "common/config/config_paramdesc.h"
#include "sctp_default_values.h"
#include "gnb_paramdef.h"
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i)
{
int j, k = 0;
int gnb_id;
char *gnb_ipv4_address_for_NGU = NULL;
uint32_t gnb_port_for_NGU = 0;
char *gnb_ipv4_address_for_S1U = NULL;
uint32_t gnb_port_for_S1U = 0;
GET_PARAMS(GNBSParams, GNBSPARAMS_DESC, NULL);
AssertFatal(i < GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt,
"Failed to parse config file %s, %uth attribute %s \n",
RC.config_file_name,
i,
GNB_CONFIG_STRING_ACTIVE_GNBS);
if (GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt > 0) {
// Output a list of all gNBs.
GET_PARAMS_LIST(GNBParamList, GNBParams, GNBPARAMS_DESC, GNB_CONFIG_STRING_GNB_LIST, NULL);
if (GNBParamList.numelt > 0) {
for (k = 0; k < GNBParamList.numelt; k++) {
if (GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr == NULL) {
// Calculate a default gNB ID
if (IS_SA_MODE(get_softmodem_params())) {
uint32_t hash;
hash = ngap_generate_gNB_id();
gnb_id = k + (hash & 0xFFFFFF8);
} else {
gnb_id = k;
}
} else {
gnb_id = *(GNBParamList.paramarray[k][GNB_GNB_ID_IDX].uptr);
}
// search if in active list
for (j = 0; j < GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt; j++) {
if (strcmp(GNBSParams[GNB_ACTIVE_GNBS_IDX].strlistptr[j], *(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr)) == 0) {
char aprefix[MAX_OPTNAME_SIZE * 2 + 8];
NGAP_REGISTER_GNB_REQ(msg_p).gNB_id = gnb_id;
if (strcmp(*(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr), "CELL_MACRO_GNB") == 0) {
NGAP_REGISTER_GNB_REQ(msg_p).cell_type = CELL_MACRO_GNB;
} else if (strcmp(*(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr), "CELL_HOME_GNB") == 0) {
NGAP_REGISTER_GNB_REQ(msg_p).cell_type = CELL_HOME_ENB;
} else {
AssertFatal(0,
"Failed to parse gNB configuration file %s, gnb %u unknown value \"%s\" for cell_type choice: "
"CELL_MACRO_GNB or CELL_HOME_GNB !\n",
RC.config_file_name,
i,
*(GNBParamList.paramarray[k][GNB_CELL_TYPE_IDX].strptr));
}
NGAP_REGISTER_GNB_REQ(msg_p).gNB_name = strdup(*(GNBParamList.paramarray[k][GNB_GNB_NAME_IDX].strptr));
NGAP_REGISTER_GNB_REQ(msg_p).tac = *GNBParamList.paramarray[k][GNB_TRACKING_AREA_CODE_IDX].uptr;
AssertFatal(!GNBParamList.paramarray[k][GNB_MOBILE_COUNTRY_CODE_IDX_OLD].strptr
&& !GNBParamList.paramarray[k][GNB_MOBILE_NETWORK_CODE_IDX_OLD].strptr,
"It seems that you use an old configuration file. Please change the existing\n"
" tracking_area_code = \"1\";\n"
" mobile_country_code = \"208\";\n"
" mobile_network_code = \"93\";\n"
"to\n"
" tracking_area_code = 1; // no string!!\n"
" plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2; } )\n");
// PLMN
plmn_id_t p[PLMN_LIST_MAX_SIZE] = {0};
NGAP_REGISTER_GNB_REQ(msg_p).num_plmn = set_plmn_config(p, 0);
for (int l = 0; l < NGAP_REGISTER_GNB_REQ(msg_p).num_plmn; ++l) {
NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].plmn = p[l];
// SNSSAI
NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].num_nssai =
set_snssai_config(NGAP_REGISTER_GNB_REQ(msg_p).plmn[l].s_nssai, 8, k, l);
}
NGAP_REGISTER_GNB_REQ(msg_p).default_drx = 0;
// NG
snprintf(aprefix, sizeof(aprefix), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, k);
GET_PARAMS_LIST(NGParamList, NGParams, GNBNGPARAMS_DESC, GNB_CONFIG_STRING_AMF_IP_ADDRESS, aprefix);
NGAP_REGISTER_GNB_REQ(msg_p).nb_amf = 0;
for (int l = 0; l < NGParamList.numelt; l++) {
NGAP_REGISTER_GNB_REQ(msg_p).nb_amf += 1;
strcpy(NGAP_REGISTER_GNB_REQ(msg_p).amf_ip_address[l].ipv4_address,
*(NGParamList.paramarray[l][GNB_AMF_IPV4_ADDRESS_IDX].strptr));
NGAP_REGISTER_GNB_REQ(msg_p).amf_ip_address[l].ipv4 = 1;
NGAP_REGISTER_GNB_REQ(msg_p).amf_ip_address[l].ipv6 = 0;
/* if no broadcasst_plmn array is defined, fill default values */
if (NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] == 0) {
NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_num[l] = NGAP_REGISTER_GNB_REQ(msg_p).num_plmn;
for (int el = 0; el < NGAP_REGISTER_GNB_REQ(msg_p).num_plmn; ++el)
NGAP_REGISTER_GNB_REQ(msg_p).broadcast_plmn_index[l][el] = el;
}
}
// SCTP SETTING
NGAP_REGISTER_GNB_REQ(msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
NGAP_REGISTER_GNB_REQ(msg_p).sctp_in_streams = SCTP_IN_STREAMS;
if (IS_SA_MODE(get_softmodem_params())) {
snprintf(aprefix, sizeof(aprefix), "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, k, GNB_CONFIG_STRING_SCTP_CONFIG);
GET_PARAMS(SCTPParams, GNBSCTPPARAMS_DESC, aprefix);
NGAP_REGISTER_GNB_REQ(msg_p).sctp_in_streams = (uint16_t) * (SCTPParams[GNB_SCTP_INSTREAMS_IDX].uptr);
NGAP_REGISTER_GNB_REQ(msg_p).sctp_out_streams = (uint16_t) * (SCTPParams[GNB_SCTP_OUTSTREAMS_IDX].uptr);
}
// NETWORK_INTERFACES
snprintf(aprefix,
sizeof(aprefix),
"%s.[%d].%s",
GNB_CONFIG_STRING_GNB_LIST,
k,
GNB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
GET_PARAMS(NETParams, GNBNETPARAMS_DESC, aprefix);
if (NETParams[GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX].strptr != NULL) {
char *cidr = *(NETParams[GNB_IPV4_ADDRESS_FOR_NG_AMF_IDX].strptr);
char *save = NULL;
char *address = strtok_r(cidr, "/", &save);
strcpy(NGAP_REGISTER_GNB_REQ(msg_p).gnb_ip_address.ipv4_address, address);
LOG_I(GNB_APP, "Parsed IPv4 address for NG AMF: %s\n", address);
}
NGAP_REGISTER_GNB_REQ(msg_p).gnb_ip_address.ipv6 = 0;
NGAP_REGISTER_GNB_REQ(msg_p).gnb_ip_address.ipv4 = 1;
break;
}
}
}
}
}
return 0;
}
+29
View File
@@ -0,0 +1,29 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef NGAP_GNB_CONFIG_H_
#define NGAP_GNB_CONFIG_H_
#include <stdint.h>
#include "intertask_interface.h"
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
#endif /* NGAP_GNB_CONFIG_H_ */