Merge branch 'next' into agpl_next

master
Codebot 3 years ago committed by Your Name
commit 582126d106

@ -21,280 +21,280 @@
/*******************************************************************************
*
* 3GPP TS ASN1 NGAP NR v15.3.0 (2019-03)
* 3GPP TS ASN1 NGAP v15.3.0 (2019-03)
*
******************************************************************************/
#ifndef SRSASN1_NGAP_NR_H
#define SRSASN1_NGAP_NR_H
#ifndef SRSASN1_NGAP_H
#define SRSASN1_NGAP_H
#include "asn1_utils.h"
#include <cstdio>
#include <stdarg.h>
namespace asn1 {
namespace ngap_nr {
namespace ngap {
/*******************************************************************************
* Constant Definitions
******************************************************************************/
#define ASN1_NGAP_NR_ID_AMF_CFG_UPD 0
#define ASN1_NGAP_NR_ID_AMF_STATUS_IND 1
#define ASN1_NGAP_NR_ID_CELL_TRAFFIC_TRACE 2
#define ASN1_NGAP_NR_ID_DEACTIV_TRACE 3
#define ASN1_NGAP_NR_ID_DL_NAS_TRANSPORT 4
#define ASN1_NGAP_NR_ID_DL_NON_UEASSOCIATED_NRP_PA_TRANSPORT 5
#define ASN1_NGAP_NR_ID_DL_RAN_CFG_TRANSFER 6
#define ASN1_NGAP_NR_ID_DL_RAN_STATUS_TRANSFER 7
#define ASN1_NGAP_NR_ID_DL_UEASSOCIATED_NRP_PA_TRANSPORT 8
#define ASN1_NGAP_NR_ID_ERROR_IND 9
#define ASN1_NGAP_NR_ID_HO_CANCEL 10
#define ASN1_NGAP_NR_ID_HO_NOTIF 11
#define ASN1_NGAP_NR_ID_HO_PREP 12
#define ASN1_NGAP_NR_ID_HO_RES_ALLOC 13
#define ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP 14
#define ASN1_NGAP_NR_ID_INIT_UE_MSG 15
#define ASN1_NGAP_NR_ID_LOCATION_REPORT_CTRL 16
#define ASN1_NGAP_NR_ID_LOCATION_REPORT_FAIL_IND 17
#define ASN1_NGAP_NR_ID_LOCATION_REPORT 18
#define ASN1_NGAP_NR_ID_NAS_NON_DELIVERY_IND 19
#define ASN1_NGAP_NR_ID_NG_RESET 20
#define ASN1_NGAP_NR_ID_NG_SETUP 21
#define ASN1_NGAP_NR_ID_OVERLOAD_START 22
#define ASN1_NGAP_NR_ID_OVERLOAD_STOP 23
#define ASN1_NGAP_NR_ID_PAGING 24
#define ASN1_NGAP_NR_ID_PATH_SWITCH_REQUEST 25
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY 26
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY_IND 27
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASE 28
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP 29
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_NOTIFY 30
#define ASN1_NGAP_NR_ID_PRIVATE_MSG 31
#define ASN1_NGAP_NR_ID_PWS_CANCEL 32
#define ASN1_NGAP_NR_ID_PWS_FAIL_IND 33
#define ASN1_NGAP_NR_ID_PWS_RESTART_IND 34
#define ASN1_NGAP_NR_ID_RAN_CFG_UPD 35
#define ASN1_NGAP_NR_ID_REROUTE_NAS_REQUEST 36
#define ASN1_NGAP_NR_ID_RRC_INACTIVE_TRANSITION_REPORT 37
#define ASN1_NGAP_NR_ID_TRACE_FAIL_IND 38
#define ASN1_NGAP_NR_ID_TRACE_START 39
#define ASN1_NGAP_NR_ID_UE_CONTEXT_MOD 40
#define ASN1_NGAP_NR_ID_UE_CONTEXT_RELEASE 41
#define ASN1_NGAP_NR_ID_UE_CONTEXT_RELEASE_REQUEST 42
#define ASN1_NGAP_NR_ID_UE_RADIO_CAP_CHECK 43
#define ASN1_NGAP_NR_ID_UE_RADIO_CAP_INFO_IND 44
#define ASN1_NGAP_NR_ID_UETNLA_BINDING_RELEASE 45
#define ASN1_NGAP_NR_ID_UL_NAS_TRANSPORT 46
#define ASN1_NGAP_NR_ID_UL_NON_UEASSOCIATED_NRP_PA_TRANSPORT 47
#define ASN1_NGAP_NR_ID_UL_RAN_CFG_TRANSFER 48
#define ASN1_NGAP_NR_ID_UL_RAN_STATUS_TRANSFER 49
#define ASN1_NGAP_NR_ID_UL_UEASSOCIATED_NRP_PA_TRANSPORT 50
#define ASN1_NGAP_NR_ID_WRITE_REPLACE_WARNING 51
#define ASN1_NGAP_NR_ID_SECONDARY_RAT_DATA_USAGE_REPORT 52
#define ASN1_NGAP_NR_MAX_PRIVATE_IES 65535
#define ASN1_NGAP_NR_MAX_PROTOCOL_EXTS 65535
#define ASN1_NGAP_NR_MAX_PROTOCOL_IES 65535
#define ASN1_NGAP_NR_MAXNOOF_ALLOWED_AREAS 16
#define ASN1_NGAP_NR_MAXNOOF_ALLOWED_S_NSSAIS 8
#define ASN1_NGAP_NR_MAXNOOF_BPLMNS 12
#define ASN1_NGAP_NR_MAXNOOF_CELL_IDFOR_WARNING 65535
#define ASN1_NGAP_NR_MAXNOOF_CELLIN_AO_I 256
#define ASN1_NGAP_NR_MAXNOOF_CELLIN_EAI 65535
#define ASN1_NGAP_NR_MAXNOOF_CELLIN_TAI 65535
#define ASN1_NGAP_NR_MAXNOOF_CELLSING_NB 16384
#define ASN1_NGAP_NR_MAXNOOF_CELLSINNGENB 256
#define ASN1_NGAP_NR_MAXNOOF_CELLSIN_UE_HISTORY_INFO 16
#define ASN1_NGAP_NR_MAXNOOF_CELLS_UE_MOVING_TRAJECTORY 16
#define ASN1_NGAP_NR_MAXNOOF_DRBS 32
#define ASN1_NGAP_NR_MAXNOOF_EMERGENCY_AREA_ID 65535
#define ASN1_NGAP_NR_MAXNOOF_EA_IFOR_RESTART 256
#define ASN1_NGAP_NR_MAXNOOF_EPLMNS 15
#define ASN1_NGAP_NR_MAXNOOF_EPLMNS_PLUS_ONE 16
#define ASN1_NGAP_NR_MAXNOOF_ERABS 256
#define ASN1_NGAP_NR_MAXNOOF_ERRORS 256
#define ASN1_NGAP_NR_MAXNOOF_FORB_TACS 4096
#define ASN1_NGAP_NR_MAXNOOF_MULTI_CONNECT 4
#define ASN1_NGAP_NR_MAXNOOF_MULTI_CONNECT_MINUS_ONE 3
#define ASN1_NGAP_NR_MAXNOOF_NG_CONNS_TO_RESET 65536
#define ASN1_NGAP_NR_MAXNOOF_PDU_SESSIONS 256
#define ASN1_NGAP_NR_MAXNOOF_PLMNS 12
#define ASN1_NGAP_NR_MAXNOOF_QOS_FLOWS 64
#define ASN1_NGAP_NR_MAXNOOF_RAN_NODEIN_AO_I 64
#define ASN1_NGAP_NR_MAXNOOF_RECOMMENDED_CELLS 16
#define ASN1_NGAP_NR_MAXNOOF_RECOMMENDED_RAN_NODES 16
#define ASN1_NGAP_NR_MAXNOOF_AO_I 64
#define ASN1_NGAP_NR_MAXNOOF_SERVED_GUAMIS 256
#define ASN1_NGAP_NR_MAXNOOF_SLICE_ITEMS 1024
#define ASN1_NGAP_NR_MAXNOOF_TACS 256
#define ASN1_NGAP_NR_MAXNOOF_TA_IFOR_INACTIVE 16
#define ASN1_NGAP_NR_MAXNOOF_TA_IFOR_PAGING 16
#define ASN1_NGAP_NR_MAXNOOF_TA_IFOR_RESTART 2048
#define ASN1_NGAP_NR_MAXNOOF_TA_IFOR_WARNING 65535
#define ASN1_NGAP_NR_MAXNOOF_TA_IIN_AO_I 16
#define ASN1_NGAP_NR_MAXNOOF_TIME_PERIODS 2
#define ASN1_NGAP_NR_MAXNOOF_TNLASSOCS 32
#define ASN1_NGAP_NR_MAXNOOF_XN_EXT_TLAS 2
#define ASN1_NGAP_NR_MAXNOOF_XN_GTP_TLAS 16
#define ASN1_NGAP_NR_MAXNOOF_XN_TLAS 16
#define ASN1_NGAP_NR_ID_ALLOWED_NSSAI 0
#define ASN1_NGAP_NR_ID_AMF_NAME 1
#define ASN1_NGAP_NR_ID_AMF_OVERLOAD_RESP 2
#define ASN1_NGAP_NR_ID_AMF_SET_ID 3
#define ASN1_NGAP_NR_ID_AMF_TNLASSOC_FAILED_TO_SETUP_LIST 4
#define ASN1_NGAP_NR_ID_AMF_TNLASSOC_SETUP_LIST 5
#define ASN1_NGAP_NR_ID_AMF_TNLASSOC_TO_ADD_LIST 6
#define ASN1_NGAP_NR_ID_AMF_TNLASSOC_TO_REM_LIST 7
#define ASN1_NGAP_NR_ID_AMF_TNLASSOC_TO_UPD_LIST 8
#define ASN1_NGAP_NR_ID_AMF_TRAFFIC_LOAD_REDUCTION_IND 9
#define ASN1_NGAP_NR_ID_AMF_UE_NGAP_ID 10
#define ASN1_NGAP_NR_ID_ASSIST_DATA_FOR_PAGING 11
#define ASN1_NGAP_NR_ID_BROADCAST_CANCELLED_AREA_LIST 12
#define ASN1_NGAP_NR_ID_BROADCAST_COMPLETED_AREA_LIST 13
#define ASN1_NGAP_NR_ID_CANCEL_ALL_WARNING_MSGS 14
#define ASN1_NGAP_NR_ID_CAUSE 15
#define ASN1_NGAP_NR_ID_CELL_ID_LIST_FOR_RESTART 16
#define ASN1_NGAP_NR_ID_CONCURRENT_WARNING_MSG_IND 17
#define ASN1_NGAP_NR_ID_CORE_NETWORK_ASSIST_INFO 18
#define ASN1_NGAP_NR_ID_CRIT_DIAGNOSTICS 19
#define ASN1_NGAP_NR_ID_DATA_CODING_SCHEME 20
#define ASN1_NGAP_NR_ID_DEFAULT_PAGING_DRX 21
#define ASN1_NGAP_NR_ID_DIRECT_FORWARDING_PATH_AVAILABILITY 22
#define ASN1_NGAP_NR_ID_EMERGENCY_AREA_ID_LIST_FOR_RESTART 23
#define ASN1_NGAP_NR_ID_EMERGENCY_FALLBACK_IND 24
#define ASN1_NGAP_NR_ID_EUTRA_CGI 25
#define ASN1_NGAP_NR_ID_FIVE_G_S_TMSI 26
#define ASN1_NGAP_NR_ID_GLOBAL_RAN_NODE_ID 27
#define ASN1_NGAP_NR_ID_GUAMI 28
#define ASN1_NGAP_NR_ID_HANDOV_TYPE 29
#define ASN1_NGAP_NR_ID_IMS_VOICE_SUPPORT_IND 30
#define ASN1_NGAP_NR_ID_IDX_TO_RFSP 31
#define ASN1_NGAP_NR_ID_INFO_ON_RECOMMENDED_CELLS_AND_RAN_NODES_FOR_PAGING 32
#define ASN1_NGAP_NR_ID_LOCATION_REPORT_REQUEST_TYPE 33
#define ASN1_NGAP_NR_ID_MASKED_IMEISV 34
#define ASN1_NGAP_NR_ID_MSG_ID 35
#define ASN1_NGAP_NR_ID_MOB_RESTRICT_LIST 36
#define ASN1_NGAP_NR_ID_NASC 37
#define ASN1_NGAP_NR_ID_NAS_PDU 38
#define ASN1_NGAP_NR_ID_NAS_SECURITY_PARAMS_FROM_NGRAN 39
#define ASN1_NGAP_NR_ID_NEW_AMF_UE_NGAP_ID 40
#define ASN1_NGAP_NR_ID_NEW_SECURITY_CONTEXT_IND 41
#define ASN1_NGAP_NR_ID_NGAP_MSG 42
#define ASN1_NGAP_NR_ID_NGRAN_CGI 43
#define ASN1_NGAP_NR_ID_NGRAN_TRACE_ID 44
#define ASN1_NGAP_NR_ID_NR_CGI 45
#define ASN1_NGAP_NR_ID_NRP_PA_PDU 46
#define ASN1_NGAP_NR_ID_NOF_BROADCASTS_REQUESTED 47
#define ASN1_NGAP_NR_ID_OLD_AMF 48
#define ASN1_NGAP_NR_ID_OVERLOAD_START_NSSAI_LIST 49
#define ASN1_NGAP_NR_ID_PAGING_DRX 50
#define ASN1_NGAP_NR_ID_PAGING_ORIGIN 51
#define ASN1_NGAP_NR_ID_PAGING_PRIO 52
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_ADMITTED_LIST 53
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_MODIFY_LIST_MOD_RES 54
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_CXT_RES 55
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_HO_ACK 56
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_PS_REQ 57
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_SU_RES 58
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_HO_LIST 59
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_LIST_CXT_REL_CPL 60
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_LIST_HO_RQD 61
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_CFM 62
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_IND 63
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_REQ 64
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_RES 65
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_NOTIFY_LIST 66
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASED_LIST_NOT 67
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASED_LIST_PS_ACK 68
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASED_LIST_PS_FAIL 69
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASED_LIST_REL_RES 70
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_CXT_REQ 71
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_CXT_RES 72
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_HO_REQ 73
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ 74
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_SU_RES 75
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_TO_BE_SWITCHED_DL_LIST 76
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SWITCHED_LIST 77
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_TO_RELEASE_LIST_HO_CMD 78
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_TO_RELEASE_LIST_REL_CMD 79
#define ASN1_NGAP_NR_ID_PLMN_SUPPORT_LIST 80
#define ASN1_NGAP_NR_ID_PWS_FAILED_CELL_ID_LIST 81
#define ASN1_NGAP_NR_ID_RAN_NODE_NAME 82
#define ASN1_NGAP_NR_ID_RAN_PAGING_PRIO 83
#define ASN1_NGAP_NR_ID_RAN_STATUS_TRANSFER_TRANSPARENT_CONTAINER 84
#define ASN1_NGAP_NR_ID_RAN_UE_NGAP_ID 85
#define ASN1_NGAP_NR_ID_RELATIVE_AMF_CAPACITY 86
#define ASN1_NGAP_NR_ID_REPEAT_PERIOD 87
#define ASN1_NGAP_NR_ID_RESET_TYPE 88
#define ASN1_NGAP_NR_ID_ROUTING_ID 89
#define ASN1_NGAP_NR_ID_RRCESTABLISHMENT_CAUSE 90
#define ASN1_NGAP_NR_ID_RRC_INACTIVE_TRANSITION_REPORT_REQUEST 91
#define ASN1_NGAP_NR_ID_RRC_STATE 92
#define ASN1_NGAP_NR_ID_SECURITY_CONTEXT 93
#define ASN1_NGAP_NR_ID_SECURITY_KEY 94
#define ASN1_NGAP_NR_ID_SERIAL_NUM 95
#define ASN1_NGAP_NR_ID_SERVED_GUAMI_LIST 96
#define ASN1_NGAP_NR_ID_SLICE_SUPPORT_LIST 97
#define ASN1_NGAP_NR_ID_SON_CFG_TRANSFER_DL 98
#define ASN1_NGAP_NR_ID_SON_CFG_TRANSFER_UL 99
#define ASN1_NGAP_NR_ID_SOURCE_AMF_UE_NGAP_ID 100
#define ASN1_NGAP_NR_ID_SOURCE_TO_TARGET_TRANSPARENT_CONTAINER 101
#define ASN1_NGAP_NR_ID_SUPPORTED_TA_LIST 102
#define ASN1_NGAP_NR_ID_TAI_LIST_FOR_PAGING 103
#define ASN1_NGAP_NR_ID_TAI_LIST_FOR_RESTART 104
#define ASN1_NGAP_NR_ID_TARGET_ID 105
#define ASN1_NGAP_NR_ID_TARGET_TO_SOURCE_TRANSPARENT_CONTAINER 106
#define ASN1_NGAP_NR_ID_TIME_TO_WAIT 107
#define ASN1_NGAP_NR_ID_TRACE_ACTIVATION 108
#define ASN1_NGAP_NR_ID_TRACE_COLLECTION_ENTITY_IP_ADDRESS 109
#define ASN1_NGAP_NR_ID_UE_AGGREGATE_MAXIMUM_BIT_RATE 110
#define ASN1_NGAP_NR_ID_UE_ASSOCIATED_LC_NG_CONN_LIST 111
#define ASN1_NGAP_NR_ID_UE_CONTEXT_REQUEST 112
#define ASN1_NGAP_NR_ID_UE_NGAP_IDS 114
#define ASN1_NGAP_NR_ID_UE_PAGING_ID 115
#define ASN1_NGAP_NR_ID_UE_PRESENCE_IN_AREA_OF_INTEREST_LIST 116
#define ASN1_NGAP_NR_ID_UE_RADIO_CAP 117
#define ASN1_NGAP_NR_ID_UE_RADIO_CAP_FOR_PAGING 118
#define ASN1_NGAP_NR_ID_UE_SECURITY_CAP 119
#define ASN1_NGAP_NR_ID_UNAVAILABLE_GUAMI_LIST 120
#define ASN1_NGAP_NR_ID_USER_LOCATION_INFO 121
#define ASN1_NGAP_NR_ID_WARNING_AREA_LIST 122
#define ASN1_NGAP_NR_ID_WARNING_MSG_CONTENTS 123
#define ASN1_NGAP_NR_ID_WARNING_SECURITY_INFO 124
#define ASN1_NGAP_NR_ID_WARNING_TYPE 125
#define ASN1_NGAP_NR_ID_ADD_UL_NGU_UP_TNL_INFO 126
#define ASN1_NGAP_NR_ID_DATA_FORWARDING_NOT_POSSIBLE 127
#define ASN1_NGAP_NR_ID_DL_NGU_UP_TNL_INFO 128
#define ASN1_NGAP_NR_ID_NETWORK_INSTANCE 129
#define ASN1_NGAP_NR_ID_PDU_SESSION_AGGREGATE_MAXIMUM_BIT_RATE 130
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_MODIFY_LIST_MOD_CFM 131
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_CXT_FAIL 132
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_LIST_CXT_REL_REQ 133
#define ASN1_NGAP_NR_ID_PDU_SESSION_TYPE 134
#define ASN1_NGAP_NR_ID_QOS_FLOW_ADD_OR_MODIFY_REQUEST_LIST 135
#define ASN1_NGAP_NR_ID_QOS_FLOW_SETUP_REQUEST_LIST 136
#define ASN1_NGAP_NR_ID_QOS_FLOW_TO_RELEASE_LIST 137
#define ASN1_NGAP_NR_ID_SECURITY_IND 138
#define ASN1_NGAP_NR_ID_UL_NGU_UP_TNL_INFO 139
#define ASN1_NGAP_NR_ID_UL_NGU_UP_TNL_MODIFY_LIST 140
#define ASN1_NGAP_NR_ID_WARNING_AREA_COORDINATES 141
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_SECONDARY_RATUSAGE_LIST 142
#define ASN1_NGAP_NR_ID_HO_FLAG 143
#define ASN1_NGAP_NR_ID_SECONDARY_RATUSAGE_INFO 144
#define ASN1_NGAP_NR_ID_PDU_SESSION_RES_RELEASE_RESP_TRANSFER 145
#define ASN1_NGAP_NR_ID_REDIRECTION_VOICE_FALLBACK 146
#define ASN1_NGAP_NR_ID_UE_RETENTION_INFO 147
#define ASN1_NGAP_NR_ID_S_NSSAI 148
#define ASN1_NGAP_NR_ID_PS_CELL_INFO 149
#define ASN1_NGAP_NR_ID_LAST_EUTRAN_PLMN_ID 150
#define ASN1_NGAP_NR_ID_MAXIMUM_INTEGRITY_PROTECTED_DATA_RATE_DL 151
#define ASN1_NGAP_NR_ID_ADD_DL_FORWARDING_UPTNL_INFO 152
#define ASN1_NGAP_NR_ID_ADD_DLUPTNL_INFO_FOR_HO_LIST 153
#define ASN1_NGAP_NR_ID_ADD_NGU_UP_TNL_INFO 154
#define ASN1_NGAP_NR_ID_ADD_DL_QOS_FLOW_PER_TNL_INFO 155
#define ASN1_NGAP_NR_ID_SECURITY_RESULT 156
#define ASN1_NGAP_NR_ID_ENDC_SON_CFG_TRANSFER_DL 157
#define ASN1_NGAP_NR_ID_ENDC_SON_CFG_TRANSFER_UL 158
#define ASN1_NGAP_ID_AMF_CFG_UPD 0
#define ASN1_NGAP_ID_AMF_STATUS_IND 1
#define ASN1_NGAP_ID_CELL_TRAFFIC_TRACE 2
#define ASN1_NGAP_ID_DEACTIV_TRACE 3
#define ASN1_NGAP_ID_DL_NAS_TRANSPORT 4
#define ASN1_NGAP_ID_DL_NON_UEASSOCIATED_NRP_PA_TRANSPORT 5
#define ASN1_NGAP_ID_DL_RAN_CFG_TRANSFER 6
#define ASN1_NGAP_ID_DL_RAN_STATUS_TRANSFER 7
#define ASN1_NGAP_ID_DL_UEASSOCIATED_NRP_PA_TRANSPORT 8
#define ASN1_NGAP_ID_ERROR_IND 9
#define ASN1_NGAP_ID_HO_CANCEL 10
#define ASN1_NGAP_ID_HO_NOTIF 11
#define ASN1_NGAP_ID_HO_PREP 12
#define ASN1_NGAP_ID_HO_RES_ALLOC 13
#define ASN1_NGAP_ID_INIT_CONTEXT_SETUP 14
#define ASN1_NGAP_ID_INIT_UE_MSG 15
#define ASN1_NGAP_ID_LOCATION_REPORT_CTRL 16
#define ASN1_NGAP_ID_LOCATION_REPORT_FAIL_IND 17
#define ASN1_NGAP_ID_LOCATION_REPORT 18
#define ASN1_NGAP_ID_NAS_NON_DELIVERY_IND 19
#define ASN1_NGAP_ID_NG_RESET 20
#define ASN1_NGAP_ID_NG_SETUP 21
#define ASN1_NGAP_ID_OVERLOAD_START 22
#define ASN1_NGAP_ID_OVERLOAD_STOP 23
#define ASN1_NGAP_ID_PAGING 24
#define ASN1_NGAP_ID_PATH_SWITCH_REQUEST 25
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY 26
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY_IND 27
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASE 28
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP 29
#define ASN1_NGAP_ID_PDU_SESSION_RES_NOTIFY 30
#define ASN1_NGAP_ID_PRIVATE_MSG 31
#define ASN1_NGAP_ID_PWS_CANCEL 32
#define ASN1_NGAP_ID_PWS_FAIL_IND 33
#define ASN1_NGAP_ID_PWS_RESTART_IND 34
#define ASN1_NGAP_ID_RAN_CFG_UPD 35
#define ASN1_NGAP_ID_REROUTE_NAS_REQUEST 36
#define ASN1_NGAP_ID_RRC_INACTIVE_TRANSITION_REPORT 37
#define ASN1_NGAP_ID_TRACE_FAIL_IND 38
#define ASN1_NGAP_ID_TRACE_START 39
#define ASN1_NGAP_ID_UE_CONTEXT_MOD 40
#define ASN1_NGAP_ID_UE_CONTEXT_RELEASE 41
#define ASN1_NGAP_ID_UE_CONTEXT_RELEASE_REQUEST 42
#define ASN1_NGAP_ID_UE_RADIO_CAP_CHECK 43
#define ASN1_NGAP_ID_UE_RADIO_CAP_INFO_IND 44
#define ASN1_NGAP_ID_UETNLA_BINDING_RELEASE 45
#define ASN1_NGAP_ID_UL_NAS_TRANSPORT 46
#define ASN1_NGAP_ID_UL_NON_UEASSOCIATED_NRP_PA_TRANSPORT 47
#define ASN1_NGAP_ID_UL_RAN_CFG_TRANSFER 48
#define ASN1_NGAP_ID_UL_RAN_STATUS_TRANSFER 49
#define ASN1_NGAP_ID_UL_UEASSOCIATED_NRP_PA_TRANSPORT 50
#define ASN1_NGAP_ID_WRITE_REPLACE_WARNING 51
#define ASN1_NGAP_ID_SECONDARY_RAT_DATA_USAGE_REPORT 52
#define ASN1_NGAP_MAX_PRIVATE_IES 65535
#define ASN1_NGAP_MAX_PROTOCOL_EXTS 65535
#define ASN1_NGAP_MAX_PROTOCOL_IES 65535
#define ASN1_NGAP_MAXNOOF_ALLOWED_AREAS 16
#define ASN1_NGAP_MAXNOOF_ALLOWED_S_NSSAIS 8
#define ASN1_NGAP_MAXNOOF_BPLMNS 12
#define ASN1_NGAP_MAXNOOF_CELL_IDFOR_WARNING 65535
#define ASN1_NGAP_MAXNOOF_CELLIN_AO_I 256
#define ASN1_NGAP_MAXNOOF_CELLIN_EAI 65535
#define ASN1_NGAP_MAXNOOF_CELLIN_TAI 65535
#define ASN1_NGAP_MAXNOOF_CELLSING_NB 16384
#define ASN1_NGAP_MAXNOOF_CELLSINNGENB 256
#define ASN1_NGAP_MAXNOOF_CELLSIN_UE_HISTORY_INFO 16
#define ASN1_NGAP_MAXNOOF_CELLS_UE_MOVING_TRAJECTORY 16
#define ASN1_NGAP_MAXNOOF_DRBS 32
#define ASN1_NGAP_MAXNOOF_EMERGENCY_AREA_ID 65535
#define ASN1_NGAP_MAXNOOF_EA_IFOR_RESTART 256
#define ASN1_NGAP_MAXNOOF_EPLMNS 15
#define ASN1_NGAP_MAXNOOF_EPLMNS_PLUS_ONE 16
#define ASN1_NGAP_MAXNOOF_ERABS 256
#define ASN1_NGAP_MAXNOOF_ERRORS 256
#define ASN1_NGAP_MAXNOOF_FORB_TACS 4096
#define ASN1_NGAP_MAXNOOF_MULTI_CONNECT 4
#define ASN1_NGAP_MAXNOOF_MULTI_CONNECT_MINUS_ONE 3
#define ASN1_NGAP_MAXNOOF_NG_CONNS_TO_RESET 65536
#define ASN1_NGAP_MAXNOOF_PDU_SESSIONS 256
#define ASN1_NGAP_MAXNOOF_PLMNS 12
#define ASN1_NGAP_MAXNOOF_QOS_FLOWS 64
#define ASN1_NGAP_MAXNOOF_RAN_NODEIN_AO_I 64
#define ASN1_NGAP_MAXNOOF_RECOMMENDED_CELLS 16
#define ASN1_NGAP_MAXNOOF_RECOMMENDED_RAN_NODES 16
#define ASN1_NGAP_MAXNOOF_AO_I 64
#define ASN1_NGAP_MAXNOOF_SERVED_GUAMIS 256
#define ASN1_NGAP_MAXNOOF_SLICE_ITEMS 1024
#define ASN1_NGAP_MAXNOOF_TACS 256
#define ASN1_NGAP_MAXNOOF_TA_IFOR_INACTIVE 16
#define ASN1_NGAP_MAXNOOF_TA_IFOR_PAGING 16
#define ASN1_NGAP_MAXNOOF_TA_IFOR_RESTART 2048
#define ASN1_NGAP_MAXNOOF_TA_IFOR_WARNING 65535
#define ASN1_NGAP_MAXNOOF_TA_IIN_AO_I 16
#define ASN1_NGAP_MAXNOOF_TIME_PERIODS 2
#define ASN1_NGAP_MAXNOOF_TNLASSOCS 32
#define ASN1_NGAP_MAXNOOF_XN_EXT_TLAS 2
#define ASN1_NGAP_MAXNOOF_XN_GTP_TLAS 16
#define ASN1_NGAP_MAXNOOF_XN_TLAS 16
#define ASN1_NGAP_ID_ALLOWED_NSSAI 0
#define ASN1_NGAP_ID_AMF_NAME 1
#define ASN1_NGAP_ID_AMF_OVERLOAD_RESP 2
#define ASN1_NGAP_ID_AMF_SET_ID 3
#define ASN1_NGAP_ID_AMF_TNLASSOC_FAILED_TO_SETUP_LIST 4
#define ASN1_NGAP_ID_AMF_TNLASSOC_SETUP_LIST 5
#define ASN1_NGAP_ID_AMF_TNLASSOC_TO_ADD_LIST 6
#define ASN1_NGAP_ID_AMF_TNLASSOC_TO_REM_LIST 7
#define ASN1_NGAP_ID_AMF_TNLASSOC_TO_UPD_LIST 8
#define ASN1_NGAP_ID_AMF_TRAFFIC_LOAD_REDUCTION_IND 9
#define ASN1_NGAP_ID_AMF_UE_NGAP_ID 10
#define ASN1_NGAP_ID_ASSIST_DATA_FOR_PAGING 11
#define ASN1_NGAP_ID_BROADCAST_CANCELLED_AREA_LIST 12
#define ASN1_NGAP_ID_BROADCAST_COMPLETED_AREA_LIST 13
#define ASN1_NGAP_ID_CANCEL_ALL_WARNING_MSGS 14
#define ASN1_NGAP_ID_CAUSE 15
#define ASN1_NGAP_ID_CELL_ID_LIST_FOR_RESTART 16
#define ASN1_NGAP_ID_CONCURRENT_WARNING_MSG_IND 17
#define ASN1_NGAP_ID_CORE_NETWORK_ASSIST_INFO 18
#define ASN1_NGAP_ID_CRIT_DIAGNOSTICS 19
#define ASN1_NGAP_ID_DATA_CODING_SCHEME 20
#define ASN1_NGAP_ID_DEFAULT_PAGING_DRX 21
#define ASN1_NGAP_ID_DIRECT_FORWARDING_PATH_AVAILABILITY 22
#define ASN1_NGAP_ID_EMERGENCY_AREA_ID_LIST_FOR_RESTART 23
#define ASN1_NGAP_ID_EMERGENCY_FALLBACK_IND 24
#define ASN1_NGAP_ID_EUTRA_CGI 25
#define ASN1_NGAP_ID_FIVE_G_S_TMSI 26
#define ASN1_NGAP_ID_GLOBAL_RAN_NODE_ID 27
#define ASN1_NGAP_ID_GUAMI 28
#define ASN1_NGAP_ID_HANDOV_TYPE 29
#define ASN1_NGAP_ID_IMS_VOICE_SUPPORT_IND 30
#define ASN1_NGAP_ID_IDX_TO_RFSP 31
#define ASN1_NGAP_ID_INFO_ON_RECOMMENDED_CELLS_AND_RAN_NODES_FOR_PAGING 32
#define ASN1_NGAP_ID_LOCATION_REPORT_REQUEST_TYPE 33
#define ASN1_NGAP_ID_MASKED_IMEISV 34
#define ASN1_NGAP_ID_MSG_ID 35
#define ASN1_NGAP_ID_MOB_RESTRICT_LIST 36
#define ASN1_NGAP_ID_NASC 37
#define ASN1_NGAP_ID_NAS_PDU 38
#define ASN1_NGAP_ID_NAS_SECURITY_PARAMS_FROM_NGRAN 39
#define ASN1_NGAP_ID_NEW_AMF_UE_NGAP_ID 40
#define ASN1_NGAP_ID_NEW_SECURITY_CONTEXT_IND 41
#define ASN1_NGAP_ID_NGAP_MSG 42
#define ASN1_NGAP_ID_NGRAN_CGI 43
#define ASN1_NGAP_ID_NGRAN_TRACE_ID 44
#define ASN1_NGAP_ID_NR_CGI 45
#define ASN1_NGAP_ID_NRP_PA_PDU 46
#define ASN1_NGAP_ID_NOF_BROADCASTS_REQUESTED 47
#define ASN1_NGAP_ID_OLD_AMF 48
#define ASN1_NGAP_ID_OVERLOAD_START_NSSAI_LIST 49
#define ASN1_NGAP_ID_PAGING_DRX 50
#define ASN1_NGAP_ID_PAGING_ORIGIN 51
#define ASN1_NGAP_ID_PAGING_PRIO 52
#define ASN1_NGAP_ID_PDU_SESSION_RES_ADMITTED_LIST 53
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_MODIFY_LIST_MOD_RES 54
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_CXT_RES 55
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_HO_ACK 56
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_PS_REQ 57
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_SU_RES 58
#define ASN1_NGAP_ID_PDU_SESSION_RES_HO_LIST 59
#define ASN1_NGAP_ID_PDU_SESSION_RES_LIST_CXT_REL_CPL 60
#define ASN1_NGAP_ID_PDU_SESSION_RES_LIST_HO_RQD 61
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_CFM 62
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_IND 63
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_REQ 64
#define ASN1_NGAP_ID_PDU_SESSION_RES_MODIFY_LIST_MOD_RES 65
#define ASN1_NGAP_ID_PDU_SESSION_RES_NOTIFY_LIST 66
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASED_LIST_NOT 67
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASED_LIST_PS_ACK 68
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASED_LIST_PS_FAIL 69
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASED_LIST_REL_RES 70
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_CXT_REQ 71
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_CXT_RES 72
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_HO_REQ 73
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ 74
#define ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_SU_RES 75
#define ASN1_NGAP_ID_PDU_SESSION_RES_TO_BE_SWITCHED_DL_LIST 76
#define ASN1_NGAP_ID_PDU_SESSION_RES_SWITCHED_LIST 77
#define ASN1_NGAP_ID_PDU_SESSION_RES_TO_RELEASE_LIST_HO_CMD 78
#define ASN1_NGAP_ID_PDU_SESSION_RES_TO_RELEASE_LIST_REL_CMD 79
#define ASN1_NGAP_ID_PLMN_SUPPORT_LIST 80
#define ASN1_NGAP_ID_PWS_FAILED_CELL_ID_LIST 81
#define ASN1_NGAP_ID_RAN_NODE_NAME 82
#define ASN1_NGAP_ID_RAN_PAGING_PRIO 83
#define ASN1_NGAP_ID_RAN_STATUS_TRANSFER_TRANSPARENT_CONTAINER 84
#define ASN1_NGAP_ID_RAN_UE_NGAP_ID 85
#define ASN1_NGAP_ID_RELATIVE_AMF_CAPACITY 86
#define ASN1_NGAP_ID_REPEAT_PERIOD 87
#define ASN1_NGAP_ID_RESET_TYPE 88
#define ASN1_NGAP_ID_ROUTING_ID 89
#define ASN1_NGAP_ID_RRCESTABLISHMENT_CAUSE 90
#define ASN1_NGAP_ID_RRC_INACTIVE_TRANSITION_REPORT_REQUEST 91
#define ASN1_NGAP_ID_RRC_STATE 92
#define ASN1_NGAP_ID_SECURITY_CONTEXT 93
#define ASN1_NGAP_ID_SECURITY_KEY 94
#define ASN1_NGAP_ID_SERIAL_NUM 95
#define ASN1_NGAP_ID_SERVED_GUAMI_LIST 96
#define ASN1_NGAP_ID_SLICE_SUPPORT_LIST 97
#define ASN1_NGAP_ID_SON_CFG_TRANSFER_DL 98
#define ASN1_NGAP_ID_SON_CFG_TRANSFER_UL 99
#define ASN1_NGAP_ID_SOURCE_AMF_UE_NGAP_ID 100
#define ASN1_NGAP_ID_SOURCE_TO_TARGET_TRANSPARENT_CONTAINER 101
#define ASN1_NGAP_ID_SUPPORTED_TA_LIST 102
#define ASN1_NGAP_ID_TAI_LIST_FOR_PAGING 103
#define ASN1_NGAP_ID_TAI_LIST_FOR_RESTART 104
#define ASN1_NGAP_ID_TARGET_ID 105
#define ASN1_NGAP_ID_TARGET_TO_SOURCE_TRANSPARENT_CONTAINER 106
#define ASN1_NGAP_ID_TIME_TO_WAIT 107
#define ASN1_NGAP_ID_TRACE_ACTIVATION 108
#define ASN1_NGAP_ID_TRACE_COLLECTION_ENTITY_IP_ADDRESS 109
#define ASN1_NGAP_ID_UE_AGGREGATE_MAXIMUM_BIT_RATE 110
#define ASN1_NGAP_ID_UE_ASSOCIATED_LC_NG_CONN_LIST 111
#define ASN1_NGAP_ID_UE_CONTEXT_REQUEST 112
#define ASN1_NGAP_ID_UE_NGAP_IDS 114
#define ASN1_NGAP_ID_UE_PAGING_ID 115
#define ASN1_NGAP_ID_UE_PRESENCE_IN_AREA_OF_INTEREST_LIST 116
#define ASN1_NGAP_ID_UE_RADIO_CAP 117
#define ASN1_NGAP_ID_UE_RADIO_CAP_FOR_PAGING 118
#define ASN1_NGAP_ID_UE_SECURITY_CAP 119
#define ASN1_NGAP_ID_UNAVAILABLE_GUAMI_LIST 120
#define ASN1_NGAP_ID_USER_LOCATION_INFO 121
#define ASN1_NGAP_ID_WARNING_AREA_LIST 122
#define ASN1_NGAP_ID_WARNING_MSG_CONTENTS 123
#define ASN1_NGAP_ID_WARNING_SECURITY_INFO 124
#define ASN1_NGAP_ID_WARNING_TYPE 125
#define ASN1_NGAP_ID_ADD_UL_NGU_UP_TNL_INFO 126
#define ASN1_NGAP_ID_DATA_FORWARDING_NOT_POSSIBLE 127
#define ASN1_NGAP_ID_DL_NGU_UP_TNL_INFO 128
#define ASN1_NGAP_ID_NETWORK_INSTANCE 129
#define ASN1_NGAP_ID_PDU_SESSION_AGGREGATE_MAXIMUM_BIT_RATE 130
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_MODIFY_LIST_MOD_CFM 131
#define ASN1_NGAP_ID_PDU_SESSION_RES_FAILED_TO_SETUP_LIST_CXT_FAIL 132
#define ASN1_NGAP_ID_PDU_SESSION_RES_LIST_CXT_REL_REQ 133
#define ASN1_NGAP_ID_PDU_SESSION_TYPE 134
#define ASN1_NGAP_ID_QOS_FLOW_ADD_OR_MODIFY_REQUEST_LIST 135
#define ASN1_NGAP_ID_QOS_FLOW_SETUP_REQUEST_LIST 136
#define ASN1_NGAP_ID_QOS_FLOW_TO_RELEASE_LIST 137
#define ASN1_NGAP_ID_SECURITY_IND 138
#define ASN1_NGAP_ID_UL_NGU_UP_TNL_INFO 139
#define ASN1_NGAP_ID_UL_NGU_UP_TNL_MODIFY_LIST 140
#define ASN1_NGAP_ID_WARNING_AREA_COORDINATES 141
#define ASN1_NGAP_ID_PDU_SESSION_RES_SECONDARY_RATUSAGE_LIST 142
#define ASN1_NGAP_ID_HO_FLAG 143
#define ASN1_NGAP_ID_SECONDARY_RATUSAGE_INFO 144
#define ASN1_NGAP_ID_PDU_SESSION_RES_RELEASE_RESP_TRANSFER 145
#define ASN1_NGAP_ID_REDIRECTION_VOICE_FALLBACK 146
#define ASN1_NGAP_ID_UE_RETENTION_INFO 147
#define ASN1_NGAP_ID_S_NSSAI 148
#define ASN1_NGAP_ID_PS_CELL_INFO 149
#define ASN1_NGAP_ID_LAST_EUTRAN_PLMN_ID 150
#define ASN1_NGAP_ID_MAXIMUM_INTEGRITY_PROTECTED_DATA_RATE_DL 151
#define ASN1_NGAP_ID_ADD_DL_FORWARDING_UPTNL_INFO 152
#define ASN1_NGAP_ID_ADD_DLUPTNL_INFO_FOR_HO_LIST 153
#define ASN1_NGAP_ID_ADD_NGU_UP_TNL_INFO 154
#define ASN1_NGAP_ID_ADD_DL_QOS_FLOW_PER_TNL_INFO 155
#define ASN1_NGAP_ID_SECURITY_RESULT 156
#define ASN1_NGAP_ID_ENDC_SON_CFG_TRANSFER_DL 157
#define ASN1_NGAP_ID_ENDC_SON_CFG_TRANSFER_UL 158
/*******************************************************************************
* Struct Definitions
@ -15002,7 +15002,7 @@ struct target_ngran_node_to_source_ngran_node_transparent_container_s {
void to_json(json_writer& j) const;
};
} // namespace ngap_nr
} // namespace ngap
} // namespace asn1
#endif // SRSASN1_NGAP_NR_H
#endif // SRSASN1_NGAP_H

@ -29,7 +29,7 @@
***********************/
namespace asn1 {
namespace ngap_nr {
namespace ngap {
struct rrcestablishment_cause_opts;
struct cause_radio_network_opts;
using rrcestablishment_cause_e = enumerated<rrcestablishment_cause_opts, true, 1>;

@ -43,22 +43,22 @@ struct ngap_args_t {
class ngap_interface_rrc_nr
{
public:
virtual void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu) = 0;
virtual void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t m_tmsi) = 0;
virtual void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu) = 0;
virtual void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t m_tmsi) = 0;
virtual void write_pdu(uint16_t rnti, srsran::const_byte_span pdu) = 0;
virtual bool user_exists(uint16_t rnti) = 0;
virtual void user_mod(uint16_t old_rnti, uint16_t new_rnti) = 0;
virtual void user_release_request(uint16_t rnti, asn1::ngap_nr::cause_radio_network_e cause_radio) = 0;
virtual bool is_amf_connected() = 0;
virtual void ue_notify_rrc_reconf_complete(uint16_t rnti, bool outcome) = 0;
virtual void write_pdu(uint16_t rnti, srsran::const_byte_span pdu) = 0;
virtual bool user_exists(uint16_t rnti) = 0;
virtual void user_mod(uint16_t old_rnti, uint16_t new_rnti) = 0;
virtual void user_release_request(uint16_t rnti, asn1::ngap::cause_radio_network_e cause_radio) = 0;
virtual bool is_amf_connected() = 0;
virtual void ue_notify_rrc_reconf_complete(uint16_t rnti, bool outcome) = 0;
};
} // namespace srsenb

@ -29,11 +29,11 @@ namespace srsenb {
class rrc_interface_ngap_nr
{
public:
virtual int ue_set_security_cfg_key(uint16_t rnti, const asn1::fixed_bitstring<256, false, true>& key) = 0;
virtual int ue_set_bitrates(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates) = 0;
virtual int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates) = 0;
virtual int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap_nr::ue_security_cap_s& caps) = 0;
virtual int start_security_mode_procedure(uint16_t rnti, srsran::unique_byte_buffer_t nas_pdu) = 0;
virtual int ue_set_security_cfg_key(uint16_t rnti, const asn1::fixed_bitstring<256, false, true>& key) = 0;
virtual int ue_set_bitrates(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates) = 0;
virtual int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates) = 0;
virtual int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap::ue_security_cap_s& caps) = 0;
virtual int start_security_mode_procedure(uint16_t rnti, srsran::unique_byte_buffer_t nas_pdu) = 0;
virtual int
establish_rrc_bearer(uint16_t rnti, uint16_t pdu_session_id, srsran::const_byte_span nas_pdu, uint32_t lcid) = 0;
virtual int allocate_lcid(uint16_t rnti) = 0;

