Add F1AP positioning information response message enc/dec + test
Reference: 3GPP 38.473 v16.21.0 Mandatory fields: gNB-CU UE F1AP ID (supported) gNB-DU UE F1AP ID (supported) Optional fields: SRS Configuration (supported) SFN Initialisation Time (not supported) Criticality Diagnostics (not supported)
This commit is contained in:
@@ -674,6 +674,347 @@ typedef struct f1ap_reset_ack_t {
|
||||
/* Structure of Position Information Transfer related NRPPA messages */
|
||||
/* IE structures for Positioning related messages as per TS 38.473 V16.3.1*/
|
||||
|
||||
typedef enum f1ap_subcarrier_spacing_e {
|
||||
F1AP_SUBCARRIER_SPACING_15KHZ,
|
||||
F1AP_SUBCARRIER_SPACING_30KHZ,
|
||||
F1AP_SUBCARRIER_SPACING_60KHZ,
|
||||
F1AP_SUBCARRIER_SPACING_120KHZ
|
||||
} f1ap_subcarrier_spacing_pr;
|
||||
|
||||
typedef struct f1ap_scs_specific_carrier_s {
|
||||
uint32_t offset_to_carrier;
|
||||
f1ap_subcarrier_spacing_pr subcarrier_spacing;
|
||||
uint16_t carrier_bandwidth;
|
||||
} f1ap_scs_specific_carrier_t;
|
||||
|
||||
typedef struct f1ap_uplink_channel_bw_per_scs_list_s {
|
||||
f1ap_scs_specific_carrier_t *scs_specific_carrier;
|
||||
uint32_t scs_specific_carrier_list_length;
|
||||
} f1ap_uplink_channel_bw_per_scs_list_t;
|
||||
|
||||
typedef enum f1ap_transmission_comb_e {
|
||||
F1AP_TRANSMISSION_COMB_PR_NOTHING,
|
||||
F1AP_TRANSMISSION_COMB_PR_N2,
|
||||
F1AP_TRANSMISSION_COMB_PR_N4
|
||||
} f1ap_transmission_comb_pr;
|
||||
|
||||
typedef struct f1ap_transmission_comb_n2_s {
|
||||
uint8_t comb_offset_n2;
|
||||
uint8_t cyclic_shift_n2;
|
||||
} f1ap_transmission_comb_n2_t, f1ap_transmission_comb_pos_n2_t;
|
||||
|
||||
typedef struct f1ap_transmission_comb_n4_s {
|
||||
uint8_t comb_offset_n4;
|
||||
uint8_t cyclic_shift_n4;
|
||||
} f1ap_transmission_comb_n4_t, f1ap_transmission_comb_pos_n4_t;
|
||||
|
||||
typedef union f1ap_transmission_comb_c {
|
||||
f1ap_transmission_comb_n2_t n2;
|
||||
f1ap_transmission_comb_n4_t n4;
|
||||
} f1ap_transmission_comb_u;
|
||||
|
||||
typedef struct f1ap_transmission_comb_s {
|
||||
f1ap_transmission_comb_pr present;
|
||||
f1ap_transmission_comb_u choice;
|
||||
} f1ap_transmission_comb_t;
|
||||
|
||||
typedef enum f1ap_srs_resource_type_periodicity_e {
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT1 = 0,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT2,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT4,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT5,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT8,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT10,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT16,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT20,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT32,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT40,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT64,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT80,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT160,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT320,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT640,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT1280,
|
||||
F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT2560
|
||||
} f1ap_srs_resource_type_periodicity_pr;
|
||||
|
||||
typedef struct f1ap_resource_type_periodic_s {
|
||||
f1ap_srs_resource_type_periodicity_pr periodicity;
|
||||
uint16_t offset;
|
||||
} f1ap_resource_type_periodic_t, f1ap_resource_type_semi_persistent_t;
|
||||
|
||||
typedef union f1ap_resource_type_c {
|
||||
f1ap_resource_type_periodic_t periodic;
|
||||
f1ap_resource_type_semi_persistent_t semi_persistent;
|
||||
bool aperiodic;
|
||||
} f1ap_resource_type_u;
|
||||
|
||||
typedef enum f1ap_resource_type_e {
|
||||
F1AP_RESOURCE_TYPE_PR_NOTHING,
|
||||
F1AP_RESOURCE_TYPE_PR_PERIODIC,
|
||||
F1AP_RESOURCE_TYPE_PR_SEMI_PERSISTENT,
|
||||
F1AP_RESOURCE_TYPE_PR_APERIODIC
|
||||
} f1ap_resource_type_pr;
|
||||
|
||||
typedef struct f1ap_resource_type_s {
|
||||
f1ap_resource_type_pr present;
|
||||
f1ap_resource_type_u choice;
|
||||
} f1ap_resource_type_t;
|
||||
|
||||
typedef struct f1ap_transmission_comb_n8_s {
|
||||
uint8_t comb_offset_n8;
|
||||
uint8_t cyclic_shift_n8;
|
||||
} f1ap_transmission_comb_pos_n8_t;
|
||||
|
||||
typedef union f1ap_transmission_comb_pos_c {
|
||||
f1ap_transmission_comb_pos_n2_t n2;
|
||||
f1ap_transmission_comb_pos_n4_t n4;
|
||||
f1ap_transmission_comb_pos_n8_t n8;
|
||||
} f1ap_transmission_comb_pos_u;
|
||||
|
||||
typedef enum f1ap_transmission_comb_pos_e {
|
||||
F1AP_TRANSMISSION_COMB_POS_PR_NOTHING,
|
||||
F1AP_TRANSMISSION_COMB_POS_PR_N2,
|
||||
F1AP_TRANSMISSION_COMB_POS_PR_N4,
|
||||
F1AP_TRANSMISSION_COMB_POS_PR_N8
|
||||
} f1ap_transmission_comb_pos_pr;
|
||||
|
||||
typedef struct f1ap_transmission_comb_pos_s {
|
||||
f1ap_transmission_comb_pos_pr present;
|
||||
f1ap_transmission_comb_pos_u choice;
|
||||
} f1ap_transmission_comb_pos_t;
|
||||
|
||||
typedef enum f1ap_srs_resource_type_pos_periodicity_e {
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT1 = 0,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT2,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT4,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT8,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT10,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT16,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT20,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT32,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT40,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT64,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT80,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT160,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT320,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT640,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT1280,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT2560,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5120,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT10240,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT20480,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT40960,
|
||||
F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT81920
|
||||
} f1ap_srs_resource_type_pos_periodicity_pr;
|
||||
|
||||
typedef struct f1ap_resource_type_periodic_pos_s {
|
||||
f1ap_srs_resource_type_pos_periodicity_pr periodicity;
|
||||
uint16_t offset;
|
||||
} f1ap_resource_type_periodic_pos_t, f1ap_resource_type_semi_persistent_pos_t;
|
||||
|
||||
typedef struct f1ap_resource_type_aperiodic_pos_s {
|
||||
uint8_t slot_offset;
|
||||
} f1ap_resource_type_aperiodic_pos_t;
|
||||
|
||||
typedef union f1ap_resource_type_pos_c {
|
||||
f1ap_resource_type_periodic_pos_t periodic;
|
||||
f1ap_resource_type_semi_persistent_pos_t semi_persistent;
|
||||
f1ap_resource_type_aperiodic_pos_t aperiodic;
|
||||
} f1ap_resource_type_pos_u;
|
||||
|
||||
typedef enum f1ap_resource_type_pos_e {
|
||||
F1AP_RESOURCE_TYPE_POS_PR_NOTHING,
|
||||
F1AP_RESOURCE_TYPE_POS_PR_PERIODIC,
|
||||
F1AP_RESOURCE_TYPE_POS_PR_SEMI_PERSISTENT,
|
||||
F1AP_RESOURCE_TYPE_POS_PR_APERIODIC
|
||||
} f1ap_resource_type_pos_pr;
|
||||
|
||||
typedef struct f1ap_resource_type_pos_s {
|
||||
f1ap_resource_type_pos_pr present;
|
||||
f1ap_resource_type_pos_u choice;
|
||||
} f1ap_resource_type_pos_t;
|
||||
|
||||
typedef struct f1ap_srs_resource_id_list_s {
|
||||
long *srs_resource_id;
|
||||
uint8_t srs_resource_id_list_length;
|
||||
} f1ap_srs_resource_id_list_t;
|
||||
|
||||
typedef struct f1ap_resource_set_type_aperiodic_s {
|
||||
uint8_t srs_resource_trigger;
|
||||
long slot_offset;
|
||||
} f1ap_resource_set_type_aperiodic_t;
|
||||
|
||||
typedef union f1ap_resource_set_type_c {
|
||||
bool periodic;
|
||||
bool semi_persistent;
|
||||
f1ap_resource_set_type_aperiodic_t aperiodic;
|
||||
} f1ap_resource_set_type_u;
|
||||
|
||||
typedef enum f1ap_resource_set_type_e {
|
||||
F1AP_RESOURCE_SET_TYPE_PR_NOTHING,
|
||||
F1AP_RESOURCE_SET_TYPE_PR_PERIODIC,
|
||||
F1AP_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT,
|
||||
F1AP_RESOURCE_SET_TYPE_PR_APERIODIC
|
||||
} f1ap_resource_set_type_pr;
|
||||
|
||||
typedef struct f1ap_resource_set_type_s {
|
||||
f1ap_resource_set_type_pr present;
|
||||
f1ap_resource_set_type_u choice;
|
||||
} f1ap_resource_set_type_t;
|
||||
|
||||
typedef struct f1ap_pos_srs_resource_id_list_s {
|
||||
long *srs_pos_resource_id;
|
||||
uint32_t pos_srs_resource_id_list_length;
|
||||
} f1ap_pos_srs_resource_id_list_t;
|
||||
|
||||
typedef union f1ap_pos_resource_set_type_c {
|
||||
bool periodic;
|
||||
bool semi_persistent;
|
||||
uint8_t srs_resource;
|
||||
} f1ap_pos_resource_set_type_u;
|
||||
|
||||
typedef enum f1ap_pos_resource_set_type_e {
|
||||
F1AP_POS_RESOURCE_SET_TYPE_PR_NOTHING,
|
||||
F1AP_POS_RESOURCE_SET_TYPE_PR_PERIODIC,
|
||||
F1AP_POS_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT,
|
||||
F1AP_POS_RESOURCE_SET_TYPE_PR_APERIODIC
|
||||
} f1ap_pos_resource_set_type_pr;
|
||||
|
||||
typedef struct f1ap_pos_resource_set_type_s {
|
||||
f1ap_pos_resource_set_type_pr present;
|
||||
f1ap_pos_resource_set_type_u choice;
|
||||
} f1ap_pos_resource_set_type_t;
|
||||
|
||||
typedef enum f1ap_srs_resource_number_of_ports_e {
|
||||
F1AP_SRS_NUMBER_OF_PORTS_N1,
|
||||
F1AP_SRS_NUMBER_OF_PORTS_N2,
|
||||
F1AP_SRS_NUMBER_OF_PORTS_N4
|
||||
} f1ap_srs_resource_number_of_ports_pr;
|
||||
|
||||
typedef enum f1ap_srs_resource_number_of_symbols_e {
|
||||
F1AP_SRS_NUMBER_OF_SYMBOLS_N1,
|
||||
F1AP_SRS_NUMBER_OF_SYMBOLS_N2,
|
||||
F1AP_SRS_NUMBER_OF_SYMBOLS_N4
|
||||
} f1ap_srs_resource_number_of_symbols_pr;
|
||||
|
||||
typedef enum f1ap_srs_repetition_factor_e {
|
||||
F1AP_SRS_REPETITION_FACTOR_RF1,
|
||||
F1AP_SRS_REPETITION_FACTOR_RF2,
|
||||
F1AP_SRS_REPETITION_FACTOR_RF4
|
||||
} f1ap_srs_repetition_factor_pr;
|
||||
|
||||
typedef enum f1ap_srs_group_or_sequencehopping_e {
|
||||
F1AP_GROUPORSEQUENCEHOPPING_NOTHING,
|
||||
F1AP_GROUPORSEQUENCEHOPPING_GROUPHOPPING,
|
||||
F1AP_GROUPORSEQUENCEHOPPING_SEQUENCEHOPPING
|
||||
} f1ap_srs_group_or_sequencehopping_pr;
|
||||
|
||||
typedef struct f1ap_srs_resource_s {
|
||||
uint32_t srs_resource_id;
|
||||
f1ap_srs_resource_number_of_ports_pr nr_of_srs_ports;
|
||||
f1ap_transmission_comb_t transmission_comb;
|
||||
uint8_t start_position;
|
||||
f1ap_srs_resource_number_of_symbols_pr nr_of_symbols;
|
||||
f1ap_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;
|
||||
f1ap_srs_group_or_sequencehopping_pr group_or_sequence_hopping;
|
||||
f1ap_resource_type_t resource_type;
|
||||
uint16_t sequence_id;
|
||||
} f1ap_srs_resource_t;
|
||||
|
||||
typedef enum f1ap_srs_resource_item_number_of_symbols_e {
|
||||
F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N1,
|
||||
F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N2,
|
||||
F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N4,
|
||||
F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N8,
|
||||
F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N12
|
||||
} f1ap_srs_resource_item_number_of_symbols_pr;
|
||||
|
||||
typedef struct f1ap_pos_srs_resource_item_s {
|
||||
uint32_t srs_pos_resource_id;
|
||||
f1ap_transmission_comb_pos_t transmission_comb_pos;
|
||||
uint8_t start_position;
|
||||
f1ap_srs_resource_item_number_of_symbols_pr nr_of_symbols;
|
||||
uint16_t freq_domain_shift;
|
||||
uint8_t c_srs;
|
||||
f1ap_srs_group_or_sequencehopping_pr group_or_sequence_hopping;
|
||||
f1ap_resource_type_pos_t resource_type_pos;
|
||||
uint32_t sequence_id;
|
||||
} f1ap_pos_srs_resource_item_t;
|
||||
|
||||
typedef struct f1ap_srs_resource_set_s {
|
||||
uint8_t srs_resource_set_id;
|
||||
f1ap_srs_resource_id_list_t srs_resource_id_list;
|
||||
f1ap_resource_set_type_t resource_set_type;
|
||||
} f1ap_srs_resource_set_t;
|
||||
|
||||
typedef struct f1ap_pos_srs_resource_set_item_s {
|
||||
uint8_t pos_srs_resource_set_id;
|
||||
f1ap_pos_srs_resource_id_list_t pos_srs_resource_id_list;
|
||||
f1ap_pos_resource_set_type_t pos_resource_set_type;
|
||||
} f1ap_pos_srs_resource_set_item_t;
|
||||
|
||||
typedef struct f1ap_srs_resource_list_s {
|
||||
f1ap_srs_resource_t *srs_resource;
|
||||
uint32_t srs_resource_list_length;
|
||||
} f1ap_srs_resource_list_t;
|
||||
|
||||
typedef struct f1ap_pos_srs_resource_list_s {
|
||||
f1ap_pos_srs_resource_item_t *pos_srs_resource_item;
|
||||
uint32_t pos_srs_resource_list_length;
|
||||
} f1ap_pos_srs_resource_list_t;
|
||||
|
||||
typedef struct f1ap_srs_resource_set_list_s {
|
||||
f1ap_srs_resource_set_t *srs_resource_set;
|
||||
uint32_t srs_resource_set_list_length;
|
||||
} f1ap_srs_resource_set_list_t;
|
||||
|
||||
typedef struct f1ap_pos_srs_resource_set_list_s {
|
||||
f1ap_pos_srs_resource_set_item_t *pos_srs_resource_set_item;
|
||||
uint32_t pos_srs_resource_set_list_length;
|
||||
} f1ap_pos_srs_resource_set_list_t;
|
||||
|
||||
typedef struct f1ap_srs_config_s {
|
||||
f1ap_srs_resource_list_t *srs_resource_list;
|
||||
f1ap_pos_srs_resource_list_t *pos_srs_resource_list;
|
||||
f1ap_srs_resource_set_list_t *srs_resource_set_list;
|
||||
f1ap_pos_srs_resource_set_list_t *pos_srs_resource_set_list;
|
||||
} f1ap_srs_config_t;
|
||||
|
||||
typedef enum f1ap_cp_type_e { F1AP_CP_TYPE_NORMAL, F1AP_CP_TYPE_EXTENDED } f1ap_cp_type_pr;
|
||||
|
||||
typedef struct f1ap_active_ul_bwp_s {
|
||||
uint32_t location_and_bandwidth;
|
||||
f1ap_subcarrier_spacing_pr subcarrier_spacing;
|
||||
f1ap_cp_type_pr cyclic_prefix;
|
||||
uint32_t tx_direct_current_location;
|
||||
uint8_t shift_7_dot_5kHz;
|
||||
f1ap_srs_config_t srs_config;
|
||||
} f1ap_active_ul_bwp_t;
|
||||
|
||||
typedef struct f1ap_srs_carrier_list_item_s {
|
||||
uint32_t pointA;
|
||||
f1ap_uplink_channel_bw_per_scs_list_t uplink_channel_bw_per_scs_list;
|
||||
f1ap_active_ul_bwp_t active_ul_bwp;
|
||||
uint16_t pci;
|
||||
} f1ap_srs_carrier_list_item_t;
|
||||
|
||||
typedef struct f1ap_srs_carrier_list_s {
|
||||
f1ap_srs_carrier_list_item_t *srs_carrier_list_item;
|
||||
uint32_t srs_carrier_list_length;
|
||||
} f1ap_srs_carrier_list_t;
|
||||
|
||||
// optional: IE 9.3.1.192 (TS 38.473 V16.21.0)
|
||||
typedef struct f1ap_srs_configuration_s {
|
||||
f1ap_srs_carrier_list_t srs_carrier_list;
|
||||
} f1ap_srs_configuration_t;
|
||||
|
||||
typedef struct f1ap_positioning_information_req_s {
|
||||
// IE 9.3.1.4 (mandatory)
|
||||
uint32_t gNB_CU_ue_id;
|
||||
@@ -681,4 +1022,13 @@ typedef struct f1ap_positioning_information_req_s {
|
||||
uint32_t gNB_DU_ue_id;
|
||||
} f1ap_positioning_information_req_t;
|
||||
|
||||
typedef struct f1ap_positioning_information_resp_s {
|
||||
// IE 9.3.1.4 (mandatory)
|
||||
uint32_t gNB_CU_ue_id;
|
||||
// IE 9.3.1.5 (mandatory)
|
||||
uint32_t gNB_DU_ue_id;
|
||||
// IE 9.3.1.192 (optional)
|
||||
f1ap_srs_configuration_t *srs_configuration;
|
||||
} f1ap_positioning_information_resp_t;
|
||||
|
||||
#endif /* F1AP_MESSAGES_TYPES_H_ */
|
||||
|
||||
@@ -47,5 +47,29 @@
|
||||
#include "F1AP_NonDynamic5QIDescriptor.h"
|
||||
#include "F1AP_Dynamic5QIDescriptor.h"
|
||||
#include "F1AP_DLUPTNLInformation-ToBeSetup-Item.h"
|
||||
#include "F1AP_SRSCarrier-List-Item.h"
|
||||
#include "F1AP_SCS-SpecificCarrier.h"
|
||||
#include "F1AP_SRSResource-List.h"
|
||||
#include "F1AP_SRSResource.h"
|
||||
#include "F1AP_ResourceTypePeriodic.h"
|
||||
#include "F1AP_ResourceTypeSemi-persistent.h"
|
||||
#include "F1AP_ResourceTypeAperiodic.h"
|
||||
#include "F1AP_PosSRSResource-Item.h"
|
||||
#include "F1AP_PosSRSResource-List.h"
|
||||
#include "F1AP_PosResourceSetType.h"
|
||||
#include "F1AP_ResourceTypePeriodicPos.h"
|
||||
#include "F1AP_ResourceTypeSemi-persistentPos.h"
|
||||
#include "F1AP_ResourceTypeAperiodicPos.h"
|
||||
#include "F1AP_SRSResourceSet-List.h"
|
||||
#include "F1AP_SRSResourceSet.h"
|
||||
#include "F1AP_PosSRSResourceSet-List.h"
|
||||
#include "F1AP_PosSRSResourceSet-Item.h"
|
||||
#include "F1AP_ResourceSetTypePeriodic.h"
|
||||
#include "F1AP_ResourceSetTypeSemi-persistent.h"
|
||||
#include "F1AP_ResourceSetTypeAperiodic.h"
|
||||
#include "F1AP_SRSPosResourceID.h"
|
||||
#include "F1AP_PosResourceSetTypePR.h"
|
||||
#include "F1AP_PosResourceSetTypeSP.h"
|
||||
#include "F1AP_PosResourceSetTypeAP.h"
|
||||
|
||||
#endif /* F1AP_LIB_INCLUDES_H_ */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,10 +27,18 @@
|
||||
|
||||
struct F1AP_F1AP_PDU;
|
||||
|
||||
// positioning information request
|
||||
struct F1AP_F1AP_PDU *encode_positioning_information_req(const f1ap_positioning_information_req_t *msg);
|
||||
bool decode_positioning_information_req(const struct F1AP_F1AP_PDU *pdu, f1ap_positioning_information_req_t *out);
|
||||
f1ap_positioning_information_req_t cp_positioning_information_req(const f1ap_positioning_information_req_t *orig);
|
||||
bool eq_positioning_information_req(const f1ap_positioning_information_req_t *a, const f1ap_positioning_information_req_t *b);
|
||||
void free_positioning_information_req(f1ap_positioning_information_req_t *msg);
|
||||
|
||||
// positioning information response
|
||||
struct F1AP_F1AP_PDU *encode_positioning_information_resp(const f1ap_positioning_information_resp_t *msg);
|
||||
bool decode_positioning_information_resp(const struct F1AP_F1AP_PDU *pdu, f1ap_positioning_information_resp_t *out);
|
||||
f1ap_positioning_information_resp_t cp_positioning_information_resp(const f1ap_positioning_information_resp_t *orig);
|
||||
bool eq_positioning_information_resp(const f1ap_positioning_information_resp_t *a, const f1ap_positioning_information_resp_t *b);
|
||||
void free_positioning_information_resp(f1ap_positioning_information_resp_t *msg);
|
||||
|
||||
#endif /* F1AP_POSITIONING_H_ */
|
||||
|
||||
@@ -1297,6 +1297,318 @@ static void test_f1ap_positioning_information_request()
|
||||
printf("%s() successful\n", __func__);
|
||||
}
|
||||
|
||||
static void fill_srs_carrier_list(f1ap_srs_carrier_list_t *srs_carrier_list)
|
||||
{
|
||||
uint32_t srs_carrier_list_len = 2;
|
||||
srs_carrier_list->srs_carrier_list_length = srs_carrier_list_len;
|
||||
srs_carrier_list->srs_carrier_list_item = calloc_or_fail(srs_carrier_list_len, sizeof(*srs_carrier_list->srs_carrier_list_item));
|
||||
for (int i = 0; i < srs_carrier_list_len; i++) {
|
||||
f1ap_srs_carrier_list_item_t *srs_carrier_list_item = &srs_carrier_list->srs_carrier_list_item[i];
|
||||
// pointA
|
||||
srs_carrier_list_item->pointA = 87641 + i;
|
||||
|
||||
// Uplink Channel BW-PerSCS-List
|
||||
f1ap_uplink_channel_bw_per_scs_list_t *uplink_channel_bw_per_scs_list = &srs_carrier_list_item->uplink_channel_bw_per_scs_list;
|
||||
|
||||
uint32_t scs_specific_carrier_list_length = 3;
|
||||
uplink_channel_bw_per_scs_list->scs_specific_carrier_list_length = scs_specific_carrier_list_length;
|
||||
uplink_channel_bw_per_scs_list->scs_specific_carrier =
|
||||
calloc_or_fail(scs_specific_carrier_list_length, sizeof(*uplink_channel_bw_per_scs_list->scs_specific_carrier));
|
||||
for (int j = 0; j < scs_specific_carrier_list_length; j++) {
|
||||
f1ap_scs_specific_carrier_t *scs_specific_carrier = &uplink_channel_bw_per_scs_list->scs_specific_carrier[j];
|
||||
// offset to carrier
|
||||
scs_specific_carrier->offset_to_carrier = 100 + i + j;
|
||||
// subcarrier spacing
|
||||
scs_specific_carrier->subcarrier_spacing = F1AP_SUBCARRIER_SPACING_30KHZ;
|
||||
// carrier bandwidth
|
||||
scs_specific_carrier->carrier_bandwidth = 106 + i + j;
|
||||
}
|
||||
|
||||
// Active UL BWP
|
||||
f1ap_active_ul_bwp_t *active_ul_bwp = &srs_carrier_list_item->active_ul_bwp;
|
||||
|
||||
// location and bandwidth
|
||||
active_ul_bwp->location_and_bandwidth = 2775 + i;
|
||||
// subcarrier spacing
|
||||
active_ul_bwp->subcarrier_spacing = F1AP_SUBCARRIER_SPACING_30KHZ;
|
||||
// cyclic prefix
|
||||
active_ul_bwp->cyclic_prefix = F1AP_CP_TYPE_NORMAL;
|
||||
// Tx Direct Current Location
|
||||
active_ul_bwp->tx_direct_current_location = 10 + i;
|
||||
|
||||
// SRS Config
|
||||
f1ap_srs_config_t *sRSConfig = &active_ul_bwp->srs_config;
|
||||
|
||||
// srs_resource_list
|
||||
sRSConfig->srs_resource_list = calloc_or_fail(1, sizeof(*sRSConfig->srs_resource_list));
|
||||
f1ap_srs_resource_list_t *srs_resource_list = sRSConfig->srs_resource_list;
|
||||
uint32_t srs_resource_list_length = 3;
|
||||
srs_resource_list->srs_resource_list_length = srs_resource_list_length;
|
||||
srs_resource_list->srs_resource = calloc_or_fail(srs_resource_list_length, sizeof(*srs_resource_list->srs_resource));
|
||||
|
||||
// SRS resource config 1 : periodic
|
||||
f1ap_srs_resource_t *srs_resource = &srs_resource_list->srs_resource[0];
|
||||
srs_resource->srs_resource_id = 22;
|
||||
srs_resource->nr_of_srs_ports = F1AP_SRS_NUMBER_OF_PORTS_N2;
|
||||
srs_resource->transmission_comb.present = F1AP_TRANSMISSION_COMB_PR_N2;
|
||||
srs_resource->transmission_comb.choice.n2.comb_offset_n2 = 1;
|
||||
srs_resource->transmission_comb.choice.n2.cyclic_shift_n2 = 3;
|
||||
srs_resource->start_position = 8;
|
||||
srs_resource->nr_of_symbols = F1AP_SRS_NUMBER_OF_SYMBOLS_N4;
|
||||
srs_resource->repetition_factor = F1AP_SRS_REPETITION_FACTOR_RF2;
|
||||
srs_resource->freq_domain_position = 32;
|
||||
srs_resource->freq_domain_shift = 108;
|
||||
srs_resource->c_srs = 31;
|
||||
srs_resource->b_srs = 1;
|
||||
srs_resource->b_hop = 3;
|
||||
srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_GROUPHOPPING;
|
||||
srs_resource->resource_type.present = F1AP_RESOURCE_TYPE_PR_PERIODIC;
|
||||
|
||||
f1ap_resource_type_periodic_t *periodic = &srs_resource->resource_type.choice.periodic;
|
||||
periodic->periodicity = F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT16;
|
||||
periodic->offset = 1000;
|
||||
srs_resource->sequence_id = 18;
|
||||
|
||||
// SRS resource config 2 : semi-persistent
|
||||
srs_resource = &srs_resource_list->srs_resource[1];
|
||||
srs_resource->srs_resource_id = 24;
|
||||
srs_resource->nr_of_srs_ports = F1AP_SRS_NUMBER_OF_PORTS_N4;
|
||||
srs_resource->transmission_comb.present = F1AP_TRANSMISSION_COMB_PR_N4;
|
||||
srs_resource->transmission_comb.choice.n2.comb_offset_n2 = 3;
|
||||
srs_resource->transmission_comb.choice.n2.cyclic_shift_n2 = 5;
|
||||
srs_resource->start_position = 8;
|
||||
srs_resource->nr_of_symbols = F1AP_SRS_NUMBER_OF_SYMBOLS_N2;
|
||||
srs_resource->repetition_factor = F1AP_SRS_REPETITION_FACTOR_RF2;
|
||||
srs_resource->freq_domain_position = 32;
|
||||
srs_resource->freq_domain_shift = 108;
|
||||
srs_resource->c_srs = 31;
|
||||
srs_resource->b_srs = 1;
|
||||
srs_resource->b_hop = 3;
|
||||
srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_GROUPHOPPING;
|
||||
srs_resource->resource_type.present = F1AP_RESOURCE_TYPE_PR_SEMI_PERSISTENT;
|
||||
|
||||
srs_resource->resource_type.present = F1AP_RESOURCE_TYPE_PR_SEMI_PERSISTENT;
|
||||
f1ap_resource_type_semi_persistent_t *semi_persistent = &srs_resource->resource_type.choice.semi_persistent;
|
||||
semi_persistent->periodicity = F1AP_SRS_RESOURCE_TYPE_PERIODICITY_SLOT40;
|
||||
semi_persistent->offset = 1000;
|
||||
srs_resource->sequence_id = 12;
|
||||
|
||||
// SRS resource config 2 : aperiodic
|
||||
srs_resource = &srs_resource_list->srs_resource[2];
|
||||
srs_resource->srs_resource_id = 26;
|
||||
srs_resource->nr_of_srs_ports = F1AP_SRS_NUMBER_OF_PORTS_N2;
|
||||
srs_resource->transmission_comb.present = F1AP_TRANSMISSION_COMB_PR_N2;
|
||||
srs_resource->transmission_comb.choice.n2.comb_offset_n2 = 1;
|
||||
srs_resource->transmission_comb.choice.n2.cyclic_shift_n2 = 3;
|
||||
srs_resource->start_position = 8;
|
||||
srs_resource->nr_of_symbols = F1AP_SRS_NUMBER_OF_SYMBOLS_N4;
|
||||
srs_resource->repetition_factor = F1AP_SRS_REPETITION_FACTOR_RF2;
|
||||
srs_resource->freq_domain_position = 32;
|
||||
srs_resource->freq_domain_shift = 108;
|
||||
srs_resource->c_srs = 31;
|
||||
srs_resource->b_srs = 1;
|
||||
srs_resource->b_hop = 3;
|
||||
srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_SEQUENCEHOPPING;
|
||||
srs_resource->resource_type.present = F1AP_RESOURCE_TYPE_PR_APERIODIC;
|
||||
// set aperiodic = 0 to enable
|
||||
srs_resource->resource_type.choice.aperiodic = 0;
|
||||
srs_resource->sequence_id = 10;
|
||||
|
||||
// optional: pos_srs_resource_list
|
||||
sRSConfig->pos_srs_resource_list = calloc_or_fail(1, sizeof(*sRSConfig->pos_srs_resource_list));
|
||||
f1ap_pos_srs_resource_list_t *pos_srs_resource_list = sRSConfig->pos_srs_resource_list;
|
||||
uint32_t pos_srs_resource_list_length = 3;
|
||||
pos_srs_resource_list->pos_srs_resource_list_length = pos_srs_resource_list_length;
|
||||
pos_srs_resource_list->pos_srs_resource_item =
|
||||
calloc_or_fail(pos_srs_resource_list_length, sizeof(*pos_srs_resource_list->pos_srs_resource_item));
|
||||
|
||||
// periodic
|
||||
f1ap_pos_srs_resource_item_t *pos_srs_resource = &pos_srs_resource_list->pos_srs_resource_item[0];
|
||||
pos_srs_resource->srs_pos_resource_id = 12;
|
||||
pos_srs_resource->transmission_comb_pos.present = F1AP_TRANSMISSION_COMB_POS_PR_N2;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n2.comb_offset_n2 = 1;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n2.cyclic_shift_n2 = 4;
|
||||
pos_srs_resource->start_position = 9;
|
||||
pos_srs_resource->nr_of_symbols = F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N8;
|
||||
pos_srs_resource->freq_domain_shift = 100;
|
||||
pos_srs_resource->c_srs = 20;
|
||||
pos_srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_GROUPHOPPING;
|
||||
pos_srs_resource->resource_type_pos.present = F1AP_RESOURCE_TYPE_POS_PR_PERIODIC;
|
||||
pos_srs_resource->resource_type_pos.choice.periodic.periodicity = F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5;
|
||||
pos_srs_resource->resource_type_pos.choice.periodic.offset = 10;
|
||||
pos_srs_resource->sequence_id = 1;
|
||||
|
||||
// semi-persistent
|
||||
pos_srs_resource = &pos_srs_resource_list->pos_srs_resource_item[1];
|
||||
pos_srs_resource->srs_pos_resource_id = 13;
|
||||
pos_srs_resource->transmission_comb_pos.present = F1AP_TRANSMISSION_COMB_POS_PR_N4;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n4.comb_offset_n4 = 3;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n4.cyclic_shift_n4 = 5;
|
||||
pos_srs_resource->start_position = 12;
|
||||
pos_srs_resource->nr_of_symbols = F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N12;
|
||||
pos_srs_resource->freq_domain_shift = 100;
|
||||
pos_srs_resource->c_srs = 20;
|
||||
pos_srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_GROUPHOPPING;
|
||||
pos_srs_resource->resource_type_pos.present = F1AP_RESOURCE_TYPE_POS_PR_SEMI_PERSISTENT;
|
||||
pos_srs_resource->resource_type_pos.choice.semi_persistent.periodicity = F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT32;
|
||||
pos_srs_resource->resource_type_pos.choice.semi_persistent.offset = 5;
|
||||
pos_srs_resource->sequence_id = 2;
|
||||
|
||||
// aperiodic
|
||||
pos_srs_resource = &pos_srs_resource_list->pos_srs_resource_item[2];
|
||||
pos_srs_resource->srs_pos_resource_id = 14;
|
||||
pos_srs_resource->transmission_comb_pos.present = F1AP_TRANSMISSION_COMB_POS_PR_N8;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n8.comb_offset_n8 = 5;
|
||||
pos_srs_resource->transmission_comb_pos.choice.n8.cyclic_shift_n8 = 2;
|
||||
pos_srs_resource->start_position = 9;
|
||||
pos_srs_resource->nr_of_symbols = F1AP_SRS_RESOURCE_ITEM_NUMBER_OF_SYMBOLS_N4;
|
||||
pos_srs_resource->freq_domain_shift = 100;
|
||||
pos_srs_resource->c_srs = 20;
|
||||
pos_srs_resource->group_or_sequence_hopping = F1AP_GROUPORSEQUENCEHOPPING_SEQUENCEHOPPING;
|
||||
pos_srs_resource->resource_type_pos.present = F1AP_RESOURCE_TYPE_POS_PR_APERIODIC;
|
||||
pos_srs_resource->resource_type_pos.choice.periodic.periodicity = F1AP_SRS_RESOURCE_TYPE_POS_PERIODICITY_SLOT5;
|
||||
pos_srs_resource->resource_type_pos.choice.aperiodic.slot_offset = 31;
|
||||
pos_srs_resource->sequence_id = 3;
|
||||
|
||||
// optional: srs_resource_set_list
|
||||
sRSConfig->srs_resource_set_list = calloc_or_fail(1, sizeof(*sRSConfig->srs_resource_set_list));
|
||||
f1ap_srs_resource_set_list_t *srs_resource_set_list = sRSConfig->srs_resource_set_list;
|
||||
uint32_t srs_resource_set_list_length = 3;
|
||||
srs_resource_set_list->srs_resource_set_list_length = srs_resource_set_list_length;
|
||||
srs_resource_set_list->srs_resource_set =
|
||||
calloc_or_fail(srs_resource_set_list_length, sizeof(*srs_resource_set_list->srs_resource_set));
|
||||
|
||||
// periodic
|
||||
f1ap_srs_resource_set_t *srs_resource_set = &srs_resource_set_list->srs_resource_set[0];
|
||||
srs_resource_set->srs_resource_set_id = 0;
|
||||
uint8_t srs_resource_id_list_length = 5;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id_list_length = srs_resource_id_list_length;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id =
|
||||
calloc_or_fail(srs_resource_id_list_length, sizeof(*srs_resource_set->srs_resource_id_list.srs_resource_id));
|
||||
for (int k = 0; k < srs_resource_id_list_length; k++) {
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id[k] = k;
|
||||
}
|
||||
srs_resource_set->resource_set_type.present = F1AP_RESOURCE_SET_TYPE_PR_PERIODIC;
|
||||
// set periodic = 0 to enable
|
||||
srs_resource_set->resource_set_type.choice.periodic = 0;
|
||||
|
||||
// semi-persistent
|
||||
srs_resource_set = &srs_resource_set_list->srs_resource_set[1];
|
||||
srs_resource_set->srs_resource_set_id = 1;
|
||||
srs_resource_id_list_length = 5;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id_list_length = srs_resource_id_list_length;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id =
|
||||
calloc_or_fail(srs_resource_id_list_length, sizeof(srs_resource_set->srs_resource_id_list.srs_resource_id));
|
||||
for (int k = 0; k < srs_resource_id_list_length; k++) {
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id[k] = k;
|
||||
}
|
||||
srs_resource_set->resource_set_type.present = F1AP_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT;
|
||||
// set semi_persistent = 0 to enable
|
||||
srs_resource_set->resource_set_type.choice.semi_persistent = 0;
|
||||
|
||||
// aperiodic
|
||||
srs_resource_set = &srs_resource_set_list->srs_resource_set[2];
|
||||
srs_resource_set->srs_resource_set_id = 2;
|
||||
srs_resource_id_list_length = 5;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id_list_length = srs_resource_id_list_length;
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id =
|
||||
calloc_or_fail(srs_resource_id_list_length, sizeof(*srs_resource_set->srs_resource_id_list.srs_resource_id));
|
||||
for (int k = 0; k < srs_resource_id_list_length; k++) {
|
||||
srs_resource_set->srs_resource_id_list.srs_resource_id[k] = k;
|
||||
}
|
||||
|
||||
srs_resource_set->resource_set_type.present = F1AP_RESOURCE_SET_TYPE_PR_APERIODIC;
|
||||
srs_resource_set->resource_set_type.choice.aperiodic.srs_resource_trigger = 2;
|
||||
srs_resource_set->resource_set_type.choice.aperiodic.slot_offset = 20;
|
||||
|
||||
// optional: pos_srs_resource_set_list
|
||||
sRSConfig->pos_srs_resource_set_list = calloc_or_fail(1, sizeof(*sRSConfig->pos_srs_resource_set_list));
|
||||
f1ap_pos_srs_resource_set_list_t *pos_srs_resource_set_list = sRSConfig->pos_srs_resource_set_list;
|
||||
uint32_t pos_srs_resource_set_list_length = 3;
|
||||
pos_srs_resource_set_list->pos_srs_resource_set_list_length = pos_srs_resource_set_list_length;
|
||||
pos_srs_resource_set_list->pos_srs_resource_set_item =
|
||||
calloc_or_fail(pos_srs_resource_set_list_length, sizeof(*pos_srs_resource_set_list->pos_srs_resource_set_item));
|
||||
|
||||
// periodic
|
||||
f1ap_pos_srs_resource_set_item_t *pos_srs_resource_set = &pos_srs_resource_set_list->pos_srs_resource_set_item[0];
|
||||
pos_srs_resource_set->pos_srs_resource_set_id = 0;
|
||||
uint8_t pos_srs_resource_id_list_length = 5;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.pos_srs_resource_id_list_length = pos_srs_resource_id_list_length;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id =
|
||||
calloc_or_fail(pos_srs_resource_id_list_length,
|
||||
sizeof(*pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id));
|
||||
for (int k = 0; k < pos_srs_resource_id_list_length; k++) {
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id[k] = k;
|
||||
}
|
||||
pos_srs_resource_set->pos_resource_set_type.present = F1AP_POS_RESOURCE_SET_TYPE_PR_PERIODIC;
|
||||
// set periodic = 0 to enable
|
||||
pos_srs_resource_set->pos_resource_set_type.choice.periodic = 0;
|
||||
|
||||
// semi-persistent
|
||||
pos_srs_resource_set = &pos_srs_resource_set_list->pos_srs_resource_set_item[1];
|
||||
pos_srs_resource_set->pos_srs_resource_set_id = 1;
|
||||
pos_srs_resource_id_list_length = 5;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.pos_srs_resource_id_list_length = pos_srs_resource_id_list_length;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id =
|
||||
calloc_or_fail(pos_srs_resource_id_list_length,
|
||||
sizeof(*pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id));
|
||||
for (int k = 0; k < pos_srs_resource_id_list_length; k++) {
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id[k] = k;
|
||||
}
|
||||
pos_srs_resource_set->pos_resource_set_type.present = F1AP_POS_RESOURCE_SET_TYPE_PR_SEMI_PERSISTENT;
|
||||
// set semi_persistent = 0 to enable
|
||||
pos_srs_resource_set->pos_resource_set_type.choice.semi_persistent = 0;
|
||||
|
||||
// aperiodic
|
||||
pos_srs_resource_set = &pos_srs_resource_set_list->pos_srs_resource_set_item[2];
|
||||
pos_srs_resource_set->pos_srs_resource_set_id = 2;
|
||||
pos_srs_resource_id_list_length = 5;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.pos_srs_resource_id_list_length = pos_srs_resource_id_list_length;
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id =
|
||||
calloc_or_fail(pos_srs_resource_id_list_length,
|
||||
sizeof(*pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id));
|
||||
for (int k = 0; k < pos_srs_resource_id_list_length; k++) {
|
||||
pos_srs_resource_set->pos_srs_resource_id_list.srs_pos_resource_id[k] = k;
|
||||
}
|
||||
pos_srs_resource_set->pos_resource_set_type.present = F1AP_POS_RESOURCE_SET_TYPE_PR_APERIODIC;
|
||||
pos_srs_resource_set->pos_resource_set_type.choice.srs_resource = 3;
|
||||
}
|
||||
}
|
||||
|
||||
static void test_f1ap_positioning_information_response()
|
||||
{
|
||||
f1ap_positioning_information_resp_t orig = {
|
||||
.gNB_CU_ue_id = 12,
|
||||
.gNB_DU_ue_id = 19,
|
||||
};
|
||||
|
||||
// SRS configuration
|
||||
orig.srs_configuration = calloc_or_fail(1, sizeof(*orig.srs_configuration));
|
||||
f1ap_srs_carrier_list_t *srs_carrier_list = &orig.srs_configuration->srs_carrier_list;
|
||||
fill_srs_carrier_list(srs_carrier_list);
|
||||
|
||||
F1AP_F1AP_PDU_t *f1enc = encode_positioning_information_resp(&orig);
|
||||
F1AP_F1AP_PDU_t *f1dec = f1ap_encode_decode(f1enc);
|
||||
f1ap_msg_free(f1enc);
|
||||
|
||||
f1ap_positioning_information_resp_t decoded = {0};
|
||||
bool ret = decode_positioning_information_resp(f1dec, &decoded);
|
||||
AssertFatal(ret, "decode_positioning_information_resp(): could not decode message\n");
|
||||
f1ap_msg_free(f1dec);
|
||||
|
||||
ret = eq_positioning_information_resp(&orig, &decoded);
|
||||
AssertFatal(ret, "eq_positioning_information_resp(): decoded message doesn't match\n");
|
||||
free_positioning_information_resp(&decoded);
|
||||
|
||||
f1ap_positioning_information_resp_t cp = cp_positioning_information_resp(&orig);
|
||||
ret = eq_positioning_information_resp(&orig, &cp);
|
||||
AssertFatal(ret, "eq_positioning_information_resp(): copied message doesn't match\n");
|
||||
free_positioning_information_resp(&orig);
|
||||
free_positioning_information_resp(&cp);
|
||||
|
||||
printf("%s() successful\n", __func__);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
test_initial_ul_rrc_message_transfer();
|
||||
@@ -1324,5 +1636,6 @@ int main()
|
||||
test_f1ap_ue_context_release_command();
|
||||
test_f1ap_ue_context_release_complete();
|
||||
test_f1ap_positioning_information_request();
|
||||
test_f1ap_positioning_information_response();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user