@ -159,4 +159,57 @@ SRSRAN_API int srsran_ra_ul_set_grant_uci_nr(const srsran_carrier_nr_t* carri
*/
SRSRAN_API uint32_t srsran_ra_nr_type1_riv(uint32_t N_rb, uint32_t start_rb, uint32_t length_rb);
/**
* @brief Returns the MCS corresponding to CQI
*
* Mapping is performed as: return the MCS that has the closest spectral efficiency to that of the CQI
*
* @remark Implements mapping based on TS 38.214, MCS Tables 5.1.3.1-1, 5.1.3.1-2, 5.1.3.1-3 and CQI Tables 5.2.2.1-2,
* Table 5.2.2.1-3, 5.2.2.1-4
* @param cqi CQI value
* @param cqi_table_idx CQI table index
* @param mcs_table MCS table parameter
* @param dci_format DCI format
* @param search_space_type Seach Space type
* @param rnti_type RNTI type
* @return The MCS index
*/
SRSRAN_API int srsran_ra_nr_cqi_to_mcs(uint8_t cqi,
srsran_csi_cqi_table_t cqi_table_idx,
srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type);
/**
* @brief Returns the Spectral Efficiency corresponding to CQI
*
* Mapping is performed as: return the MCS that has the closest spectral efficiency to that of the CQI
*
* @remark Implements mapping based on TS 38.214, CQI Tables 5.2.2.1-2, Table 5.2.2.1-3, 5.2.2.1-4
* @param cqi CQI value
* @param cqi_table_idx CQI table index
* @return The Spectral Efficiency
*/
SRSRAN_API double srsran_ra_nr_cqi_to_se(uint8_t cqi, srsran_csi_cqi_table_t cqi_table_idx);
/**
* @brief Returns the MCS corresponding to Spectral Efficiency
*
* Mapping is performed as: return the greatest MCS with an SE lower than or equal to target SE
*
* @remark Implements mapping based on TS 38.214, MCS Tables 5.1.3.1-1, 5.1.3.1-2, 5.1.3.1-3
* @param se_target Target Spectral efficiency to be mapped into MCS
* @param mcs_table MCS table parameter
* @param dci_format DCI format
* @param search_space_type Seach Space type
* @param rnti_type RNTI type
* @return The MCS index
*/
SRSRAN_API int srsran_ra_nr_se_to_mcs(double se_target,
srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type);
#endif // SRSRAN_RA_NR_H

@ -205,35 +205,35 @@ SRSASN_CODE unpack_bits(T& val, Ptr& ptr, uint8_t& offset, const uint8_t* max_pt
}
template SRSASN_CODE
unpack_bits<bool, uint8_t*>(bool& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
unpack_bits<bool, uint8_t*>(bool& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
template SRSASN_CODE unpack_bits<bool, const uint8_t*>(bool& val,
const uint8_t*& ptr,
uint8_t& offset,
const uint8_t* max_ptr,
uint32_t n_bits);
template SRSASN_CODE
unpack_bits<uint8_t, uint8_t*>(uint8_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
unpack_bits<uint8_t, uint8_t*>(uint8_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
template SRSASN_CODE unpack_bits<uint8_t, const uint8_t*>(uint8_t& val,
const uint8_t*& ptr,
uint8_t& offset,
const uint8_t* max_ptr,
uint32_t n_bits);
template SRSASN_CODE
unpack_bits<uint16_t, uint8_t*>(uint16_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
unpack_bits<uint16_t, uint8_t*>(uint16_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
template SRSASN_CODE unpack_bits<uint16_t, const uint8_t*>(uint16_t& val,
const uint8_t*& ptr,
uint8_t& offset,
const uint8_t* max_ptr,
uint32_t n_bits);
template SRSASN_CODE
unpack_bits<uint32_t, uint8_t*>(uint32_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
unpack_bits<uint32_t, uint8_t*>(uint32_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
template SRSASN_CODE unpack_bits<uint32_t, const uint8_t*>(uint32_t& val,
const uint8_t*& ptr,
uint8_t& offset,
const uint8_t* max_ptr,
uint32_t n_bits);
template SRSASN_CODE
unpack_bits<uint64_t, uint8_t*>(uint64_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
unpack_bits<uint64_t, uint8_t*>(uint64_t& val, uint8_t*& ptr, uint8_t& offset, const uint8_t* max_ptr, uint32_t n_bits);
template SRSASN_CODE unpack_bits<uint64_t, const uint8_t*>(uint64_t& val,
const uint8_t*& ptr,
uint8_t& offset,
@ -849,7 +849,7 @@ pack_integer<uint16_t>(bit_ref& bref, uint16_t n, uint16_t lb, uint16_t ub, bool
template SRSASN_CODE
pack_integer<uint32_t>(bit_ref& bref, uint32_t n, uint32_t lb, uint32_t ub, bool has_ext, bool aligned);
template SRSASN_CODE
pack_integer<uint64_t>(bit_ref& bref, uint64_t n, uint64_t lb, uint64_t ub, bool has_ext, bool aligned);
pack_integer<uint64_t>(bit_ref& bref, uint64_t n, uint64_t lb, uint64_t ub, bool has_ext, bool aligned);
template SRSASN_CODE pack_integer<int8_t>(bit_ref& bref, int8_t n, int8_t lb, int8_t ub, bool has_ext, bool aligned);
template SRSASN_CODE
pack_integer<int16_t>(bit_ref& bref, int16_t n, int16_t lb, int16_t ub, bool has_ext, bool aligned);

@ -23,7 +23,7 @@
#include <sstream>
using namespace asn1;
using namespace asn1::ngap_nr;
using namespace asn1::ngap;
/*******************************************************************************
* Struct Methods
@ -1314,7 +1314,7 @@ void protocol_ie_container_item_s<valueT_>::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<amf_cfg_upd_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<amf_cfg_upd_ies_o>;
amf_cfg_upd_ies_container::amf_cfg_upd_ies_container() :
amf_name(1, crit_e::reject),
@ -2216,7 +2216,7 @@ const char* amf_cfg_upd_ack_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "amf_cfg_upd_ack_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<amf_cfg_upd_ack_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<amf_cfg_upd_ack_ies_o>;
amf_cfg_upd_ack_ies_container::amf_cfg_upd_ack_ies_container() :
amf_tnlassoc_setup_list(5, crit_e::ignore),
@ -2566,7 +2566,7 @@ const char* amf_cfg_upd_fail_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "amf_cfg_upd_fail_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<amf_cfg_upd_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<amf_cfg_upd_fail_ies_o>;
amf_cfg_upd_fail_ies_container::amf_cfg_upd_fail_ies_container() :
cause(15, crit_e::ignore), time_to_wait(107, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -6945,7 +6945,7 @@ const char* cell_traffic_trace_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 5, value, "cell_traffic_trace_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<cell_traffic_trace_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<cell_traffic_trace_ies_o>;
cell_traffic_trace_ies_container::cell_traffic_trace_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -8482,7 +8482,7 @@ const char* deactiv_trace_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "deactiv_trace_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<deactiv_trace_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<deactiv_trace_ies_o>;
deactiv_trace_ies_container::deactiv_trace_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), ngran_trace_id(44, crit_e::ignore)
@ -9382,7 +9382,7 @@ const char* dl_nas_transport_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 9, value, "dl_nas_transport_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<dl_nas_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<dl_nas_transport_ies_o>;
dl_nas_transport_ies_container::dl_nas_transport_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -9767,7 +9767,7 @@ const char* dl_non_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_
return convert_enum_idx(options, 2, value, "dl_non_ueassociated_nrp_pa_transport_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<dl_non_ueassociated_nrp_pa_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<dl_non_ueassociated_nrp_pa_transport_ies_o>;
dl_non_ueassociated_nrp_pa_transport_ies_container::dl_non_ueassociated_nrp_pa_transport_ies_container() :
routing_id(89, crit_e::reject), nrp_pa_pdu(46, crit_e::reject)
@ -10513,7 +10513,7 @@ const char* dl_ran_cfg_transfer_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 2, value, "dl_ran_cfg_transfer_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<dl_ran_cfg_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<dl_ran_cfg_transfer_ies_o>;
dl_ran_cfg_transfer_ies_container::dl_ran_cfg_transfer_ies_container() :
son_cfg_transfer_dl(98, crit_e::ignore), endc_son_cfg_transfer_dl(157, crit_e::ignore)
@ -10873,7 +10873,7 @@ const char* dl_ran_status_transfer_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "dl_ran_status_transfer_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<dl_ran_status_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<dl_ran_status_transfer_ies_o>;
dl_ran_status_transfer_ies_container::dl_ran_status_transfer_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -11235,7 +11235,7 @@ const char* dl_ueassociated_nrp_pa_transport_ies_o::value_c::types_opts::to_stri
return convert_enum_idx(options, 4, value, "dl_ueassociated_nrp_pa_transport_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<dl_ueassociated_nrp_pa_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<dl_ueassociated_nrp_pa_transport_ies_o>;
dl_ueassociated_nrp_pa_transport_ies_container::dl_ueassociated_nrp_pa_transport_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -11900,7 +11900,7 @@ const char* error_ind_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 4, value, "error_ind_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<error_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<error_ind_ies_o>;
error_ind_ies_container::error_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -12374,7 +12374,7 @@ const char* ho_cancel_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "ho_cancel_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_cancel_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_cancel_ies_o>;
ho_cancel_ies_container::ho_cancel_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), cause(15, crit_e::ignore)
@ -12695,7 +12695,7 @@ const char* ho_cancel_ack_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "ho_cancel_ack_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_cancel_ack_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_cancel_ack_ies_o>;
ho_cancel_ack_ies_container::ho_cancel_ack_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore), ran_ue_ngap_id(85, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -13307,7 +13307,7 @@ const char* ho_cmd_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 8, value, "ho_cmd_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_cmd_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_cmd_ies_o>;
ho_cmd_ies_container::ho_cmd_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -13961,7 +13961,7 @@ uint8_t ho_fail_ies_o::value_c::types_opts::to_number() const
return map_enum_number(options, 1, value, "ho_fail_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_fail_ies_o>;
ho_fail_ies_container::ho_fail_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore), cause(15, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -14629,7 +14629,7 @@ const char* ho_notify_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 3, value, "ho_notify_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_notify_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_notify_ies_o>;
ho_notify_ies_container::ho_notify_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), user_location_info(121, crit_e::ignore)
@ -14990,7 +14990,7 @@ const char* ho_prep_fail_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 4, value, "ho_prep_fail_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_prep_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_prep_fail_ies_o>;
ho_prep_fail_ies_container::ho_prep_fail_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -16298,7 +16298,7 @@ uint8_t ho_request_ies_o::value_c::types_opts::to_number() const
return 0;
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_request_ies_o>;
ho_request_ies_container::ho_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -17033,7 +17033,7 @@ const char* ho_request_ack_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 6, value, "ho_request_ack_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_request_ack_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_request_ack_ies_o>;
ho_request_ack_ies_container::ho_request_ack_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -18095,7 +18095,7 @@ const char* ho_required_ies_o::value_c::types_opts::to_string() const
return convert_enum_idx(options, 8, value, "ho_required_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<ho_required_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ho_required_ies_o>;
ho_required_ies_container::ho_required_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -18811,7 +18811,7 @@ const char* init_context_setup_fail_ies_o::value_c::types_opts::to_string() cons
return convert_enum_idx(options, 5, value, "init_context_setup_fail_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<init_context_setup_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<init_context_setup_fail_ies_o>;
init_context_setup_fail_ies_container::init_context_setup_fail_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -19947,7 +19947,7 @@ const char* init_context_setup_request_ies_o::value_c::types_opts::to_string() c
return convert_enum_idx(options, 20, value, "init_context_setup_request_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<init_context_setup_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<init_context_setup_request_ies_o>;
init_context_setup_request_ies_container::init_context_setup_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -20680,7 +20680,7 @@ const char* init_context_setup_resp_ies_o::value_c::types_opts::to_string() cons
return convert_enum_idx(options, 5, value, "init_context_setup_resp_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<init_context_setup_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<init_context_setup_resp_ies_o>;
init_context_setup_resp_ies_container::init_context_setup_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -21265,7 +21265,7 @@ uint8_t init_ue_msg_ies_o::value_c::types_opts::to_number() const
return map_enum_number(options, 1, value, "init_ue_msg_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<init_ue_msg_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<init_ue_msg_ies_o>;
init_ue_msg_ies_container::init_ue_msg_ies_container() :
ran_ue_ngap_id(85, crit_e::reject),
@ -38799,7 +38799,7 @@ const char* write_replace_warning_resp_ies_o::value_c::types_opts::to_string() c
return convert_enum_idx(options, 4, value, "write_replace_warning_resp_ies_o::value_c::types");
}
template struct asn1::ngap_nr::protocol_ie_field_s<location_report_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<location_report_ies_o>;
location_report_ies_container::location_report_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -38933,7 +38933,7 @@ void location_report_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<location_report_ctrl_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<location_report_ctrl_ies_o>;
location_report_ctrl_ies_container::location_report_ctrl_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -39027,7 +39027,7 @@ void location_report_ctrl_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<location_report_fail_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<location_report_fail_ind_ies_o>;
location_report_fail_ind_ies_container::location_report_fail_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), cause(15, crit_e::ignore)
@ -39119,7 +39119,7 @@ void location_report_fail_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<nas_non_delivery_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<nas_non_delivery_ind_ies_o>;
nas_non_delivery_ind_ies_container::nas_non_delivery_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -39223,7 +39223,7 @@ void nas_non_delivery_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ng_reset_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ng_reset_ies_o>;
ng_reset_ies_container::ng_reset_ies_container() : cause(15, crit_e::ignore), reset_type(88, crit_e::reject) {}
SRSASN_CODE ng_reset_ies_container::pack(bit_ref& bref) const
@ -39304,7 +39304,7 @@ void ng_reset_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ng_reset_ack_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ng_reset_ack_ies_o>;
ng_reset_ack_ies_container::ng_reset_ack_ies_container() :
ue_associated_lc_ng_conn_list(111, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -39391,7 +39391,7 @@ void ng_reset_ack_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ng_setup_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ng_setup_fail_ies_o>;
ng_setup_fail_ies_container::ng_setup_fail_ies_container() :
cause(15, crit_e::ignore), time_to_wait(107, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -39493,7 +39493,7 @@ void ng_setup_fail_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ng_setup_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ng_setup_request_ies_o>;
ng_setup_request_ies_container::ng_setup_request_ies_container() :
global_ran_node_id(27, crit_e::reject),
@ -39617,7 +39617,7 @@ void ng_setup_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ng_setup_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ng_setup_resp_ies_o>;
ng_setup_resp_ies_container::ng_setup_resp_ies_container() :
amf_name(1, crit_e::reject),
@ -39751,7 +39751,7 @@ void ng_setup_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<overload_start_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<overload_start_ies_o>;
overload_start_ies_container::overload_start_ies_container() :
amf_overload_resp(2, crit_e::reject),
@ -39899,7 +39899,7 @@ void overload_stop_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_modify_confirm_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_modify_confirm_ies_o>;
pdu_session_res_modify_confirm_ies_container::pdu_session_res_modify_confirm_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -40023,7 +40023,7 @@ void pdu_session_res_modify_confirm_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_modify_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_modify_ind_ies_o>;
pdu_session_res_modify_ind_ies_container::pdu_session_res_modify_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -40117,7 +40117,7 @@ void pdu_session_res_modify_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_modify_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_modify_request_ies_o>;
pdu_session_res_modify_request_ies_container::pdu_session_res_modify_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -40226,7 +40226,7 @@ void pdu_session_res_modify_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_modify_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_modify_resp_ies_o>;
pdu_session_res_modify_resp_ies_container::pdu_session_res_modify_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -40370,7 +40370,7 @@ void pdu_session_res_modify_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_notify_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_notify_ies_o>;
pdu_session_res_notify_ies_container::pdu_session_res_notify_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -40499,7 +40499,7 @@ void pdu_session_res_notify_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_release_cmd_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_release_cmd_ies_o>;
pdu_session_res_release_cmd_ies_container::pdu_session_res_release_cmd_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -40623,7 +40623,7 @@ void pdu_session_res_release_cmd_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_release_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_release_resp_ies_o>;
pdu_session_res_release_resp_ies_container::pdu_session_res_release_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -40747,7 +40747,7 @@ void pdu_session_res_release_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_setup_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_setup_request_ies_o>;
pdu_session_res_setup_request_ies_container::pdu_session_res_setup_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -40886,7 +40886,7 @@ void pdu_session_res_setup_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_setup_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_setup_resp_ies_o>;
pdu_session_res_setup_resp_ies_container::pdu_session_res_setup_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -41015,7 +41015,7 @@ void pdu_session_res_setup_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pws_cancel_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pws_cancel_request_ies_o>;
pws_cancel_request_ies_container::pws_cancel_request_ies_container() :
msg_id(35, crit_e::reject),
@ -41129,7 +41129,7 @@ void pws_cancel_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pws_cancel_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pws_cancel_resp_ies_o>;
pws_cancel_resp_ies_container::pws_cancel_resp_ies_container() :
msg_id(35, crit_e::reject),
@ -41243,7 +41243,7 @@ void pws_cancel_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pws_fail_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pws_fail_ind_ies_o>;
pws_fail_ind_ies_container::pws_fail_ind_ies_container() :
pws_failed_cell_id_list(81, crit_e::reject), global_ran_node_id(27, crit_e::reject)
@ -41326,7 +41326,7 @@ void pws_fail_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<pws_restart_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pws_restart_ind_ies_o>;
pws_restart_ind_ies_container::pws_restart_ind_ies_container() :
cell_id_list_for_restart(16, crit_e::reject),
@ -41435,7 +41435,7 @@ void pws_restart_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<paging_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<paging_ies_o>;
paging_ies_container::paging_ies_container() :
ue_paging_id(115, crit_e::ignore),
@ -41594,7 +41594,7 @@ void paging_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<path_switch_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<path_switch_request_ies_o>;
path_switch_request_ies_container::path_switch_request_ies_container() :
ran_ue_ngap_id(85, crit_e::reject),
@ -41723,7 +41723,7 @@ void path_switch_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<path_switch_request_ack_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<path_switch_request_ack_ies_o>;
path_switch_request_ack_ies_container::path_switch_request_ack_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -41942,7 +41942,7 @@ void path_switch_request_ack_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<path_switch_request_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<path_switch_request_fail_ies_o>;
path_switch_request_fail_ies_container::path_switch_request_fail_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -42141,7 +42141,7 @@ void private_msg_s::to_json(json_writer& j) const
j.end_array();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ran_cfg_upd_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ran_cfg_upd_ies_o>;
ran_cfg_upd_ies_container::ran_cfg_upd_ies_container() :
ran_node_name(82, crit_e::ignore),
@ -42281,7 +42281,7 @@ void ran_cfg_upd_ack_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ran_cfg_upd_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ran_cfg_upd_fail_ies_o>;
ran_cfg_upd_fail_ies_container::ran_cfg_upd_fail_ies_container() :
cause(15, crit_e::ignore), time_to_wait(107, crit_e::ignore), crit_diagnostics(19, crit_e::ignore)
@ -42383,7 +42383,7 @@ void ran_cfg_upd_fail_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<rrc_inactive_transition_report_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<rrc_inactive_transition_report_ies_o>;
rrc_inactive_transition_report_ies_container::rrc_inactive_transition_report_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -42487,7 +42487,7 @@ void rrc_inactive_transition_report_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<reroute_nas_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<reroute_nas_request_ies_o>;
reroute_nas_request_ies_container::reroute_nas_request_ies_container() :
ran_ue_ngap_id(85, crit_e::reject),
@ -42611,7 +42611,7 @@ void reroute_nas_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<secondary_rat_data_usage_report_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<secondary_rat_data_usage_report_ies_o>;
secondary_rat_data_usage_report_ies_container::secondary_rat_data_usage_report_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -42720,7 +42720,7 @@ void secondary_rat_data_usage_report_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<trace_fail_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<trace_fail_ind_ies_o>;
trace_fail_ind_ies_container::trace_fail_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -42824,7 +42824,7 @@ void trace_fail_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<trace_start_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<trace_start_ies_o>;
trace_start_ies_container::trace_start_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), trace_activation(108, crit_e::ignore)
@ -42916,7 +42916,7 @@ void trace_start_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_mod_fail_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_mod_fail_ies_o>;
ue_context_mod_fail_ies_container::ue_context_mod_fail_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -43025,7 +43025,7 @@ void ue_context_mod_fail_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_mod_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_mod_request_ies_o>;
ue_context_mod_request_ies_container::ue_context_mod_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -43244,7 +43244,7 @@ void ue_context_mod_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_mod_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_mod_resp_ies_o>;
ue_context_mod_resp_ies_container::ue_context_mod_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -43373,7 +43373,7 @@ void ue_context_mod_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_release_cmd_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_release_cmd_ies_o>;
ue_context_release_cmd_ies_container::ue_context_release_cmd_ies_container() :
ue_ngap_ids(114, crit_e::reject), cause(15, crit_e::ignore)
@ -43456,7 +43456,7 @@ void ue_context_release_cmd_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_release_complete_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_release_complete_ies_o>;
ue_context_release_complete_ies_container::ue_context_release_complete_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -43601,7 +43601,7 @@ void ue_context_release_complete_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_context_release_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_context_release_request_ies_o>;
ue_context_release_request_ies_container::ue_context_release_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -43710,7 +43710,7 @@ void ue_context_release_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_radio_cap_check_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_radio_cap_check_request_ies_o>;
ue_radio_cap_check_request_ies_container::ue_radio_cap_check_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject), ue_radio_cap(117, crit_e::ignore)
@ -43807,7 +43807,7 @@ void ue_radio_cap_check_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_radio_cap_check_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_radio_cap_check_resp_ies_o>;
ue_radio_cap_check_resp_ies_container::ue_radio_cap_check_resp_ies_container() :
amf_ue_ngap_id(10, crit_e::ignore),
@ -43916,7 +43916,7 @@ void ue_radio_cap_check_resp_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ue_radio_cap_info_ind_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ue_radio_cap_info_ind_ies_o>;
ue_radio_cap_info_ind_ies_container::ue_radio_cap_info_ind_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -44025,7 +44025,7 @@ void ue_radio_cap_info_ind_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<uetnla_binding_release_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<uetnla_binding_release_request_ies_o>;
uetnla_binding_release_request_ies_container::uetnla_binding_release_request_ies_container() :
amf_ue_ngap_id(10, crit_e::reject), ran_ue_ngap_id(85, crit_e::reject)
@ -44108,7 +44108,7 @@ void uetnla_binding_release_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ul_nas_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ul_nas_transport_ies_o>;
ul_nas_transport_ies_container::ul_nas_transport_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -44212,7 +44212,7 @@ void ul_nas_transport_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ul_non_ueassociated_nrp_pa_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ul_non_ueassociated_nrp_pa_transport_ies_o>;
ul_non_ueassociated_nrp_pa_transport_ies_container::ul_non_ueassociated_nrp_pa_transport_ies_container() :
routing_id(89, crit_e::reject), nrp_pa_pdu(46, crit_e::reject)
@ -44295,7 +44295,7 @@ void ul_non_ueassociated_nrp_pa_transport_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ul_ran_cfg_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ul_ran_cfg_transfer_ies_o>;
ul_ran_cfg_transfer_ies_container::ul_ran_cfg_transfer_ies_container() :
son_cfg_transfer_ul(99, crit_e::ignore), endc_son_cfg_transfer_ul(158, crit_e::ignore)
@ -44382,7 +44382,7 @@ void ul_ran_cfg_transfer_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ul_ran_status_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ul_ran_status_transfer_ies_o>;
ul_ran_status_transfer_ies_container::ul_ran_status_transfer_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -44476,7 +44476,7 @@ void ul_ran_status_transfer_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<ul_ueassociated_nrp_pa_transport_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<ul_ueassociated_nrp_pa_transport_ies_o>;
ul_ueassociated_nrp_pa_transport_ies_container::ul_ueassociated_nrp_pa_transport_ies_container() :
amf_ue_ngap_id(10, crit_e::reject),
@ -44580,7 +44580,7 @@ void ul_ueassociated_nrp_pa_transport_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<write_replace_warning_request_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<write_replace_warning_request_ies_o>;
write_replace_warning_request_ies_container::write_replace_warning_request_ies_container() :
msg_id(35, crit_e::reject),
@ -44789,7 +44789,7 @@ void write_replace_warning_request_s::to_json(json_writer& j) const
j.end_obj();
}
template struct asn1::ngap_nr::protocol_ie_field_s<write_replace_warning_resp_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<write_replace_warning_resp_ies_o>;
write_replace_warning_resp_ies_container::write_replace_warning_resp_ies_container() :
msg_id(35, crit_e::reject),
@ -49528,7 +49528,7 @@ const char* pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c::types_opts::to
return convert_enum_idx(options, 2, value, "pdu_session_res_modify_ind_transfer_ext_ies_o::ext_c::types");
}
template struct asn1::ngap_nr::protocol_ext_field_s<pdu_session_res_modify_ind_transfer_ext_ies_o>;
template struct asn1::ngap::protocol_ext_field_s<pdu_session_res_modify_ind_transfer_ext_ies_o>;
pdu_session_res_modify_ind_transfer_ext_ies_container::pdu_session_res_modify_ind_transfer_ext_ies_container() :
secondary_ratusage_info(144, crit_e::ignore), security_result(156, crit_e::ignore)
@ -50457,7 +50457,7 @@ uint8_t pdu_session_res_modify_request_transfer_ies_o::value_c::types_opts::to_n
return 0;
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_modify_request_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_modify_request_transfer_ies_o>;
pdu_session_res_modify_request_transfer_ies_container::pdu_session_res_modify_request_transfer_ies_container() :
pdu_session_aggregate_maximum_bit_rate(130, crit_e::reject),
@ -51907,7 +51907,7 @@ uint8_t pdu_session_res_setup_request_transfer_ies_o::value_c::types_opts::to_nu
return 0;
}
template struct asn1::ngap_nr::protocol_ie_field_s<pdu_session_res_setup_request_transfer_ies_o>;
template struct asn1::ngap::protocol_ie_field_s<pdu_session_res_setup_request_transfer_ies_o>;
pdu_session_res_setup_request_transfer_ies_container::pdu_session_res_setup_request_transfer_ies_container() :
pdu_session_aggregate_maximum_bit_rate(130, crit_e::reject),

@ -28,6 +28,7 @@
#include "srsran/phy/phch/ra_ul_nr.h"
#include "srsran/phy/phch/uci_nr.h"
#include "srsran/phy/utils/debug.h"
#include <math.h> /* floor */
typedef struct {
srsran_mod_t modulation;
@ -39,6 +40,7 @@ typedef struct {
#define RA_NR_MCS_SIZE_TABLE2 28
#define RA_NR_MCS_SIZE_TABLE3 29
#define RA_NR_TBS_SIZE_TABLE 93
#define RA_NR_CQI_TABLE_SIZE 16
#define RA_NR_BETA_OFFSET_HARQACK_SIZE 32
#define RA_NR_BETA_OFFSET_CSI_SIZE 32
@ -140,12 +142,99 @@ static const float ra_nr_beta_offset_csi_table[RA_NR_BETA_OFFSET_CSI_SIZE] = {
4.000f, 5.000f, 6.250f, 8.000f, 10.000f, 12.625f, 15.875f, 20.000f, NAN, NAN, NAN,
NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN};
typedef enum { ra_nr_table_1 = 0, ra_nr_table_2, ra_nr_table_3 } ra_nr_table_t;
typedef enum { ra_nr_table_idx_1 = 0, ra_nr_table_idx_2, ra_nr_table_idx_3 } ra_nr_table_idx_t;
static ra_nr_table_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
/**
* The table below performs the mapping of the CQI into the closest MCS, based on the corresponding spectral efficiency.
* The mapping works as follows:
* - select spectral efficiency from the CQI from tables Table 5.2.2.1-2, Table 5.2.2.1-3, or Table 5.2.2.1-4,
* TS 38.214 V15.14.0
* - select MCS corresponding to same spectral efficiency from Table 5.1.3.1-1, Table 5.1.3.1-2, or Table 5.1.3.1-3,
* TS 38.214 V15.14.0
*
* The array ra_nr_cqi_to_mcs_table[CQI_table_idx][MCS_table_idx][CQI] contains the MCS corresponding to CQI, based on
* the given CQI_table_idx and MCS_table_idx tables
* CQI_table_idx: 1 -> Table 5.2.2.1-2; 2 -> Table 5.2.2.1-3, 3 -> Table 5.2.2.1-4
* MCS_table_idx: 1 -> Table 5.1.3.1-1; 2 -> Table 5.1.3.1-2; 3 -> Table 5.1.3.1-3
*/
static const int ra_nr_cqi_to_mcs_table[3][3][RA_NR_CQI_TABLE_SIZE] = {
/* ROW 1 - CQI Table 1 */
{/* MCS Table 1 */ {-1, 0, 0, 2, 4, 6, 8, 11, 13, 15, 18, 20, 22, 24, 26, 28},
/* MCS Table 2 */ {-1, 0, 0, 1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 17, 19, 21},
/* MCS Table 3 */ {-1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 28, 28}},
/* ROW 2 - CQI Table 2 */
{/* MCS Table 1 */ {-1, 0, 2, 6, 11, 13, 15, 18, 20, 22, 24, 26, 28, 28, 28, 28},
/* MCS Table 2 */ {-1, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27},
/* MCS Table 3 */ {-1, 4, 8, 12, 16, 18, 20, 22, 24, 26, 28, 28, 28, 28, 28, 28}},
/* ROW 3 - CQI Table 3 */
{/* MCS Table 1 */ {-1, 0, 0, 0, 0, 2, 4, 6, 8, 11, 13, 15, 18, 20, 22, 24},
/* MCS Table 2 */ {-1, 0, 0, 0, 0, 1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 17},
/* MCS Table 3 */ {-1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28}}};
/**
* The CQI to Spectral efficiency table.
* The array ra_nr_cqi_to_se_table[CQI_table_idx][CQI] contains the Spectral Efficiency corresponding to CQI, based on
* the given CQI_table_idx:
* CQI_table_idx: 1 -> Table 5.2.2.1-2; 2 -> Table 5.2.2.1-3, 3 -> Table 5.2.2.1-4
*/
static const double ra_nr_cqi_to_se_table[3][RA_NR_CQI_TABLE_SIZE] = {
/* ROW 1 - CQI Table 1 */
{-1,
0.1523,
0.2344,
0.3770,
0.6016,
0.8770,
1.1758,
1.4766,
1.9141,
2.4063,
2.7305,
3.3223,
3.9023,
4.5234,
5.1152,
5.5547},
/* ROW 2 - CQI Table 2 */
{-1,
0.1523,
0.3770,
0.8770,
1.4766,
1.9141,
2.4063,
2.7305,
3.3223,
3.9023,
4.5234,
5.1152,
5.5547,
6.2266,
6.9141,
7.4063},
/* ROW 3 - CQI Table 3 */
{-1,
0.0586,
0.0977,
0.1523,
0.2344,
0.3770,
0.6016,
0.8770,
1.1758,
1.4766,
1.9141,
2.4063,
2.7305,
3.3223,
3.9023,
4.5234}};
static ra_nr_table_idx_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
{
// Non-implemented parameters
bool mcs_c_rnti = false;
@ -155,7 +244,7 @@ static ra_nr_table_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t
// - CRC scrambled by C-RNTI or SP-CSI-RNTI,
if (mcs_table == srsran_mcs_table_256qam && dci_format == srsran_dci_format_nr_0_1 &&
(rnti_type == srsran_rnti_type_c || rnti_type == srsran_rnti_type_sp_csi)) {
return ra_nr_table_2;
return ra_nr_table_idx_2;
}
// - the UE is not configured with MCS-C-RNTI,
@ -165,14 +254,14 @@ static ra_nr_table_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t
if (!mcs_c_rnti && mcs_table == srsran_mcs_table_qam64LowSE && dci_format != srsran_dci_format_nr_rar &&
search_space_type == srsran_search_space_type_ue &&
(rnti_type == srsran_rnti_type_c || rnti_type == srsran_rnti_type_sp_csi)) {
return ra_nr_table_3;
return ra_nr_table_idx_3;
}
// - the UE is configured with MCS-C-RNTI, and
// - the PUSCH is scheduled by a PDCCH with
// - CRC scrambled by MCS-C-RNTI,
// if (mcs_c_rnti && dci_format != srsran_dci_format_nr_rar && rnti_type == srsran_rnti_type_mcs_c) {
// return ra_nr_table_3;
// return ra_nr_table_idx_3;
// }
// - mcs-Table in configuredGrantConfig is set to 'qam256',
@ -180,7 +269,7 @@ static ra_nr_table_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t
// - if PUSCH is transmitted with configured grant
// if (configured_grant_table == srsran_mcs_table_256qam &&
// (rnti_type == srsran_rnti_type_cs || dci_format == srsran_dci_format_nr_cg)) {
// return ra_nr_table_2;
// return ra_nr_table_idx_2;
// }
// - mcs-Table in configuredGrantConfig is set to 'qam64LowSE'
@ -188,23 +277,23 @@ static ra_nr_table_t ra_nr_select_table_pusch_noprecoding(srsran_mcs_table_t
// - if PUSCH is transmitted with configured grant,
// if (configured_grant_table == srsran_mcs_table_qam64LowSE &&
// (rnti_type == srsran_rnti_type_cs || dci_format == srsran_dci_format_nr_cg)) {
// return ra_nr_table_3;
// return ra_nr_table_idx_3;
// }
return ra_nr_table_1;
return ra_nr_table_idx_1;
}
static ra_nr_table_t ra_nr_select_table_pdsch(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
static ra_nr_table_idx_t ra_nr_select_table_pdsch(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
{
// - the higher layer parameter mcs-Table given by PDSCH-Config is set to 'qam256', and
// - the PDSCH is scheduled by a PDCCH with DCI format 1_1 with
// - CRC scrambled by C-RNTI
if (mcs_table == srsran_mcs_table_256qam && dci_format == srsran_dci_format_nr_1_1 &&
rnti_type == srsran_rnti_type_c) {
return ra_nr_table_2;
return ra_nr_table_idx_2;
}
// the UE is not configured with MCS-C-RNTI,
@ -213,7 +302,7 @@ static ra_nr_table_t ra_nr_select_table_pdsch(srsran_mcs_table_t mcs_tab
// CRC scrambled by C - RNTI
if (mcs_table == srsran_mcs_table_qam64LowSE && search_space_type == srsran_search_space_type_ue &&
rnti_type == srsran_rnti_type_c) {
return ra_nr_table_3;
return ra_nr_table_idx_3;
}
// - the UE is not configured with the higher layer parameter mcs-Table given by SPS-Config,
@ -222,7 +311,7 @@ static ra_nr_table_t ra_nr_select_table_pdsch(srsran_mcs_table_t mcs_tab
// - if the PDSCH is scheduled without corresponding PDCCH transmission using SPS-Config,
// if (!sps_config_mcs_table_present && mcs_table == srsran_mcs_table_256qam &&
// ((dci_format == srsran_dci_format_nr_1_1 && rnti_type == srsran_rnti_type_cs) || (!is_pdcch_sps))) {
// return ra_nr_table_2;
// return ra_nr_table_idx_2;
// }
// - the UE is configured with the higher layer parameter mcs-Table given by SPS-Config set to 'qam64LowSE'
@ -230,17 +319,17 @@ static ra_nr_table_t ra_nr_select_table_pdsch(srsran_mcs_table_t mcs_tab
// - if the PDSCH is scheduled without corresponding PDCCH transmission using SPS-Config,
// if (sps_config_mcs_table_present && sps_config_mcs_table == srsran_mcs_table_qam64LowSE &&
// (rnti_type == srsran_rnti_type_cs || is_pdcch_sps)) {
// return ra_nr_table_3;
// return ra_nr_table_idx_3;
// }
// else
return ra_nr_table_1;
return ra_nr_table_idx_1;
}
static ra_nr_table_t ra_nr_select_table(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
static ra_nr_table_idx_t ra_nr_select_table(srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
{
// Check if it is a PUSCH transmission
if (dci_format == srsran_dci_format_nr_0_0 || dci_format == srsran_dci_format_nr_0_1 ||
@ -278,14 +367,14 @@ double srsran_ra_nr_R_from_mcs(srsran_mcs_table_t mcs_table,
srsran_rnti_type_t rnti_type,
uint32_t mcs_idx)
{
ra_nr_table_t table = ra_nr_select_table(mcs_table, dci_format, search_space_type, rnti_type);
ra_nr_table_idx_t table = ra_nr_select_table(mcs_table, dci_format, search_space_type, rnti_type);
switch (table) {
case ra_nr_table_1:
case ra_nr_table_idx_1:
return srsran_ra_nr_R_from_mcs_table1(mcs_idx) / 1024.0;
case ra_nr_table_2:
case ra_nr_table_idx_2:
return srsran_ra_nr_R_from_mcs_table2(mcs_idx) / 1024.0;
case ra_nr_table_3:
case ra_nr_table_idx_3:
return srsran_ra_nr_R_from_mcs_table3(mcs_idx) / 1024.0;
default:
ERROR("Invalid table %d", table);
@ -300,14 +389,14 @@ srsran_mod_t srsran_ra_nr_mod_from_mcs(srsran_mcs_table_t mcs_table,
srsran_rnti_type_t rnti_type,
uint32_t mcs_idx)
{
ra_nr_table_t table = ra_nr_select_table(mcs_table, dci_format, search_space_type, rnti_type);
ra_nr_table_idx_t table = ra_nr_select_table(mcs_table, dci_format, search_space_type, rnti_type);
switch (table) {
case ra_nr_table_1:
case ra_nr_table_idx_1:
return srsran_ra_nr_modulation_from_mcs_table1(mcs_idx);
case ra_nr_table_2:
case ra_nr_table_idx_2:
return srsran_ra_nr_modulation_from_mcs_table2(mcs_idx);
case ra_nr_table_3:
case ra_nr_table_idx_3:
return srsran_ra_nr_modulation_from_mcs_table3(mcs_idx);
default:
ERROR("Invalid table %d", table);
@ -1093,3 +1182,114 @@ int srsran_ra_ul_set_grant_uci_nr(const srsran_carrier_nr_t* carrier,
return SRSRAN_SUCCESS;
}
int srsran_ra_nr_cqi_to_mcs(uint8_t cqi,
srsran_csi_cqi_table_t cqi_table_idx,
srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
{
if (cqi >= RA_NR_CQI_TABLE_SIZE) {
ERROR("Invalid CQI (%u)", cqi);
return -1;
}
ra_nr_table_idx_t mcs_table_idx = ra_nr_select_table_pdsch(mcs_table, dci_format, search_space_type, rnti_type);
return ra_nr_cqi_to_mcs_table[cqi_table_idx][mcs_table_idx][cqi];
}
double srsran_ra_nr_cqi_to_se(uint8_t cqi, srsran_csi_cqi_table_t cqi_table_idx)
{
if (cqi >= RA_NR_CQI_TABLE_SIZE) {
ERROR("Invalid CQI (%u)", cqi);
return -1;
}
return ra_nr_cqi_to_se_table[cqi_table_idx][cqi];
}
int srsran_ra_nr_se_to_mcs(double se_target,
srsran_mcs_table_t mcs_table,
srsran_dci_format_nr_t dci_format,
srsran_search_space_type_t search_space_type,
srsran_rnti_type_t rnti_type)
{
// Get MCS table index to be used
ra_nr_table_idx_t mcs_table_idx = ra_nr_select_table_pdsch(mcs_table, dci_format, search_space_type, rnti_type);
// Get MCS table and size based on mcs_table_idx
const mcs_entry_t* mcs_se_table;
size_t mcs_table_size;
switch (mcs_table_idx) {
case ra_nr_table_idx_1:
mcs_se_table = ra_nr_table1;
mcs_table_size = RA_NR_MCS_SIZE_TABLE1;
break;
case ra_nr_table_idx_2:
mcs_se_table = ra_nr_table2;
mcs_table_size = RA_NR_MCS_SIZE_TABLE2;
break;
case ra_nr_table_idx_3:
mcs_se_table = ra_nr_table3;
mcs_table_size = RA_NR_MCS_SIZE_TABLE3;
break;
default:
ERROR("Invalid MCS table index (%u)", mcs_table_idx);
return -1;
}
// if SE is lower than min possible value, return min MCS
if (se_target <= mcs_se_table[0].S) {
return 0;
}
// if SE is greater than max possible value, return max MCS
else if (se_target >= mcs_se_table[mcs_table_size - 1].S) {
return mcs_table_size - 1;
}
// handle monotonicity oddity between MCS 16 and 17 for MCS table 1
if (mcs_table_idx == ra_nr_table_idx_1) {
if (se_target == mcs_se_table[17].S) {
return 17;
} else if (se_target <= mcs_se_table[16].S && se_target > mcs_se_table[17].S) {
return 16;
}
}
/* In the following, we search for the greatest MCS value such that MCS(SE) <= target SE, where the target SE is the
* value provided as an input argument. The MCS is the vector index, the content of the vector is the SE.
* The search is performed by means of a binary-search like algorithm. At each iteration, we look for the SE in the
* left or right half of the vector, depending on the target SE.
* We stop when the lower-bound (lb) and upper-bound (ub) are two consecutive MCS values and we return the
* lower-bound, which approximates the greatest MCS value such that MCS(SE) <= target SE
* */
size_t lb = 0; // lower-bound of MCS-to-SE vector where to perform binary search
size_t ub = mcs_table_size - 1; // upper-bound of MCS-to-SE vector where to perform binary search
while (ub > lb + 1) {
size_t mid_point = (size_t)floor(((double)(lb + ub)) / 2);
// break out of loop is there is an exact match
if (mcs_se_table[mid_point].S == se_target) {
return (int)mid_point;
}
// restrict the search to the left half of the vector
else if (se_target < mcs_se_table[mid_point].S) {
ub = mid_point;
// handle monotonicity oddity between MCS 16 and 17 for MCS table 1
if (mcs_table_idx == ra_nr_table_idx_1 && ub == 17) {
ub = 16;
}
}
// restrict the search to the right half of the vector
else { /* se_target > mcs_se_table[mid_point].S ) */
lb = mid_point;
// handle monotonicity oddity between MCS 16 and 17 for MCS table 1
if (mcs_table_idx == ra_nr_table_idx_1 && lb == 16) {
lb = 17;
}
}
}
return (int)lb;
}

@ -23,7 +23,7 @@
#include "srsran/common/test_common.h"
using namespace asn1;
using namespace asn1::ngap_nr;
using namespace asn1::ngap;
/* TESTS */
@ -318,7 +318,7 @@ int test_session_res_setup_request()
TESTASSERT(pdu.init_msg().value.type().value ==
ngap_elem_procs_o::init_msg_c::types_opts::pdu_session_res_setup_request);
auto& container = pdu.init_msg().value.pdu_session_res_setup_request().protocol_ies;
TESTASSERT(container.pdu_session_res_setup_list_su_req.id == ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ);
TESTASSERT(container.pdu_session_res_setup_list_su_req.id == ASN1_NGAP_ID_PDU_SESSION_RES_SETUP_LIST_SU_REQ);
TESTASSERT(container.pdu_session_res_setup_list_su_req.value.size() == 1);
auto& item = container.pdu_session_res_setup_list_su_req.value[0];
TESTASSERT(item.pdu_session_id == 1);

@ -1036,7 +1036,7 @@ void rrc::tti_clock()
if (p.pdu != nullptr) {
log_rx_pdu_fail(p.rnti, p.lcid, *p.pdu, "unknown rnti");
} else {
logger.warning("Ignoring rnti=0x%x command. Cause: unknown rnti", p.rnti);
logger.warning("Ignoring rnti=0x%x command %d arg %d. Cause: unknown rnti", p.rnti, p.lcid, p.arg);
}
continue;
}

@ -30,22 +30,22 @@ namespace srsenb {
class ngap_dummy : public ngap_interface_rrc_nr
{
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu)
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu)
{}
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t m_tmsi)
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t m_tmsi)
{}
void write_pdu(uint16_t rnti, srsran::const_byte_span pdu) {}
bool user_exists(uint16_t rnti) { return true; }
void user_mod(uint16_t old_rnti, uint16_t new_rnti) {}
void user_release_request(uint16_t rnti, asn1::ngap_nr::cause_radio_network_e cause_radio) {}
void user_release_request(uint16_t rnti, asn1::ngap::cause_radio_network_e cause_radio) {}
bool is_amf_connected() { return true; }
void ue_notify_rrc_reconf_complete(uint16_t rnti, bool outcome) {}
};

@ -58,6 +58,7 @@ public:
void ul_sr_info(uint16_t rnti) override;
void ul_bsr(uint16_t rnti, uint32_t lcg_id, uint32_t bsr) override;
void dl_buffer_state(uint16_t rnti, uint32_t lcid, uint32_t newtx, uint32_t retx);
void dl_cqi_info(uint16_t rnti, uint32_t cc, uint32_t cqi_value);
/// Called once per slot in a non-concurrent fashion
void slot_indication(slot_point slot_tx) override;

@ -57,27 +57,27 @@ public:
void stop();
// RRC NR interface
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu) override;
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi) override;
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu) override;
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi) override;
void write_pdu(uint16_t rnti, srsran::const_byte_span pdu) override;
bool user_exists(uint16_t rnti) override { return true; };
void user_mod(uint16_t old_rnti, uint16_t new_rnti) override {}
// TS 38.413 - Section 8.3.2 - UE Context Release Request
void user_release_request(uint16_t rnti, asn1::ngap_nr::cause_radio_network_e cause_radio) override;
void user_release_request(uint16_t rnti, asn1::ngap::cause_radio_network_e cause_radio) override;
bool is_amf_connected() override;
bool send_error_indication(const asn1::ngap_nr::cause_c& cause,
srsran::optional<uint32_t> ran_ue_ngap_id = {},
srsran::optional<uint32_t> amf_ue_ngap_id = {});
bool send_error_indication(const asn1::ngap::cause_c& cause,
srsran::optional<uint32_t> ran_ue_ngap_id = {},
srsran::optional<uint32_t> amf_ue_ngap_id = {});
void ue_notify_rrc_reconf_complete(uint16_t rnti, bool outcome) override;
bool send_pdu_session_resource_setup_response();
@ -92,7 +92,7 @@ public:
// Logging
typedef enum { Rx = 0, Tx } direction_t;
void log_ngap_message(const asn1::ngap_nr::ngap_pdu_c& msg, const direction_t dir, srsran::const_byte_span pdu);
void log_ngap_message(const asn1::ngap::ngap_pdu_c& msg, const direction_t dir, srsran::const_byte_span pdu);
private:
static const int AMF_PORT = 38412;
@ -120,33 +120,33 @@ private:
srsran::unique_timer amf_connect_timer, ngsetup_timeout;
// Protocol IEs sent with every UL NGAP message
asn1::ngap_nr::tai_s tai;
asn1::ngap_nr::nr_cgi_s nr_cgi;
asn1::ngap::tai_s tai;
asn1::ngap::nr_cgi_s nr_cgi;
asn1::ngap_nr::ng_setup_resp_s ngsetupresponse;
asn1::ngap::ng_setup_resp_s ngsetupresponse;
int build_tai_cgi();
bool connect_amf();
bool setup_ng();
bool sctp_send_ngap_pdu(const asn1::ngap_nr::ngap_pdu_c& tx_pdu, uint32_t rnti, const char* procedure_name);
bool sctp_send_ngap_pdu(const asn1::ngap::ngap_pdu_c& tx_pdu, uint32_t rnti, const char* procedure_name);
bool handle_ngap_rx_pdu(srsran::byte_buffer_t* pdu);
bool handle_successful_outcome(const asn1::ngap_nr::successful_outcome_s& msg);
bool handle_unsuccessful_outcome(const asn1::ngap_nr::unsuccessful_outcome_s& msg);
bool handle_initiating_message(const asn1::ngap_nr::init_msg_s& msg);
bool handle_successful_outcome(const asn1::ngap::successful_outcome_s& msg);
bool handle_unsuccessful_outcome(const asn1::ngap::unsuccessful_outcome_s& msg);
bool handle_initiating_message(const asn1::ngap::init_msg_s& msg);
// TS 38.413 - Section 8.6.2 - Downlink NAS Transport
bool handle_dl_nas_transport(const asn1::ngap_nr::dl_nas_transport_s& msg);
bool handle_dl_nas_transport(const asn1::ngap::dl_nas_transport_s& msg);
// TS 38.413 - Section 9.2.6.2 - NG Setup Response
bool handle_ng_setup_response(const asn1::ngap_nr::ng_setup_resp_s& msg);
bool handle_ng_setup_response(const asn1::ngap::ng_setup_resp_s& msg);
// TS 38.413 - Section 9.2.6.3 - NG Setup Failure
bool handle_ng_setup_failure(const asn1::ngap_nr::ng_setup_fail_s& msg);
bool handle_ng_setup_failure(const asn1::ngap::ng_setup_fail_s& msg);
// TS 38.413 - Section 9.2.2.5 - UE Context Release Command
bool handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_release_cmd_s& msg);
bool handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cmd_s& msg);
// TS 38.413 - Section 9.2.2.1 - Initial Context Setup Request
bool handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_context_setup_request_s& msg);
bool handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setup_request_s& msg);
// TS 38.413 - Section 9.2.1.1 - PDU Session Resource Setup Request
bool handle_ue_pdu_session_res_setup_request(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg);
bool handle_ue_pdu_session_res_setup_request(const asn1::ngap::pdu_session_res_setup_request_s& msg);
// PCAP
srsran::ngap_pcap* pcap = nullptr;
@ -201,8 +201,8 @@ private:
srsran::proc_t<ng_setup_proc_t> ngsetup_proc;
std::string get_cause(const asn1::ngap_nr::cause_c& c);
void log_ngap_msg(const asn1::ngap_nr::ngap_pdu_c& msg, srsran::const_span<uint8_t> sdu, bool is_rx);
std::string get_cause(const asn1::ngap::cause_c& c);
void log_ngap_msg(const asn1::ngap::ngap_pdu_c& msg, srsran::const_span<uint8_t> sdu, bool is_rx);
};
} // namespace srsenb

@ -39,16 +39,16 @@ public:
srslog::basic_logger& logger_);
virtual ~ue();
// TS 38.413 - Section 9.2.5.1 - Initial UE Message
bool send_initial_ue_message(asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
bool has_tmsi,
uint32_t s_tmsi = 0);
bool send_initial_ue_message(asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
bool has_tmsi,
uint32_t s_tmsi = 0);
// TS 38.413 - Section 9.2.5.3 - Uplink NAS Transport
bool send_ul_nas_transport(srsran::const_byte_span pdu);
// TS 38.413 - Section 9.2.2.2 - Initial Context Setup Response
bool send_initial_ctxt_setup_response();
// TS 38.413 - Section 9.2.2.3 - Initial Context Setup Failure
bool send_initial_ctxt_setup_failure(asn1::ngap_nr::cause_c cause);
bool send_initial_ctxt_setup_failure(asn1::ngap::cause_c cause);
// TS 38.413 - Section 9.2.1.2 - PDU Session Resource Setup Response
bool send_pdu_session_resource_setup_response(uint16_t pdu_session_id,
uint32_t teid_in,
@ -56,13 +56,13 @@ public:
// TS 38.413 - Section 9.2.1.2 - UE Context Release Complete
bool send_ue_ctxt_release_complete();
// TS 38.413 - Section 9.2.2.1 - Initial Context Setup Request
bool handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_context_setup_request_s& msg);
bool handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setup_request_s& msg);
// TS 38.413 - Section 9.2.2.4 - UE Context Release Request
bool send_ue_context_release_request(asn1::ngap_nr::cause_c cause);
bool send_ue_context_release_request(asn1::ngap::cause_c cause);
// TS 38.413 - Section 9.2.2.5 - UE Context Release Command
bool handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_release_cmd_s& msg);
bool handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cmd_s& msg);
// TS 38.413 - Section 9.2.1.1 - PDU Session Resource Setup Request
bool handle_pdu_session_res_setup_request(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg);
bool handle_pdu_session_res_setup_request(const asn1::ngap::pdu_session_res_setup_request_s& msg);
/// Checks if a UE Context Release Request was already sent
bool was_ue_context_release_requested() const { return release_requested; }

@ -44,10 +44,10 @@ public:
asn1::bounded_bitstring<1, 160, true, true> address_out;
asn1::bounded_bitstring<1, 160, true, true> address_in;
};
uint8_t id = 0;
uint8_t lcid = 0;
asn1::ngap_nr::qos_flow_level_qos_params_s qos_params;
std::vector<gtpu_tunnel> tunnels;
uint8_t id = 0;
uint8_t lcid = 0;
asn1::ngap::qos_flow_level_qos_params_s qos_params;
std::vector<gtpu_tunnel> tunnels;
};
ngap_ue_bearer_manager(gtpu_interface_rrc* gtpu_, srslog::basic_logger& logger_);
@ -55,13 +55,13 @@ public:
int add_pdu_session(uint16_t rnti,
uint8_t pdu_session_id,
const asn1::ngap_nr::qos_flow_level_qos_params_s& qos,
const asn1::ngap::qos_flow_level_qos_params_s& qos,
const asn1::bounded_bitstring<1, 160, true, true>& addr,
uint32_t teid_out,
uint16_t& lcid,
asn1::bounded_bitstring<1, 160, true, true>& addr_in,
uint32_t& teid_in,
asn1::ngap_nr::cause_c& cause);
asn1::ngap::cause_c& cause);
int reset_pdu_sessions(uint16_t rnti);

@ -47,7 +47,7 @@ public:
rrc_interface_ngap_nr* rrc_,
ngap_ue_ctxt_t* ue_ctxt,
srslog::basic_logger& logger_);
srsran::proc_outcome_t init(const asn1::ngap_nr::init_context_setup_request_s& msg);
srsran::proc_outcome_t init(const asn1::ngap::init_context_setup_request_s& msg);
srsran::proc_outcome_t react(const bool rrc_reconf_outcome);
srsran::proc_outcome_t step();
static const char* name() { return "Initial Context Setup"; }
@ -68,7 +68,7 @@ public:
ngap_ue_ctxt_t* ue_ctxt,
ngap_ue_bearer_manager* bearer_manager,
srslog::basic_logger& logger_);
srsran::proc_outcome_t init(const asn1::ngap_nr::ue_context_release_cmd_s& msg);
srsran::proc_outcome_t init(const asn1::ngap::ue_context_release_cmd_s& msg);
srsran::proc_outcome_t step();
static const char* name() { return "UE Context Release"; }
@ -101,7 +101,7 @@ public:
ngap_ue_ctxt_t* ue_ctxt,
ngap_ue_bearer_manager* bearer_manager,
srslog::basic_logger& logger_);
srsran::proc_outcome_t init(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg);
srsran::proc_outcome_t init(const asn1::ngap::pdu_session_res_setup_request_s& msg);
srsran::proc_outcome_t step();
static const char* name() { return "UE PDU Session Resource Setup"; }

@ -103,8 +103,8 @@ public:
// Interfaces for NGAP
int ue_set_security_cfg_key(uint16_t rnti, const asn1::fixed_bitstring<256, false, true>& key) final;
int ue_set_bitrates(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates) final;
int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap_nr::ue_security_cap_s& caps) final;
int ue_set_bitrates(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates) final;
int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap::ue_security_cap_s& caps) final;
int start_security_mode_procedure(uint16_t rnti, srsran::unique_byte_buffer_t nas_pdu) final;
int establish_rrc_bearer(uint16_t rnti,
uint16_t pdu_session_id,
@ -113,7 +113,7 @@ public:
int release_bearers(uint16_t rnti) final;
void release_user(uint16_t rnti) final;
void write_dl_info(uint16_t rnti, srsran::unique_byte_buffer_t sdu) final;
int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates) final;
int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates) final;
int allocate_lcid(uint16_t rnti) final;
// logging

@ -55,7 +55,7 @@ public:
return *this;
}
bool set_security_capabilities(const asn1::ngap_nr::ue_security_cap_s& caps);
bool set_security_capabilities(const asn1::ngap::ue_security_cap_s& caps);
void set_security_key(const asn1::fixed_bitstring<256, false, true>& key);
void set_ncc(uint8_t ncc_) { ncc = ncc_; }
@ -69,13 +69,13 @@ public:
private:
void generate_as_keys();
srslog::basic_logger& logger;
const srsenb::rrc_nr_cfg_t& cfg;
bool k_gnb_present = false;
asn1::ngap_nr::ue_security_cap_s security_capabilities = {};
uint8_t k_gnb[32] = {}; // Provided by MME
srsran::nr_as_security_config_t sec_cfg = {};
uint8_t ncc = 0;
srslog::basic_logger& logger;
const srsenb::rrc_nr_cfg_t& cfg;
bool k_gnb_present = false;
asn1::ngap::ue_security_cap_s security_capabilities = {};
uint8_t k_gnb[32] = {}; // Provided by MME
srsran::nr_as_security_config_t sec_cfg = {};
uint8_t ncc = 0;
};
} // namespace srsgnb
#endif

@ -54,10 +54,7 @@ public:
// setters
void set_security_key(const asn1::fixed_bitstring<256, false, true>& key) { sec_ctx.set_security_key(key); }
void set_security_capabilities(const asn1::ngap_nr::ue_security_cap_s& caps)
{
sec_ctx.set_security_capabilities(caps);
}
void set_security_capabilities(const asn1::ngap::ue_security_cap_s& caps) { sec_ctx.set_security_capabilities(caps); }
void deactivate_bearers();

@ -593,7 +593,17 @@ bool mac_nr::handle_uci_data(uint16_t rnti, const srsran_uci_cfg_nr_t& cfg_, con
}
// Process CQI
{
for (uint32_t i = 0; i < cfg_.nof_csi; i++) {
// Skip if invalid or not supported CSI report
if (not value.valid or cfg_.csi[i].cfg.quantity != SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_PMI_CQI or
cfg_.csi[i].cfg.freq_cfg != SRSRAN_CSI_REPORT_FREQ_WIDEBAND or value.csi[i].wideband_cri_ri_pmi_cqi.cqi == 0) {
continue;
}
// 1. Pass CQI report to scheduler
sched->dl_cqi_info(rnti, 0, value.csi->wideband_cri_ri_pmi_cqi.cqi);
// 2. Save CQI report for metrics stats
srsran::rwlock_read_guard rw_lock(rwmutex);
if (ue_db.contains(rnti) && value.valid) {
ue_db[rnti]->metrics_dl_cqi(cfg_, value.csi->wideband_cri_ri_pmi_cqi.cqi);

@ -489,6 +489,15 @@ void sched_nr::dl_buffer_state(uint16_t rnti, uint32_t lcid, uint32_t newtx, uin
});
}
void sched_nr::dl_cqi_info(uint16_t rnti, uint32_t cc, uint32_t cqi_value)
{
auto callback = [cqi_value](ue_carrier& ue_cc, event_manager::logger& ev_logger) {
ue_cc.dl_cqi = cqi_value;
ev_logger.push("0x{:x}: dl_cqi_info(cqi={})", ue_cc.rnti, ue_cc.dl_cqi);
};
pending_events->enqueue_ue_cc_feedback("dl_cqi_info", rnti, cc, callback);
}
#define VERIFY_INPUT(cond, msg, ...) \
do { \
if (not(cond)) { \

@ -346,8 +346,10 @@ alloc_result bwp_slot_allocator::alloc_pdsch(slot_ue& ue, uint32_t ss_id, const
srsran_assert(success, "Failed to allocate DL HARQ retx");
}
srsran_slot_cfg_t slot_cfg;
slot_cfg.idx = ue.pdsch_slot.to_uint();
// Value 0.95 is from TS 38.214 v15.14.00, Section 5.1.3, page 17
const static float max_R = 0.95;
while (true) {
// Generate PDSCH

@ -52,6 +52,10 @@ add_executable(sched_nr_rar_test sched_nr_rar_test.cc)
target_link_libraries(sched_nr_rar_test srsgnb_mac sched_nr_test_suite srsran_common)
add_nr_test(sched_nr_rar_test sched_nr_rar_test)
add_executable(sched_nr_dci_utilities_tests sched_nr_dci_utilities_tests.cc)
target_link_libraries(sched_nr_dci_utilities_tests srsgnb_mac srsran_common srsran_phch)
add_nr_test(sched_nr_dci_utilities_tests sched_nr_dci_utilities_tests)
add_executable(sched_nr_test sched_nr_test.cc)
target_link_libraries(sched_nr_test
srsgnb_mac

@ -0,0 +1,469 @@
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2021 Software Radio Systems Limited
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the distribution.
*
*/
#include "srsran/common/test_common.h"
extern "C" {
#include "srsran/phy/phch/ra_nr.h"
}
void test_cqi_to_mcs()
{
// Sample random CQI values and test the returned MCS, for different combinations of CQI and MCS tables
// Set the parameters so that to select a given MCS table (1, 2, or 3)
// TEST CQI Table 1 - MCS table 1
int mcs = srsran_ra_nr_cqi_to_mcs(/* cqi */ 3,
/* cqi_table_idx */ SRSRAN_CSI_CQI_TABLE_1,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(2, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(5,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(6, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(9,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(15, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(12,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(22, mcs);
// TEST CQI Table 2 - MCS table 2
mcs = srsran_ra_nr_cqi_to_mcs(1,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(4,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(5, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(7,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(11, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(11,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(19, mcs);
// TEST CQI Table 3 - MCS table 3
mcs = srsran_ra_nr_cqi_to_mcs(2,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(2, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(8,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(14, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(13,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(24, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(15,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
// TEST CQI Table 1 - MCS table 2
mcs = srsran_ra_nr_cqi_to_mcs(6,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(4, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(14,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(19, mcs);
// TEST CQI Table 1 - MCS table 3
mcs = srsran_ra_nr_cqi_to_mcs(7,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(16, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(10,
SRSRAN_CSI_CQI_TABLE_1,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(22, mcs);
// TEST CQI Table 2 - MCS table 1
mcs = srsran_ra_nr_cqi_to_mcs(3,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(6, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(11,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(26, mcs);
// TEST CQI Table 2 - MCS table 3
mcs = srsran_ra_nr_cqi_to_mcs(7,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(22, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(10,
SRSRAN_CSI_CQI_TABLE_2,
srsran_mcs_table_qam64LowSE,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
// TEST CQI Table 3 - MCS table 1
mcs = srsran_ra_nr_cqi_to_mcs(2,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(13,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_64qam,
srsran_dci_format_nr_1_0,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(20, mcs);
// TEST CQI Table 3 - MCS table 2
mcs = srsran_ra_nr_cqi_to_mcs(5,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(1, mcs);
mcs = srsran_ra_nr_cqi_to_mcs(14,
SRSRAN_CSI_CQI_TABLE_3,
srsran_mcs_table_256qam,
srsran_dci_format_nr_1_1,
srsran_search_space_type_ue,
srsran_rnti_type_c);
TESTASSERT_EQ(15, mcs);
}
void test_cqi_to_se()
{
// TEST CQI Table 1
double se = srsran_ra_nr_cqi_to_se(2, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(0.2344, se);
se = srsran_ra_nr_cqi_to_se(5, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(0.8770, se);
se = srsran_ra_nr_cqi_to_se(8, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(1.9141, se);
se = srsran_ra_nr_cqi_to_se(11, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(3.3223, se);
se = srsran_ra_nr_cqi_to_se(13, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(4.5234, se);
se = srsran_ra_nr_cqi_to_se(15, SRSRAN_CSI_CQI_TABLE_1);
TESTASSERT_EQ(5.5547, se);
// TEST CQI Table 2
se = srsran_ra_nr_cqi_to_se(1, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(0.1523, se);
se = srsran_ra_nr_cqi_to_se(4, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(1.4766, se);
se = srsran_ra_nr_cqi_to_se(7, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(2.7305, se);
se = srsran_ra_nr_cqi_to_se(10, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(4.5234, se);
se = srsran_ra_nr_cqi_to_se(12, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(5.5547, se);
se = srsran_ra_nr_cqi_to_se(14, SRSRAN_CSI_CQI_TABLE_2);
TESTASSERT_EQ(6.9141, se);
// TEST CQI Table 3
se = srsran_ra_nr_cqi_to_se(1, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(0.0586, se);
se = srsran_ra_nr_cqi_to_se(3, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(0.1523, se);
se = srsran_ra_nr_cqi_to_se(7, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(0.8770, se);
se = srsran_ra_nr_cqi_to_se(9, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(1.4766, se);
se = srsran_ra_nr_cqi_to_se(12, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(2.7305, se);
se = srsran_ra_nr_cqi_to_se(15, SRSRAN_CSI_CQI_TABLE_3);
TESTASSERT_EQ(4.5234, se);
}
void test_se_to_mcs()
{
// MCS table 1
int mcs = srsran_ra_nr_se_to_mcs(/* se */ .1,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ .2344,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 1,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(6, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 1.0273,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(7, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 2.5,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(15, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 2.5703,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(16, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 2.57,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(16, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 2.5664,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(17, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 5.5,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(27, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 5.5574,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
mcs = srsran_ra_nr_se_to_mcs(/* se */ 6,
/* mcs_table */ srsran_mcs_table_64qam,
/* dci_format */ srsran_dci_format_nr_1_0,
/* search_space_type*/ srsran_search_space_type_ue,
/* rnti_type */ srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
// MCS table 2
mcs = srsran_ra_nr_se_to_mcs(
0.1, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.2344, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.24, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
1.47, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(4, mcs);
mcs = srsran_ra_nr_se_to_mcs(
1.4766, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(5, mcs);
mcs = srsran_ra_nr_se_to_mcs(
3.5, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(13, mcs);
mcs = srsran_ra_nr_se_to_mcs(
3.6094, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(14, mcs);
mcs = srsran_ra_nr_se_to_mcs(
5.2, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(19, mcs);
mcs = srsran_ra_nr_se_to_mcs(
5.3320, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(20, mcs);
mcs = srsran_ra_nr_se_to_mcs(
5.4, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(20, mcs);
mcs = srsran_ra_nr_se_to_mcs(
7.4063, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(27, mcs);
mcs = srsran_ra_nr_se_to_mcs(
7.5, srsran_mcs_table_256qam, srsran_dci_format_nr_1_1, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(27, mcs);
// MCS table 3
mcs = srsran_ra_nr_se_to_mcs(
0.05, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.0586, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.056, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(0, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.15, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(3, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.1523, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(4, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.49, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(8, mcs);
mcs = srsran_ra_nr_se_to_mcs(
0.4902, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(9, mcs);
mcs = srsran_ra_nr_se_to_mcs(
1.69, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(16, mcs);
mcs = srsran_ra_nr_se_to_mcs(
1.6953, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(17, mcs);
mcs = srsran_ra_nr_se_to_mcs(
4.52, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(27, mcs);
mcs = srsran_ra_nr_se_to_mcs(
4.5234, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
mcs = srsran_ra_nr_se_to_mcs(
4.6, srsran_mcs_table_qam64LowSE, srsran_dci_format_nr_1_0, srsran_search_space_type_ue, srsran_rnti_type_c);
TESTASSERT_EQ(28, mcs);
};
int main()
{
test_cqi_to_mcs();
test_cqi_to_se();
test_se_to_mcs();
}

@ -37,7 +37,7 @@ using srsran::uint32_to_uint8;
} \
} while (0)
using namespace asn1::ngap_nr;
using namespace asn1::ngap;
namespace srsenb {
/*********************************************************
@ -220,10 +220,10 @@ int ngap::build_tai_cgi()
/*******************************************************************************
/* RRC interface
********************************************************************************/
void ngap::initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu)
void ngap::initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu)
{
std::unique_ptr<ue> ue_ptr{new ue{this, rrc, gtpu, logger}};
ue_ptr->ctxt.rnti = rnti;
@ -236,11 +236,11 @@ void ngap::initial_ue(uint16_t rnti,
u->send_initial_ue_message(cause, pdu, false);
}
void ngap::initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi)
void ngap::initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi)
{
std::unique_ptr<ue> ue_ptr{new ue{this, rrc, gtpu, logger}};
ue_ptr->ctxt.rnti = rnti;
@ -274,7 +274,7 @@ void ngap::write_pdu(uint16_t rnti, srsran::const_byte_span pdu)
u->send_ul_nas_transport(pdu);
}
void ngap::user_release_request(uint16_t rnti, asn1::ngap_nr::cause_radio_network_e cause_radio)
void ngap::user_release_request(uint16_t rnti, asn1::ngap::cause_radio_network_e cause_radio)
{
ue* u = users.find_ue_rnti(rnti);
if (u == nullptr) {
@ -433,7 +433,7 @@ bool ngap::handle_ngap_rx_pdu(srsran::byte_buffer_t* pdu)
return true;
}
bool ngap::handle_initiating_message(const asn1::ngap_nr::init_msg_s& msg)
bool ngap::handle_initiating_message(const asn1::ngap::init_msg_s& msg)
{
switch (msg.value.type().value) {
case ngap_elem_procs_o::init_msg_c::types_opts::dl_nas_transport:
@ -461,7 +461,7 @@ bool ngap::handle_successful_outcome(const successful_outcome_s& msg)
return true;
}
bool ngap::handle_unsuccessful_outcome(const asn1::ngap_nr::unsuccessful_outcome_s& msg)
bool ngap::handle_unsuccessful_outcome(const asn1::ngap::unsuccessful_outcome_s& msg)
{
switch (msg.value.type().value) {
case ngap_elem_procs_o::unsuccessful_outcome_c::types_opts::ng_setup_fail:
@ -472,7 +472,7 @@ bool ngap::handle_unsuccessful_outcome(const asn1::ngap_nr::unsuccessful_outcome
return true;
}
bool ngap::handle_ng_setup_response(const asn1::ngap_nr::ng_setup_resp_s& msg)
bool ngap::handle_ng_setup_response(const asn1::ngap::ng_setup_resp_s& msg)
{
ngsetupresponse = msg;
amf_connected = true;
@ -484,7 +484,7 @@ bool ngap::handle_ng_setup_response(const asn1::ngap_nr::ng_setup_resp_s& msg)
return true;
}
bool ngap::handle_ng_setup_failure(const asn1::ngap_nr::ng_setup_fail_s& msg)
bool ngap::handle_ng_setup_failure(const asn1::ngap::ng_setup_fail_s& msg)
{
std::string cause = get_cause(msg.protocol_ies.cause.value);
logger.error("NG Setup Failure. Cause: %s", cause.c_str());
@ -492,7 +492,7 @@ bool ngap::handle_ng_setup_failure(const asn1::ngap_nr::ng_setup_fail_s& msg)
return true;
}
bool ngap::handle_dl_nas_transport(const asn1::ngap_nr::dl_nas_transport_s& msg)
bool ngap::handle_dl_nas_transport(const asn1::ngap::dl_nas_transport_s& msg)
{
if (msg.ext) {
logger.warning("Not handling NGAP message extension");
@ -542,7 +542,7 @@ bool ngap::handle_dl_nas_transport(const asn1::ngap_nr::dl_nas_transport_s& msg)
return true;
}
bool ngap::handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_context_setup_request_s& msg)
bool ngap::handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setup_request_s& msg)
{
ue* u =
handle_ngapmsg_ue_id(msg.protocol_ies.ran_ue_ngap_id.value.value, msg.protocol_ies.amf_ue_ngap_id.value.value);
@ -556,9 +556,9 @@ bool ngap::handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_context_s
return true;
}
bool ngap::handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_release_cmd_s& msg)
bool ngap::handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cmd_s& msg)
{
const asn1::ngap_nr::ue_ngap_id_pair_s& ue_ngap_id_pair = msg.protocol_ies.ue_ngap_ids.value.ue_ngap_id_pair();
const asn1::ngap::ue_ngap_id_pair_s& ue_ngap_id_pair = msg.protocol_ies.ue_ngap_ids.value.ue_ngap_id_pair();
ue* u = handle_ngapmsg_ue_id(ue_ngap_id_pair.ran_ue_ngap_id, ue_ngap_id_pair.amf_ue_ngap_id);
if (u == nullptr) {
@ -569,7 +569,7 @@ bool ngap::handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_release
return u->handle_ue_context_release_cmd(msg);
}
bool ngap::handle_ue_pdu_session_res_setup_request(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg)
bool ngap::handle_ue_pdu_session_res_setup_request(const asn1::ngap::pdu_session_res_setup_request_s& msg)
{
ue* u =
handle_ngapmsg_ue_id(msg.protocol_ies.ran_ue_ngap_id.value.value, msg.protocol_ies.amf_ue_ngap_id.value.value);
@ -590,9 +590,9 @@ bool ngap::handle_ue_pdu_session_res_setup_request(const asn1::ngap_nr::pdu_sess
/* NGAP message senders
********************************************************************************/
bool ngap::send_error_indication(const asn1::ngap_nr::cause_c& cause,
srsran::optional<uint32_t> ran_ue_ngap_id,
srsran::optional<uint32_t> amf_ue_ngap_id)
bool ngap::send_error_indication(const asn1::ngap::cause_c& cause,
srsran::optional<uint32_t> ran_ue_ngap_id,
srsran::optional<uint32_t> amf_ue_ngap_id)
{
if (amf_connected == false) {
logger.warning("AMF not connected.");
@ -600,7 +600,7 @@ bool ngap::send_error_indication(const asn1::ngap_nr::cause_c& cause,
}
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_ERROR_IND);
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_ERROR_IND);
auto& container = tx_pdu.init_msg().value.error_ind().protocol_ies;
uint16_t rnti = SRSRAN_INVALID_RNTI;
@ -664,7 +664,7 @@ bool ngap::setup_ng()
plmn = htonl(plmn);
ngap_pdu_c pdu;
pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_NG_SETUP);
pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_NG_SETUP);
ng_setup_request_ies_container& container = pdu.init_msg().value.ng_setup_request().protocol_ies;
global_gnb_id_s& global_gnb_id = container.global_ran_node_id.value.set_global_gnb_id();
global_gnb_id.plmn_id = tai.plmn_id;
@ -696,7 +696,7 @@ bool ngap::setup_ng()
container.supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list.resize(1);
container.supported_ta_list.value[0].broadcast_plmn_list[0].tai_slice_support_list[0].s_nssai.sst.from_number(1);
container.default_paging_drx.value.value = asn1::ngap_nr::paging_drx_opts::v256; // Todo: add to args, config file
container.default_paging_drx.value.value = asn1::ngap::paging_drx_opts::v256; // Todo: add to args, config file
return sctp_send_ngap_pdu(pdu, 0, "ngSetupRequest");
}
@ -705,7 +705,7 @@ bool ngap::setup_ng()
/* General helpers
********************************************************************************/
bool ngap::sctp_send_ngap_pdu(const asn1::ngap_nr::ngap_pdu_c& tx_pdu, uint32_t rnti, const char* procedure_name)
bool ngap::sctp_send_ngap_pdu(const asn1::ngap::ngap_pdu_c& tx_pdu, uint32_t rnti, const char* procedure_name)
{
if (not amf_connected and rnti != SRSRAN_INVALID_RNTI) {
logger.error("Aborting %s for rnti=0x%x. Cause: AMF is not connected.", procedure_name, rnti);

@ -24,7 +24,7 @@
#include "srsgnb/hdr/stack/ngap/ngap_ue_proc.h"
#include "srsran/common/int_helpers.h"
using namespace asn1::ngap_nr;
using namespace asn1::ngap;
namespace srsenb {
@ -54,10 +54,10 @@ ngap::ue::~ue() {}
/* NGAP message senders
********************************************************************************/
bool ngap::ue::send_initial_ue_message(asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
bool has_tmsi,
uint32_t s_tmsi)
bool ngap::ue::send_initial_ue_message(asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
bool has_tmsi,
uint32_t s_tmsi)
{
if (not ngap_ptr->amf_connected) {
logger.warning("AMF not connected");
@ -65,7 +65,7 @@ bool ngap::ue::send_initial_ue_message(asn1::ngap_nr::rrcestablishment_cause_e c
}
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_INIT_UE_MSG);
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_INIT_UE_MSG);
init_ue_msg_ies_container& container = tx_pdu.init_msg().value.init_ue_msg().protocol_ies;
// 5G-S-TMSI
@ -97,7 +97,7 @@ bool ngap::ue::send_initial_ue_message(asn1::ngap_nr::rrcestablishment_cause_e c
// UE context request for setup in the NAS registration request
container.ue_context_request_present = true;
container.ue_context_request.value = asn1::ngap_nr::ue_context_request_opts::options::requested;
container.ue_context_request.value = asn1::ngap::ue_context_request_opts::options::requested;
return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "InitialUEMessage");
}
@ -110,8 +110,8 @@ bool ngap::ue::send_ul_nas_transport(srsran::const_byte_span pdu)
}
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_UL_NAS_TRANSPORT);
asn1::ngap_nr::ul_nas_transport_ies_container& container = tx_pdu.init_msg().value.ul_nas_transport().protocol_ies;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_UL_NAS_TRANSPORT);
asn1::ngap::ul_nas_transport_ies_container& container = tx_pdu.init_msg().value.ul_nas_transport().protocol_ies;
// AMF UE NGAP ID
if (ctxt.amf_ue_ngap_id.has_value()) {
@ -152,7 +152,7 @@ bool ngap::ue::send_initial_ctxt_setup_response()
}
ngap_pdu_c tx_pdu;
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP);
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_ID_INIT_CONTEXT_SETUP);
init_context_setup_resp_s& container = tx_pdu.successful_outcome().value.init_context_setup_resp();
// AMF UE NGAP ID
@ -172,7 +172,7 @@ bool ngap::ue::send_initial_ctxt_setup_failure(cause_c cause)
}
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP);
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_INIT_CONTEXT_SETUP);
init_context_setup_fail_s& container = tx_pdu.unsuccessful_outcome().value.init_context_setup_fail();
// AMF UE NGAP ID
@ -200,7 +200,7 @@ bool ngap::ue::send_pdu_session_resource_setup_response(uint16_t
}
// TODO: QOS Params
ngap_pdu_c tx_pdu;
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_NR_ID_PDU_SESSION_RES_SETUP);
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_ID_PDU_SESSION_RES_SETUP);
pdu_session_res_setup_resp_s& container = tx_pdu.successful_outcome().value.pdu_session_res_setup_resp();
container.protocol_ies.amf_ue_ngap_id.value = ctxt.amf_ue_ngap_id.value();
container.protocol_ies.ran_ue_ngap_id.value = ctxt.ran_ue_ngap_id;
@ -214,8 +214,8 @@ bool ngap::ue::send_pdu_session_resource_setup_response(uint16_t
gtp_tunnel.gtp_teid.from_number(teid_in);
gtp_tunnel.transport_layer_address = addr_in;
asn1::ngap_nr::associated_qos_flow_list_l qos_flow_list;
asn1::ngap_nr::associated_qos_flow_item_s qos_flow_item;
asn1::ngap::associated_qos_flow_list_l qos_flow_list;
asn1::ngap::associated_qos_flow_item_s qos_flow_item;
qos_flow_item.qos_flow_id = 1;
qos_flow_list.push_back(qos_flow_item);
resp_transfer.dlqos_flow_per_tnl_info.associated_qos_flow_list = qos_flow_list;
@ -237,7 +237,7 @@ bool ngap::ue::send_ue_ctxt_release_complete()
}
ngap_pdu_c tx_pdu;
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_NR_ID_UE_CONTEXT_RELEASE);
tx_pdu.set_successful_outcome().load_info_obj(ASN1_NGAP_ID_UE_CONTEXT_RELEASE);
ue_context_release_complete_s& container = tx_pdu.successful_outcome().value.ue_context_release_complete();
// userLocationInformationNR
@ -253,7 +253,7 @@ bool ngap::ue::send_ue_ctxt_release_complete()
return ngap_ptr->sctp_send_ngap_pdu(tx_pdu, ctxt.rnti, "UEContextReleaseComplete");
}
bool ngap::ue::send_ue_context_release_request(asn1::ngap_nr::cause_c cause)
bool ngap::ue::send_ue_context_release_request(asn1::ngap::cause_c cause)
{
if (not ngap_ptr->amf_connected) {
logger.warning("AMF not connected");
@ -267,7 +267,7 @@ bool ngap::ue::send_ue_context_release_request(asn1::ngap_nr::cause_c cause)
release_requested = true;
ngap_pdu_c tx_pdu;
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_UE_CONTEXT_RELEASE_REQUEST);
tx_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_UE_CONTEXT_RELEASE_REQUEST);
ue_context_release_request_s& container = tx_pdu.init_msg().value.ue_context_release_request();
container.protocol_ies.cause.value = cause;
@ -294,7 +294,7 @@ bool ngap::ue::send_ue_context_release_request(asn1::ngap_nr::cause_c cause)
/* NGAP message handler
********************************************************************************/
bool ngap::ue::handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_context_setup_request_s& msg)
bool ngap::ue::handle_initial_ctxt_setup_request(const asn1::ngap::init_context_setup_request_s& msg)
{
if (not initial_context_setup_proc.launch(msg)) {
logger.error("Failed to start Initial Context Setup Procedure");
@ -303,7 +303,7 @@ bool ngap::ue::handle_initial_ctxt_setup_request(const asn1::ngap_nr::init_conte
return true;
}
bool ngap::ue::handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_release_cmd_s& msg)
bool ngap::ue::handle_ue_context_release_cmd(const asn1::ngap::ue_context_release_cmd_s& msg)
{
// TODO: Release UE context
if (not ue_context_release_proc.launch(msg)) {
@ -313,7 +313,7 @@ bool ngap::ue::handle_ue_context_release_cmd(const asn1::ngap_nr::ue_context_rel
return true;
}
bool ngap::ue::handle_pdu_session_res_setup_request(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg)
bool ngap::ue::handle_pdu_session_res_setup_request(const asn1::ngap::pdu_session_res_setup_request_s& msg)
{
if (not ue_pdu_session_res_setup_proc.launch(msg)) {
logger.error("Failed to start UE PDU Session Resource Setup Procedure");

@ -29,20 +29,20 @@ ngap_ue_bearer_manager::~ngap_ue_bearer_manager(){};
int ngap_ue_bearer_manager::add_pdu_session(uint16_t rnti,
uint8_t pdu_session_id,
const asn1::ngap_nr::qos_flow_level_qos_params_s& qos,
const asn1::ngap::qos_flow_level_qos_params_s& qos,
const asn1::bounded_bitstring<1, 160, true, true>& addr_out,
uint32_t teid_out,
uint16_t& lcid,
asn1::bounded_bitstring<1, 160, true, true>& addr_in,
uint32_t& teid_in,
asn1::ngap_nr::cause_c& cause)
asn1::ngap::cause_c& cause)
{
// Only add session if gtpu was successful
pdu_session_t::gtpu_tunnel tunnel;
if (addr_out.length() > 32) {
logger.error("Only addresses with length <= 32 (IPv4) are supported");
cause.set_radio_network().value = asn1::ngap_nr::cause_radio_network_opts::invalid_qos_combination;
cause.set_radio_network().value = asn1::ngap::cause_radio_network_opts::invalid_qos_combination;
return SRSRAN_ERROR;
}

@ -31,7 +31,7 @@ ngap_ue_initial_context_setup_proc::ngap_ue_initial_context_setup_proc(ngap_inte
srslog::basic_logger& logger_) :
logger(logger_), parent(parent_), rrc(rrc_), ue_ctxt(ue_ctxt_){};
proc_outcome_t ngap_ue_initial_context_setup_proc::init(const asn1::ngap_nr::init_context_setup_request_s& msg)
proc_outcome_t ngap_ue_initial_context_setup_proc::init(const asn1::ngap::init_context_setup_request_s& msg)
{
ue_ctxt->amf_pointer = msg.protocol_ies.guami.value.amf_pointer.to_number();
ue_ctxt->amf_set_id = msg.protocol_ies.guami.value.amf_set_id.to_number();
@ -87,7 +87,7 @@ ngap_ue_ue_context_release_proc::ngap_ue_ue_context_release_proc(ngap_interface_
bearer_manager = bearer_manager_;
};
proc_outcome_t ngap_ue_ue_context_release_proc::init(const asn1::ngap_nr::ue_context_release_cmd_s& msg)
proc_outcome_t ngap_ue_ue_context_release_proc::init(const asn1::ngap::ue_context_release_cmd_s& msg)
{
logger.info("Started %s", name());
bearer_manager->reset_pdu_sessions(ue_ctxt->rnti);
@ -109,20 +109,19 @@ ngap_ue_pdu_session_res_setup_proc::ngap_ue_pdu_session_res_setup_proc(ngap_inte
parent(parent_), rrc(rrc_), ue_ctxt(ue_ctxt_), bearer_manager(bearer_manager_), logger(logger_)
{}
proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap_nr::pdu_session_res_setup_request_s& msg)
proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap::pdu_session_res_setup_request_s& msg)
{
if (msg.protocol_ies.pdu_session_res_setup_list_su_req.value.size() != 1) {
logger.error("Not handling zero or multiple su requests");
return proc_outcome_t::error;
}
asn1::ngap_nr::pdu_session_res_setup_item_su_req_s su_req =
msg.protocol_ies.pdu_session_res_setup_list_su_req.value[0];
asn1::ngap::pdu_session_res_setup_item_su_req_s su_req = msg.protocol_ies.pdu_session_res_setup_list_su_req.value[0];
asn1::cbit_ref pdu_session_bref(su_req.pdu_session_res_setup_request_transfer.data(),
su_req.pdu_session_res_setup_request_transfer.size());
asn1::ngap_nr::pdu_session_res_setup_request_transfer_s pdu_ses_res_setup_req_trans;
asn1::ngap::pdu_session_res_setup_request_transfer_s pdu_ses_res_setup_req_trans;
if (pdu_ses_res_setup_req_trans.unpack(pdu_session_bref) != SRSRAN_SUCCESS) {
logger.error("Unable to unpack PDU session response setup request");
@ -135,11 +134,11 @@ proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap_nr::pdu
}
if (pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.type() !=
asn1::ngap_nr::up_transport_layer_info_c::types::gtp_tunnel) {
asn1::ngap::up_transport_layer_info_c::types::gtp_tunnel) {
logger.error("Expected GTP Tunnel");
return proc_outcome_t::error;
}
asn1::ngap_nr::qos_flow_setup_request_item_s qos_flow_setup =
asn1::ngap::qos_flow_setup_request_item_s qos_flow_setup =
pdu_ses_res_setup_req_trans.protocol_ies.qos_flow_setup_request_list.value[0];
srsran::const_span<uint8_t> nas_pdu_dummy;
uint32_t teid_out = 0;
@ -150,7 +149,7 @@ proc_outcome_t ngap_ue_pdu_session_res_setup_proc::init(const asn1::ngap_nr::pdu
teid_out |= pdu_ses_res_setup_req_trans.protocol_ies.ul_ngu_up_tnl_info.value.gtp_tunnel().gtp_teid[3];
// TODO: Check cause
asn1::ngap_nr::cause_c cause;
asn1::ngap::cause_c cause;
uint32_t teid_in = {};
uint16_t lcid = {};
asn1::bounded_bitstring<1, 160, true, true> addr_in;

@ -83,17 +83,17 @@ public:
rrc_logger.info(sec_key, 32, "Security key");
return SRSRAN_SUCCESS;
}
int ue_set_bitrates(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates)
int ue_set_bitrates(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates)
{
rrc_logger.info("Setting aggregate max bitrate. RNTI 0x%x", rnti);
return SRSRAN_SUCCESS;
}
int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates)
int set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates)
{
rrc_logger.info("Setting aggregate max bitrate");
return SRSRAN_SUCCESS;
}
int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap_nr::ue_security_cap_s& caps)
int ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap::ue_security_cap_s& caps)
{
rrc_logger.info("Setting security capabilities");
for (uint8_t i = 0; i < 8; i++) {
@ -128,10 +128,10 @@ public:
int allocate_lcid(uint16_t rnti) { return SRSRAN_SUCCESS; }
void write_dl_info(uint16_t rnti, srsran::unique_byte_buffer_t sdu) {}
bool sec_mod_proc_started = false;
uint8_t sec_key[32] = {};
asn1::ngap_nr::ue_security_cap_s sec_caps = {};
srslog::basic_logger& rrc_logger;
bool sec_mod_proc_started = false;
uint8_t sec_key[32] = {};
asn1::ngap::ue_security_cap_s sec_caps = {};
srslog::basic_logger& rrc_logger;
};
struct dummy_socket_manager : public srsran::socket_manager_itf {
dummy_socket_manager() : srsran::socket_manager_itf(srslog::fetch_basic_logger("TEST")) {}
@ -163,15 +163,15 @@ struct dummy_socket_manager : public srsran::socket_manager_itf {
void run_ng_setup(ngap& ngap_obj, amf_dummy& amf)
{
asn1::ngap_nr::ngap_pdu_c ngap_pdu;
asn1::ngap::ngap_pdu_c ngap_pdu;
// gNB -> AMF: NG Setup Request
srsran::unique_byte_buffer_t sdu = amf.read_msg();
TESTASSERT(sdu->N_bytes > 0);
asn1::cbit_ref cbref(sdu->msg, sdu->N_bytes);
TESTASSERT(ngap_pdu.unpack(cbref) == asn1::SRSASN_SUCCESS);
TESTASSERT(ngap_pdu.type().value == asn1::ngap_nr::ngap_pdu_c::types_opts::init_msg);
TESTASSERT(ngap_pdu.init_msg().proc_code == ASN1_NGAP_NR_ID_NG_SETUP);
TESTASSERT(ngap_pdu.type().value == asn1::ngap::ngap_pdu_c::types_opts::init_msg);
TESTASSERT(ngap_pdu.init_msg().proc_code == ASN1_NGAP_ID_NG_SETUP);
// AMF -> gNB: ng Setup Response
sockaddr_in amf_addr = {};
@ -200,24 +200,24 @@ void run_ng_initial_ue(ngap& ngap_obj, amf_dummy& amf, rrc_nr_dummy& rrc)
nas_pdu->N_bytes = sizeof(nas_reg_req);
uint32_t rnti = 0xf0f0;
ngap_obj.initial_ue(rnti, 0, asn1::ngap_nr::rrcestablishment_cause_opts::mo_sig, srsran::make_span(nas_pdu));
ngap_obj.initial_ue(rnti, 0, asn1::ngap::rrcestablishment_cause_opts::mo_sig, srsran::make_span(nas_pdu));
// gNB -> AMF: Inital UE message
asn1::ngap_nr::ngap_pdu_c ngap_initial_ue_pdu;
asn1::ngap::ngap_pdu_c ngap_initial_ue_pdu;
srsran::unique_byte_buffer_t sdu = amf.read_msg();
TESTASSERT(sdu->N_bytes > 0);
asn1::cbit_ref cbref(sdu->msg, sdu->N_bytes);
TESTASSERT_EQ(ngap_initial_ue_pdu.unpack(cbref), asn1::SRSASN_SUCCESS);
TESTASSERT_EQ(ngap_initial_ue_pdu.type().value, asn1::ngap_nr::ngap_pdu_c::types_opts::init_msg);
TESTASSERT_EQ(ngap_initial_ue_pdu.init_msg().proc_code, ASN1_NGAP_NR_ID_INIT_UE_MSG);
TESTASSERT_EQ(ngap_initial_ue_pdu.type().value, asn1::ngap::ngap_pdu_c::types_opts::init_msg);
TESTASSERT_EQ(ngap_initial_ue_pdu.init_msg().proc_code, ASN1_NGAP_ID_INIT_UE_MSG);
// AMF -> gNB: Initial Context Setup Request
sockaddr_in amf_addr = {};
sctp_sndrcvinfo rcvinfo = {};
int flags = 0;
asn1::ngap_nr::ngap_pdu_c ngap_initial_ctx_req_pdu;
ngap_initial_ctx_req_pdu.set_init_msg().load_info_obj(ASN1_NGAP_NR_ID_INIT_CONTEXT_SETUP);
asn1::ngap::ngap_pdu_c ngap_initial_ctx_req_pdu;
ngap_initial_ctx_req_pdu.set_init_msg().load_info_obj(ASN1_NGAP_ID_INIT_CONTEXT_SETUP);
auto& container = ngap_initial_ctx_req_pdu.init_msg().value.init_context_setup_request().protocol_ies;
container.amf_ue_ngap_id.value = 0x1;

@ -134,37 +134,84 @@ void set_rach_cfg_common(const srsran_prach_cfg_t& prach_cfg, asn1::rrc_nr::rach
/// Fill list of CSI-ReportConfig with gNB config
int fill_csi_report_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
csi_meas_cfg.csi_report_cfg_to_add_mod_list_present = true;
csi_meas_cfg.csi_report_cfg_to_add_mod_list.resize(1);
auto& csi_report = csi_meas_cfg.csi_report_cfg_to_add_mod_list[0];
csi_report.report_cfg_id = 0;
csi_report.res_for_ch_meas = 0;
csi_report.csi_im_res_for_interference_present = true;
csi_report.csi_im_res_for_interference = 1;
csi_report.report_cfg_type.set_periodic();
csi_report.report_cfg_type.periodic().report_slot_cfg.set_slots80();
csi_report.report_cfg_type.periodic().pucch_csi_res_list.resize(1);
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].ul_bw_part_id = 0;
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].pucch_res = 1; // was 17 in orig PCAP
csi_report.report_quant.set_cri_ri_pmi_cqi();
// Report freq config (optional)
csi_report.report_freq_cfg_present = true;
csi_report.report_freq_cfg.cqi_format_ind_present = true;
csi_report.report_freq_cfg.cqi_format_ind = csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::wideband_cqi;
csi_report.time_restrict_for_ch_meass = csi_report_cfg_s::time_restrict_for_ch_meass_opts::not_cfgured;
csi_report.time_restrict_for_interference_meass =
asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_interference_meass_opts::not_cfgured;
csi_report.group_based_beam_report.set_disabled();
// Skip CQI table (optional)
csi_report.cqi_table_present = true;
csi_report.cqi_table = asn1::rrc_nr::csi_report_cfg_s::cqi_table_opts::table2;
csi_report.subband_size = asn1::rrc_nr::csi_report_cfg_s::subband_size_opts::value1;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 5;
if (cfg.is_standalone) {
csi_meas_cfg.csi_report_cfg_to_add_mod_list_present = true;
csi_meas_cfg.csi_report_cfg_to_add_mod_list.resize(1);
auto& csi_report = csi_meas_cfg.csi_report_cfg_to_add_mod_list[0];
csi_report.report_cfg_id = 0;
csi_report.res_for_ch_meas = 0;
csi_report.csi_im_res_for_interference_present = true;
csi_report.csi_im_res_for_interference = 1;
csi_report.report_cfg_type.set_periodic();
csi_report.report_cfg_type.periodic().report_slot_cfg.set_slots80();
csi_report.report_cfg_type.periodic().pucch_csi_res_list.resize(1);
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].ul_bw_part_id = 0;
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].pucch_res =
17; // was 17 in orig PCAP, but code for NSA it was set to 1
csi_report.report_quant.set_cri_ri_pmi_cqi();
// Report freq config (optional)
csi_report.report_freq_cfg_present = true;
csi_report.report_freq_cfg.cqi_format_ind_present = true;
csi_report.report_freq_cfg.cqi_format_ind.value =
csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::wideband_cqi;
csi_report.report_freq_cfg.pmi_format_ind_present = true;
csi_report.report_freq_cfg.pmi_format_ind.value =
csi_report_cfg_s::report_freq_cfg_s_::pmi_format_ind_opts::wideband_pmi;
csi_report.time_restrict_for_ch_meass.value = csi_report_cfg_s::time_restrict_for_ch_meass_opts::not_cfgured;
csi_report.time_restrict_for_interference_meass.value =
asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_interference_meass_opts::not_cfgured;
csi_report.codebook_cfg_present = true;
auto& type1 = csi_report.codebook_cfg.codebook_type.set_type1();
type1.sub_type.set_type_i_single_panel();
type1.sub_type.type_i_single_panel().nr_of_ant_ports.set_two();
type1.sub_type.type_i_single_panel().nr_of_ant_ports.two().two_tx_codebook_subset_restrict.from_number(0b111111);
type1.sub_type.type_i_single_panel().type_i_single_panel_ri_restrict.from_number(0x03);
type1.codebook_mode = 1;
csi_report.group_based_beam_report.set_disabled();
// Skip CQI table (optional)
csi_report.cqi_table_present = true;
csi_report.cqi_table = asn1::rrc_nr::csi_report_cfg_s::cqi_table_opts::table2;
csi_report.subband_size = asn1::rrc_nr::csi_report_cfg_s::subband_size_opts::value1;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 9;
} else {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 7;
}
} else {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 7;
csi_meas_cfg.csi_report_cfg_to_add_mod_list_present = true;
csi_meas_cfg.csi_report_cfg_to_add_mod_list.resize(1);
auto& csi_report = csi_meas_cfg.csi_report_cfg_to_add_mod_list[0];
csi_report.report_cfg_id = 0;
csi_report.res_for_ch_meas = 0;
csi_report.csi_im_res_for_interference_present = true;
csi_report.csi_im_res_for_interference = 1;
csi_report.report_cfg_type.set_periodic();
csi_report.report_cfg_type.periodic().report_slot_cfg.set_slots80();
csi_report.report_cfg_type.periodic().pucch_csi_res_list.resize(1);
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].ul_bw_part_id = 0;
csi_report.report_cfg_type.periodic().pucch_csi_res_list[0].pucch_res = 1; // was 17 in orig PCAP
csi_report.report_quant.set_cri_ri_pmi_cqi();
// Report freq config (optional)
csi_report.report_freq_cfg_present = true;
csi_report.report_freq_cfg.cqi_format_ind_present = true;
csi_report.report_freq_cfg.cqi_format_ind = csi_report_cfg_s::report_freq_cfg_s_::cqi_format_ind_opts::wideband_cqi;
csi_report.time_restrict_for_ch_meass = csi_report_cfg_s::time_restrict_for_ch_meass_opts::not_cfgured;
csi_report.time_restrict_for_interference_meass =
asn1::rrc_nr::csi_report_cfg_s::time_restrict_for_interference_meass_opts::not_cfgured;
csi_report.group_based_beam_report.set_disabled();
// Skip CQI table (optional)
csi_report.cqi_table_present = true;
csi_report.cqi_table = asn1::rrc_nr::csi_report_cfg_s::cqi_table_opts::table2;
csi_report.subband_size = asn1::rrc_nr::csi_report_cfg_s::subband_size_opts::value1;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 5;
} else {
csi_report.report_cfg_type.periodic().report_slot_cfg.slots80() = 7;
}
}
return SRSRAN_SUCCESS;
@ -173,101 +220,201 @@ int fill_csi_report_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_me
/// Fill lists of NZP-CSI-RS-Resource and NZP-CSI-RS-ResourceSet with gNB config
void fill_nzp_csi_rs_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(5);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
// item 0
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_row2();
nzp_csi_res[0].res_map.freq_domain_alloc.row2().from_number(0b100000000000);
nzp_csi_res[0].res_map.nrof_ports = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
// Skip pwr_ctrl_offset_ss_present
nzp_csi_res[0].scrambling_id = cfg.cell_list[0].phy_cell.cell_id;
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80();
nzp_csi_res[0].periodicity_and_offset.slots80() = 1;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
// item 1
nzp_csi_res[1] = nzp_csi_res[0];
nzp_csi_res[1].nzp_csi_rs_res_id = 1;
nzp_csi_res[1].res_map.freq_domain_alloc.set_row1();
nzp_csi_res[1].res_map.freq_domain_alloc.row1().from_number(0b0001);
nzp_csi_res[1].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[1].res_map.density.set_three();
nzp_csi_res[1].periodicity_and_offset.set_slots40();
nzp_csi_res[1].periodicity_and_offset.slots40() = 11;
// item 2
nzp_csi_res[2] = nzp_csi_res[1];
nzp_csi_res[2].nzp_csi_rs_res_id = 2;
nzp_csi_res[2].res_map.first_ofdm_symbol_in_time_domain = 8;
nzp_csi_res[2].periodicity_and_offset.set_slots40();
nzp_csi_res[2].periodicity_and_offset.slots40() = 11;
// item 3
nzp_csi_res[3] = nzp_csi_res[1];
nzp_csi_res[3].nzp_csi_rs_res_id = 3;
nzp_csi_res[3].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[3].periodicity_and_offset.set_slots40();
nzp_csi_res[3].periodicity_and_offset.slots40() = 12;
// item 4
nzp_csi_res[4] = nzp_csi_res[1];
nzp_csi_res[4].nzp_csi_rs_res_id = 4;
nzp_csi_res[4].res_map.first_ofdm_symbol_in_time_domain = 8;
nzp_csi_res[4].periodicity_and_offset.set_slots40();
nzp_csi_res[4].periodicity_and_offset.slots40() = 12;
} else {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(1);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_row2();
nzp_csi_res[0].res_map.freq_domain_alloc.row2().from_number(0b100000000000);
nzp_csi_res[0].res_map.nrof_ports = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
// Skip pwr_ctrl_offset_ss_present
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80() = 0;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
}
if (cfg.is_standalone) {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(5);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
// item 0
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_other();
nzp_csi_res[0].res_map.freq_domain_alloc.other().from_number(0b100000);
nzp_csi_res[0].res_map.nrof_ports.value = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p2;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type.value = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::fd_cdm2;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
nzp_csi_res[0].pwr_ctrl_offset_ss_present = true;
nzp_csi_res[0].pwr_ctrl_offset_ss.value = asn1::rrc_nr::nzp_csi_rs_res_s::pwr_ctrl_offset_ss_opts::db0;
nzp_csi_res[0].scrambling_id = cfg.cell_list[0].phy_cell.cell_id;
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80();
nzp_csi_res[0].periodicity_and_offset.slots80() = 1;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
// item 1
nzp_csi_res[1] = nzp_csi_res[0];
nzp_csi_res[1].nzp_csi_rs_res_id = 1;
nzp_csi_res[1].res_map.freq_domain_alloc.set_row1();
nzp_csi_res[1].res_map.freq_domain_alloc.row1().from_number(0b0001);
nzp_csi_res[1].res_map.nrof_ports.value = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[1].res_map.cdm_type.value = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[1].res_map.density.set_three();
nzp_csi_res[1].periodicity_and_offset.set_slots40();
nzp_csi_res[1].periodicity_and_offset.slots40() = 11;
// item 2
nzp_csi_res[2] = nzp_csi_res[1];
nzp_csi_res[2].nzp_csi_rs_res_id = 2;
nzp_csi_res[2].res_map.first_ofdm_symbol_in_time_domain = 8;
// item 3
nzp_csi_res[3] = nzp_csi_res[1];
nzp_csi_res[3].nzp_csi_rs_res_id = 3;
nzp_csi_res[3].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[3].periodicity_and_offset.set_slots40();
nzp_csi_res[3].periodicity_and_offset.slots40() = 12;
// item 4
nzp_csi_res[4] = nzp_csi_res[1];
nzp_csi_res[4].nzp_csi_rs_res_id = 4;
nzp_csi_res[4].res_map.first_ofdm_symbol_in_time_domain = 8;
nzp_csi_res[4].periodicity_and_offset.set_slots40();
nzp_csi_res[4].periodicity_and_offset.slots40() = 12;
} else {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(1);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_row2();
nzp_csi_res[0].res_map.freq_domain_alloc.row2().from_number(0b100000000000);
nzp_csi_res[0].res_map.nrof_ports.value = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type.value = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
// Skip pwr_ctrl_offset_ss_present
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80() = 0;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
}
// Fill NZP-CSI Resource Sets
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(2);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
// item 0
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// item 1
nzp_csi_res_set[1].nzp_csi_res_set_id = 1;
nzp_csi_res_set[1].nzp_csi_rs_res.resize(4);
nzp_csi_res_set[1].nzp_csi_rs_res[0] = 1;
nzp_csi_res_set[1].nzp_csi_rs_res[1] = 2;
nzp_csi_res_set[1].nzp_csi_rs_res[2] = 3;
nzp_csi_res_set[1].nzp_csi_rs_res[3] = 4;
// // Skip TRS info
// Fill NZP-CSI Resource Sets
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(2);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
// item 0
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// item 1
nzp_csi_res_set[1].nzp_csi_res_set_id = 1;
nzp_csi_res_set[1].nzp_csi_rs_res.resize(4);
nzp_csi_res_set[1].nzp_csi_rs_res[0] = 1;
nzp_csi_res_set[1].nzp_csi_rs_res[1] = 2;
nzp_csi_res_set[1].nzp_csi_rs_res[2] = 3;
nzp_csi_res_set[1].nzp_csi_rs_res[3] = 4;
nzp_csi_res_set[1].trs_info_present = true;
// // Skip TRS info
} else {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(1);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// Skip TRS info
}
} else {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(1);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// Skip TRS info
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(5);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
// item 0
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_row2();
nzp_csi_res[0].res_map.freq_domain_alloc.row2().from_number(0b100000000000);
nzp_csi_res[0].res_map.nrof_ports = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
// Skip pwr_ctrl_offset_ss_present
nzp_csi_res[0].scrambling_id = cfg.cell_list[0].phy_cell.cell_id;
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80();
nzp_csi_res[0].periodicity_and_offset.slots80() = 1;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
// item 1
nzp_csi_res[1] = nzp_csi_res[0];
nzp_csi_res[1].nzp_csi_rs_res_id = 1;
nzp_csi_res[1].res_map.freq_domain_alloc.set_row1();
nzp_csi_res[1].res_map.freq_domain_alloc.row1().from_number(0b0001);
nzp_csi_res[1].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[1].res_map.density.set_three();
nzp_csi_res[1].periodicity_and_offset.set_slots40();
nzp_csi_res[1].periodicity_and_offset.slots40() = 11;
// item 2
nzp_csi_res[2] = nzp_csi_res[1];
nzp_csi_res[2].nzp_csi_rs_res_id = 2;
nzp_csi_res[2].res_map.first_ofdm_symbol_in_time_domain = 8;
nzp_csi_res[2].periodicity_and_offset.set_slots40();
nzp_csi_res[2].periodicity_and_offset.slots40() = 11;
// item 3
nzp_csi_res[3] = nzp_csi_res[1];
nzp_csi_res[3].nzp_csi_rs_res_id = 3;
nzp_csi_res[3].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[3].periodicity_and_offset.set_slots40();
nzp_csi_res[3].periodicity_and_offset.slots40() = 12;
// item 4
nzp_csi_res[4] = nzp_csi_res[1];
nzp_csi_res[4].nzp_csi_rs_res_id = 4;
nzp_csi_res[4].res_map.first_ofdm_symbol_in_time_domain = 8;
nzp_csi_res[4].periodicity_and_offset.set_slots40();
nzp_csi_res[4].periodicity_and_offset.slots40() = 12;
} else {
csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list.resize(1);
auto& nzp_csi_res = csi_meas_cfg.nzp_csi_rs_res_to_add_mod_list;
nzp_csi_res[0].nzp_csi_rs_res_id = 0;
nzp_csi_res[0].res_map.freq_domain_alloc.set_row2();
nzp_csi_res[0].res_map.freq_domain_alloc.row2().from_number(0b100000000000);
nzp_csi_res[0].res_map.nrof_ports = asn1::rrc_nr::csi_rs_res_map_s::nrof_ports_opts::p1;
nzp_csi_res[0].res_map.first_ofdm_symbol_in_time_domain = 4;
nzp_csi_res[0].res_map.cdm_type = asn1::rrc_nr::csi_rs_res_map_s::cdm_type_opts::no_cdm;
nzp_csi_res[0].res_map.density.set_one();
nzp_csi_res[0].res_map.freq_band.start_rb = 0;
nzp_csi_res[0].res_map.freq_band.nrof_rbs = 52;
nzp_csi_res[0].pwr_ctrl_offset = 0;
// Skip pwr_ctrl_offset_ss_present
nzp_csi_res[0].periodicity_and_offset_present = true;
nzp_csi_res[0].periodicity_and_offset.set_slots80() = 0;
// optional
nzp_csi_res[0].qcl_info_periodic_csi_rs_present = true;
nzp_csi_res[0].qcl_info_periodic_csi_rs = 0;
}
// Fill NZP-CSI Resource Sets
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list_present = true;
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(2);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
// item 0
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// item 1
nzp_csi_res_set[1].nzp_csi_res_set_id = 1;
nzp_csi_res_set[1].nzp_csi_rs_res.resize(4);
nzp_csi_res_set[1].nzp_csi_rs_res[0] = 1;
nzp_csi_res_set[1].nzp_csi_rs_res[1] = 2;
nzp_csi_res_set[1].nzp_csi_rs_res[2] = 3;
nzp_csi_res_set[1].nzp_csi_rs_res[3] = 4;
// // Skip TRS info
} else {
csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list.resize(1);
auto& nzp_csi_res_set = csi_meas_cfg.nzp_csi_rs_res_set_to_add_mod_list;
nzp_csi_res_set[0].nzp_csi_res_set_id = 0;
nzp_csi_res_set[0].nzp_csi_rs_res.resize(1);
nzp_csi_res_set[0].nzp_csi_rs_res[0] = 0;
// Skip TRS info
}
}
}
@ -300,6 +447,40 @@ void fill_csi_resource_cfg_to_add(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_m
}
}
void fill_csi_im_resource_cfg_to_add(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
if (cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_FDD) {
// csi-IM-ResourceToAddModList
csi_meas_cfg.csi_im_res_to_add_mod_list_present = true;
csi_meas_cfg.csi_im_res_to_add_mod_list.resize(1);
auto& csi_im_res = csi_meas_cfg.csi_im_res_to_add_mod_list[0];
csi_im_res.csi_im_res_id = 0;
csi_im_res.csi_im_res_elem_pattern_present = true;
// csi-im-resource pattern1
auto& csi_res_pattern1 = csi_im_res.csi_im_res_elem_pattern.set_pattern1();
csi_res_pattern1.subcarrier_location_p1.value =
csi_im_res_s::csi_im_res_elem_pattern_c_::pattern1_s_::subcarrier_location_p1_opts::s8;
csi_res_pattern1.symbol_location_p1 = 8;
// csi-im-resource freqBand
csi_im_res.freq_band_present = true;
csi_im_res.freq_band.start_rb = 0;
csi_im_res.freq_band.nrof_rbs = 52;
// csi-im-resource periodicity_and_offset
csi_im_res.periodicity_and_offset_present = true;
csi_im_res.periodicity_and_offset.set_slots80();
csi_im_res.periodicity_and_offset.slots80() = 1;
// csi-IM-ResourceSetToAddModList
csi_meas_cfg.csi_im_res_set_to_add_mod_list_present = true;
csi_meas_cfg.csi_im_res_set_to_add_mod_list.resize(1);
auto& csi_im_res_set = csi_meas_cfg.csi_im_res_set_to_add_mod_list[0];
csi_im_res_set.csi_im_res_set_id = 0;
csi_im_res_set.csi_im_res.push_back(0);
}
}
/// Fill CSI-MeasConfig with gNB config
int fill_csi_meas_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas_cfg)
{
@ -315,11 +496,13 @@ int fill_csi_meas_from_enb_cfg(const rrc_nr_cfg_t& cfg, csi_meas_cfg_s& csi_meas
// Fill NZP-CSI Resources
fill_nzp_csi_rs_from_enb_cfg(cfg, csi_meas_cfg);
// CSI IM config
// TODO: add csi im config
if (cfg.is_standalone) {
// CSI IM config
fill_csi_im_resource_cfg_to_add(cfg, csi_meas_cfg);
// CSI resource config
// TODO: add csi resource config
// CSI report config
fill_csi_report_from_enb_cfg(cfg, csi_meas_cfg);
}
return SRSRAN_SUCCESS;
}
@ -896,8 +1079,10 @@ int fill_master_cell_cfg_from_enb_cfg(const rrc_nr_cfg_t& cfg, uint32_t cc, asn1
// spCellConfig -- Need M
out.sp_cell_cfg_present = true;
fill_sp_cell_cfg_from_enb_cfg(cfg, cc, out.sp_cell_cfg);
out.sp_cell_cfg.recfg_with_sync_present = false;
out.sp_cell_cfg.sp_cell_cfg_ded.csi_meas_cfg_present = false; // Note: not supported
out.sp_cell_cfg.recfg_with_sync_present = false;
// The current CSI config make the PUCCH decoding fail. We temporarily disable it until further investigation
out.sp_cell_cfg.sp_cell_cfg_ded.csi_meas_cfg_present = false;
return SRSRAN_SUCCESS;
}

@ -588,15 +588,15 @@ int rrc_nr::ue_set_security_cfg_key(uint16_t rnti, const asn1::fixed_bitstring<2
u.set_security_key(key);
return SRSRAN_SUCCESS;
}
int rrc_nr::ue_set_bitrates(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates)
int rrc_nr::ue_set_bitrates(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates)
{
return SRSRAN_SUCCESS;
}
int rrc_nr::set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap_nr::ue_aggregate_maximum_bit_rate_s& rates)
int rrc_nr::set_aggregate_max_bitrate(uint16_t rnti, const asn1::ngap::ue_aggregate_maximum_bit_rate_s& rates)
{
return SRSRAN_SUCCESS;
}
int rrc_nr::ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap_nr::ue_security_cap_s& caps)
int rrc_nr::ue_set_security_cfg_capabilities(uint16_t rnti, const asn1::ngap::ue_security_cap_s& caps)
{
logger.debug("Setting securtiy capabilites for rnti=0x%x", rnti);
auto ue_it = users.find(rnti);

@ -35,7 +35,7 @@ asn1::rrc_nr::security_algorithm_cfg_s nr_security_context::get_security_algorit
return ret;
}
bool nr_security_context::set_security_capabilities(const asn1::ngap_nr::ue_security_cap_s& caps)
bool nr_security_context::set_security_capabilities(const asn1::ngap::ue_security_cap_s& caps)
{
security_capabilities = caps;

@ -106,7 +106,7 @@ void rrc_nr::ue::activity_timer_expired(const activity_timeout_type_t type)
state = rrc_nr_state_t::RRC_INACTIVE;
if (parent->cfg.is_standalone) {
// Start NGAP Release UE context
parent->ngap->user_release_request(rnti, asn1::ngap_nr::cause_radio_network_opts::user_inactivity);
parent->ngap->user_release_request(rnti, asn1::ngap::cause_radio_network_opts::user_inactivity);
} else {
parent->rrc_eutra->sgnb_inactivity_timeout(eutra_rnti);
}
@ -990,7 +990,7 @@ void rrc_nr::ue::handle_rrc_setup_complete(const asn1::rrc_nr::rrc_setup_complet
cell_group_cfg = next_cell_group_cfg;
// Create UE context in NGAP
using ngap_cause_t = asn1::ngap_nr::rrcestablishment_cause_opts::options;
using ngap_cause_t = asn1::ngap::rrcestablishment_cause_opts::options;
auto ngap_cause = (ngap_cause_t)ctxt.connection_cause.value; // NGAP and RRC causes seem to have a 1-1 mapping
parent->ngap->initial_ue(
rnti, uecfg.carriers[0].cc, ngap_cause, msg.crit_exts.rrc_setup_complete().ded_nas_msg, ctxt.setup_ue_id);
@ -1026,7 +1026,7 @@ void rrc_nr::ue::send_security_mode_command(srsran::unique_byte_buffer_t nas_pdu
ies.security_cfg_smc.security_algorithm_cfg = sec_ctx.get_security_algorithm_cfg();
if (send_dl_dcch(srsran::nr_srb::srb1, dl_dcch_msg) != SRSRAN_SUCCESS) {
parent->ngap->user_release_request(rnti, asn1::ngap_nr::cause_radio_network_opts::radio_res_not_available);
parent->ngap->user_release_request(rnti, asn1::ngap::cause_radio_network_opts::radio_res_not_available);
}
}
@ -1070,7 +1070,7 @@ void rrc_nr::ue::send_rrc_reconfiguration()
// Pack masterCellGroup into container
srsran::unique_byte_buffer_t pdu = parent->pack_into_pdu(master_cell_group, __FUNCTION__);
if (pdu == nullptr) {
parent->ngap->user_release_request(rnti, asn1::ngap_nr::cause_radio_network_opts::radio_res_not_available);
parent->ngap->user_release_request(rnti, asn1::ngap::cause_radio_network_opts::radio_res_not_available);
return;
}
ies.non_crit_ext.master_cell_group.resize(pdu->N_bytes);
@ -1106,7 +1106,7 @@ void rrc_nr::ue::send_rrc_reconfiguration()
ies.non_crit_ext_present = ies.non_crit_ext.master_cell_group_present or ies.non_crit_ext.ded_nas_msg_list_present;
if (send_dl_dcch(srsran::nr_srb::srb1, dl_dcch_msg) != SRSRAN_SUCCESS) {
parent->ngap->user_release_request(rnti, asn1::ngap_nr::cause_radio_network_opts::radio_res_not_available);
parent->ngap->user_release_request(rnti, asn1::ngap::cause_radio_network_opts::radio_res_not_available);
}
}
@ -1149,7 +1149,7 @@ void rrc_nr::ue::send_dl_information_transfer(srsran::unique_byte_buffer_t sdu)
memcpy(ies.ded_nas_msg.data(), sdu->data(), ies.ded_nas_msg.size());
if (send_dl_dcch(srsran::nr_srb::srb1, dl_dcch_msg) != SRSRAN_SUCCESS) {
parent->ngap->user_release_request(rnti, asn1::ngap_nr::cause_radio_network_opts::radio_res_not_available);
parent->ngap->user_release_request(rnti, asn1::ngap::cause_radio_network_opts::radio_res_not_available);
}
}
@ -1320,6 +1320,9 @@ int rrc_nr::ue::update_mac(const cell_group_cfg_s& cell_group_config, bool is_co
}
parent->mac->ue_cfg(rnti, uecfg);
srsran::make_csi_cfg_from_serv_cell(cell_group_config.sp_cell_cfg.sp_cell_cfg_ded, &uecfg.phy_cfg.csi);
return SRSRAN_SUCCESS;
}

@ -61,11 +61,11 @@ public:
class ngap_rrc_tester : public ngap_dummy
{
public:
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap_nr::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi)
void initial_ue(uint16_t rnti,
uint32_t gnb_cc_idx,
asn1::ngap::rrcestablishment_cause_e cause,
srsran::const_byte_span pdu,
uint32_t s_tmsi)
{
last_sdu_rnti = rnti;
last_pdu.resize(pdu.size());

Loading…
Cancel
Save