Commit c4e0f475 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

upload RRC file

parent 0339b49b
......@@ -50,15 +50,20 @@
#include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LITE/defs_NB_IoT.h"
#include "RRC/NR/defs_NR.h"
typedef struct {
/// RAN context config file name
char *config_file_name;
/// Number of RRC instances in this node
int nb_inst;
/// Number of NB_IoT RRC instances in this node
int nb_nb_iot_rrc_inst;
/// Number of NR RRC instances in this node
int nb_nr_inst;
/// Number of Component Carriers per instance in this node
int *nb_CC;
/// Number of NB_IoT instances in this node
int nb_nb_iot_rrc_inst;
/// Number of NR Component Carriers per instance in this node
int *nb_nr_CC;
/// Number of MACRLC instances in this node
int nb_macrlc_inst;
/// Number of NB_IoT MACRLC instances in this node
......@@ -85,6 +90,8 @@ typedef struct {
struct eNB_RRC_INST_s **rrc;
/// NB_IoT RRC context variables
//struct eNB_RRC_INST_NB_IoT_s **nb_iot_rrc;
/// NR RRC context variables
struct gNB_RRC_INST_s **nr_rrc;
/// MAC context variables
struct eNB_MAC_INST_s **mac;
/// NB_IoT MAC context variables
......
This diff is collapsed.
NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- TAG-HANDOVER-COMMAND-START
HandoverCommand ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverCommand HandoverCommand-IEs,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverCommand-IEs ::= SEQUENCE {
handoverCommandMessage OCTET STRING (CONTAINING RRCReconfiguration),
nonCriticalExtension SEQUENCE {} OPTIONAL
}
-- TAG-HANDOVER-COMMAND-STOP
-- TAG-HANDOVER-PREPARATION-INFORMATION-START
HandoverPreparationInformation ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
handoverPreparationInformation HandoverPreparationInformation-IEs,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
HandoverPreparationInformation-IEs ::= SEQUENCE {
ue-CapabilityRAT-List UE-CapabilityRAT-ContainerList,
sourceConfig OCTET STRING (CONTAINING RRCReconfiguration),
rrm-Config RRM-Config OPTIONAL,
as-Context AS-Context OPTIONAL,
nonCriticalExtension SEQUENCE {} OPTIONAL
}
AS-Context ::= SEQUENCE {
reestablishmentInfo SEQUENCE {
sourcePhysCellId PhysCellId,
targetCellShortMAC-I ShortMAC-I,
additionalReestabInfoList ReestabNCellInfoList OPTIONAL
} OPTIONAL,
-- FFS Whether to change e.g. move all re-establishment info to Xx
configRestrictInfo ConfigRestrictInfoSCG OPTIONAL,
...
}
ReestabNCellInfoList ::= SEQUENCE ( SIZE (1..maxCellPrep) ) OF ReestabNCellInfo
ReestabNCellInfo::= SEQUENCE{
cellIdentity CellIdentity,
key-gNodeB-Star BIT STRING (SIZE (256)),
shortMAC-I ShortMAC-I
}
RRM-Config ::= SEQUENCE {
ue-InactiveTime ENUMERATED {
s1, s2, s3, s5, s7, s10, s15, s20,
s25, s30, s40, s50, min1, min1s20c, min1s40,
min2, min2s30, min3, min3s30, min4, min5, min6,
min7, min8, min9, min10, min12, min14, min17, min20,
min24, min28, min33, min38, min44, min50, hr1,
hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6,
hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2,
day2hr12, day3, day4, day5, day7, day10, day14, day19,
day24, day30, dayMoreThan30} OPTIONAL ,
candidateCellInfoList CandidateCellInfoList OPTIONAL,
...
}
-- TAG-HANDOVER-PREPARATION-INFORMATION-STOP
-- TAG-CG-CONFIG-START
CG-Config ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
cg-Config CG-Config-IEs,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
CG-Config-IEs ::= SEQUENCE {
scg-CellGroupConfig OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL,
scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
configRestrictModReq ConfigRestrictModReqSCG OPTIONAL,
drx-InfoSCG DRX-Info OPTIONAL,
candidateCellInfoListSN OCTET STRING (CONTAINING CandidateCellInfoList) OPTIONAL,
measConfigSN MeasConfigSN OPTIONAL,
selectedBandCombinationNR BandCombinationIndex OPTIONAL,
nonCriticalExtension SEQUENCE {} OPTIONAL
}
MeasConfigSN ::= SEQUENCE {
measuredFrequenciesFR1 SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL,
...
}
NR-FreqInfo ::= SEQUENCE {
measuredFrequency ARFCN-ValueNR OPTIONAL,
...
}
ConfigRestrictModReqSCG ::= SEQUENCE {
requestedBC-MRDC BandCombinationIndex OPTIONAL,
requestedBPC-ListMRDC BPC-IndexList OPTIONAL,
requestedP-MaxFR1 P-Max OPTIONAL,
...
}
BandCombinationIndex ::= INTEGER (1..maxBandComb)
-- TAG-CG-CONFIG-STOP
-- TAG-CG-CONFIG-INFO-START
CG-ConfigInfo ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
cg-ConfigInfo CG-ConfigInfo-IEs,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
CG-ConfigInfo-IEs ::= SEQUENCE {
ue-CapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList) OPTIONAL,-- Cond SN-Addition
candidateCellInfoListMN CandidateCellInfoList OPTIONAL,
candidateCellInfoListSN OCTET STRING (CONTAINING CandidateCellInfoList) OPTIONAL,
measResultCellListSFTD MeasResultCellListSFTD OPTIONAL,
scgFailureInfo SEQUENCE {
failureType ENUMERATED { t310-Expiry, randomAccessProblem,
rlc-MaxNumRetx, scg-ChangeFailure,
scg-reconfigFailure,
srb3-IntegrityFailure},
measResultSCG OCTET STRING (CONTAINING MeasResultSCG-Failure)
} OPTIONAL,
configRestrictInfo ConfigRestrictInfoSCG OPTIONAL,
drx-InfoMCG DRX-Info OPTIONAL,
measConfigMN MeasConfigMN OPTIONAL,
sourceConfigSCG OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL,
scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
mcg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
nonCriticalExtension SEQUENCE {} OPTIONAL
}
ConfigRestrictInfoSCG ::= SEQUENCE {
allowedBC-ListMRDC BandCombinationIndexList OPTIONAL,
allowedBPC-ListMRDC BPC-IndexList OPTIONAL,
powerCoordination-FR1 SEQUENCE {
p-maxNR P-Max OPTIONAL,
p-maxEUTRA P-Max OPTIONAL
} OPTIONAL,
servCellIndexRangeSCG SEQUENCE {
lowBound ServCellIndex,
upBound ServCellIndex
} OPTIONAL, -- Cond SN-Addition
maxMeasFreqsSCG-NR INTEGER(1..maxMeasFreqsMN) OPTIONAL,
...
}
BandCombinationIndexList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationIndex
BPC-IndexList ::= SEQUENCE (SIZE (1..maxBasebandProcComb)) OF BPC-Index
BPC-Index ::= INTEGER (1..maxBasebandProcComb)
DRX-Info ::= SEQUENCE {
drx-LongCycleStartOffset CHOICE {
ms10 INTEGER(0..9),
ms20 INTEGER(0..19),
ms32 INTEGER(0..31),
ms40 INTEGER(0..39),
ms60 INTEGER(0..59),
ms64 INTEGER(0..63),
ms70 INTEGER(0..69),
ms80 INTEGER(0..79),
ms128 INTEGER(0..127),
ms160 INTEGER(0..159),
ms256 INTEGER(0..255),
ms320 INTEGER(0..319),
ms512 INTEGER(0..511),
ms640 INTEGER(0..639),
ms1024 INTEGER(0..1023),
ms1280 INTEGER(0..1279),
ms2048 INTEGER(0..2047),
ms2560 INTEGER(0..2559),
ms5120 INTEGER(0..5119),
ms10240 INTEGER(0..10239)
},
shortDRX SEQUENCE {
drx-ShortCycle ENUMERATED {
ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32,
ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9,
spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 },
drx-ShortCycleTimer INTEGER (1..16)
} OPTIONAL
}
MeasConfigMN ::= SEQUENCE {
measuredFrequenciesMN SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL,
measGapConfigFR1 GapConfig OPTIONAL,
gapPurpose ENUMERATED {perUE, perFR1} OPTIONAL,
...
}
-- TAG-CG-CONFIG-INFO-STOP
-- TAG-MEASUREMENT-TIMING-CONFIGURATION-START
MeasurementTimingConfiguration ::= SEQUENCE {
criticalExtensions CHOICE {
c1 CHOICE{
measTimingConf MeasurementTimingConfiguration-IEs,
spare3 NULL, spare2 NULL, spare1 NULL
},
criticalExtensionsFuture SEQUENCE {}
}
}
MeasurementTimingConfiguration-IEs ::= SEQUENCE {
measTiming MeasTimingList OPTIONAL,
nonCriticalExtension SEQUENCE {} OPTIONAL
}
MeasTimingList ::= SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF MeasTiming
MeasTiming ::= SEQUENCE {
carrierFreq ARFCN-ValueNR OPTIONAL,
ssb-MeasurementTimingConfiguration ENUMERATED {ffsTypeAndValue} OPTIONAL,
...
}
-- TAG-MEASUREMENT-TIMING-CONFIGURATION-STOP
-- TAG-CANDIDATE-CELL-INFO-LIST-START
CandidateCellInfoList ::= SEQUENCE (SIZE (1.. maxNrofSCells)) OF CandidateCellInfo
CandidateCellInfo ::= SEQUENCE {
cellIdentification SEQUENCE {
physCellId PhysCellId,
dl-CarrierFreq ARFCN-ValueNR
},
measResultCell MeasQuantityResults OPTIONAL,
candidateRS-IndexListSSB CandidateRS-IndexInfoListSSB OPTIONAL,
candidateRS-IndexListCSI-RS CandidateRS-IndexInfoListCSI-RS OPTIONAL,
...
}
CandidateRS-IndexInfoListSSB ::= SEQUENCE (SIZE (1..maxNrofIndexesToReport)) OF CandidateRS-IndexInfoSSB
CandidateRS-IndexInfoSSB ::= SEQUENCE {
ssb-Index SSB-Index,
measResultSSB MeasQuantityResults OPTIONAL,
...
}
CandidateRS-IndexInfoListCSI-RS ::= SEQUENCE (SIZE (1..maxNrofIndexesToReport)) OF CandidateRS-IndexInfoCSI-RS
CandidateRS-IndexInfoCSI-RS ::= SEQUENCE {
csi-RS-Index CSI-RS-Index,
measResultCSI-RS MeasQuantityResults OPTIONAL,
...
}
-- TAG-CANDIDATE-CELL-INFO-LIST-STOP
-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-START
maxMeasFreqsMN INTEGER ::= 32 -- Maximum number of MN-configured measurement frequencies
maxCellPrep INTEGER ::= 32 -- Maximum number of cells prepared for handover
-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-STOP
-- TAG_NR-INTER-NODE-DEFINITIONS-END-START
END
NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- TAG-VAR-MEAS-CONFIG-START
VarMeasConfig ::= SEQUENCE {
-- Measurement identities
measIdList MeasIdToAddModList OPTIONAL,
-- Measurement objects
measObjectList MeasObjectToAddModList OPTIONAL,
-- Reporting configurations
reportConfigList ReportConfigToAddModList OPTIONAL,
-- Other parameters
quantityConfig QuantityConfig OPTIONAL,
s-MeasureConfig CHOICE {
ssb-RSRP RSRP-Range,
csi-RSRP RSRP-Range
} OPTIONAL
}
-- TAG-VAR-MEAS-CONFIG-STOP
-- TAG-VAR-MEAS-REPORT-START
VarMeasReportList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF VarMeasReport
VarMeasReport ::= SEQUENCE {
-- List of measurement that have been triggered
measId MeasId,
cellsTriggeredList CellsTriggeredList OPTIONAL,
numberOfReportsSent INTEGER
}
CellsTriggeredList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CHOICE {
physCellId PhysCellId,
-- Not needed for EN-DC.
physCellIdEUTRA ENUMERATED {ffsTypeAndValue}
}
-- TAG-VAR-MEAS-REPORT-STOP
END
#!/usr/bin/perl
# This script extracts the ASN1 definition from and TS 38.331 and generates 3 output files that can be processed by asn2wrs
# First download the specification from 3gpp.org as a word document and open it
# Then in "view" menu, select normal or web layout (needed to removed page header and footers)
# Finally save the document as a text file
# Call the script: "perl extract_asn1_from_spec.pl 38331-xxx.txt"
# It should generate: NR-RRC-Definitions.asn, NR-UE-Variables.asn and NR-InterNodeDefinitions
use warnings;
$input_file = $ARGV[0];
$NR_def_output_file = "NR-RRC-Definitions.asn";
$NR_var_output_file = "NR-UE-Variables.asn";
$NR_internode_output_file = "NR-InterNodeDefinitions.asn";
sub extract_asn1;
open(INPUT_FILE, "< $input_file") or die "Can not open file $input_file";
while (<INPUT_FILE>) {
# Process the NR-RRC-Definitions section
if( m/NR-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=/){
open(OUTPUT_FILE, "> $NR_def_output_file") or die "Can not open file $def_output_file";
syswrite OUTPUT_FILE,"$_ \n";
syswrite OUTPUT_FILE,"BEGIN\n\n";
# Get all the text delimited by -- ASN1START and -- ASN1STOP
extract_asn1();
syswrite OUTPUT_FILE,"END\n\n";
close(OUTPUT_FILE);
}
# Process the NR-UE-Variables section
if( m/NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=/){
open(OUTPUT_FILE, "> $NR_var_output_file") or die "Can not open file $def_output_file";
syswrite OUTPUT_FILE,"$_ \n";
syswrite OUTPUT_FILE,"BEGIN\n\n";
# Get all the text delimited by -- ASN1START and -- ASN1STOP
extract_asn1();
syswrite OUTPUT_FILE,"END\n\n";
close(OUTPUT_FILE);
}
# Process the NR-InterNodeDefinitions section
if( m/NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=/){
open(OUTPUT_FILE, "> $NR_internode_output_file") or die "Can not open file $def_output_file";
syswrite OUTPUT_FILE,"$_ \n";
syswrite OUTPUT_FILE,"BEGIN\n\n";
# Get all the text delimited by -- ASN1START and -- ASN1STOP
extract_asn1();
syswrite OUTPUT_FILE,"END\n\n";
close(OUTPUT_FILE);
}
}
close(INPUT_FILE);
# This subroutine copies the text delimited by -- ASN1START and -- ASN1STOP in INPUT_FILE
# and copies it into OUTPUT_FILE.
# It stops when it meets the keyword "END"
sub extract_asn1 {
my $line = <INPUT_FILE>;
my $is_asn1 = 0;
while(($line ne "END\n") && ($line ne "END\r\n")){
if ($line =~ m/-- ASN1STOP/) {
$is_asn1 = 0;
}
if ($is_asn1 == 1){
syswrite OUTPUT_FILE,"$line";
}
if ($line =~ m/-- ASN1START/) {
$is_asn1 = 1;
}
$line = <INPUT_FILE>;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file vars.h
* \brief rrc external vars
* \author Navid Nikaein and Raymond Knopp
* \date 2011
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
*/
#ifndef __OPENAIR_RRC_EXTERN_H__
#define __OPENAIR_RRC_EXTERN_H__
#include "defs.h"
#include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/RLC/rlc.h"
extern UE_RRC_INST *UE_rrc_inst;
#include "LAYER2/MAC/extern.h"
extern uint8_t DRB2LCHAN[8];
extern LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue;
extern LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue;
#ifndef PHY_EMUL
#ifndef PHYSIM
//#define NB_INST 1
#else
extern unsigned char NB_INST;
#endif
extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
extern unsigned short NODE_ID[1];
extern void* bigphys_malloc(int);
#endif
//CONSTANTS
extern rlc_info_t Rlc_info_um,Rlc_info_am_config;
//uint8_t RACH_TIME_ALLOC;
extern uint16_t RACH_FREQ_ALLOC;
//uint8_t NB_RACH;
extern LCHAN_DESC BCCH_LCHAN_DESC,CCCH_LCHAN_DESC,DCCH_LCHAN_DESC,DTCH_DL_LCHAN_DESC,DTCH_UL_LCHAN_DESC;
extern MAC_MEAS_T BCCH_MEAS_TRIGGER,CCCH_MEAS_TRIGGER,DCCH_MEAS_TRIGGER,DTCH_MEAS_TRIGGER;
extern MAC_AVG_T BCCH_MEAS_AVG,CCCH_MEAS_AVG,DCCH_MEAS_AVG, DTCH_MEAS_AVG;
extern uint16_t T300[8];
extern uint16_t T310[8];
extern uint16_t N310[8];
extern uint16_t N311[8];
extern uint32_t T304[8];
extern uint32_t timeToTrigger_ms[16];
extern float RSRP_meas_mapping[98];
extern float RSRQ_meas_mapping[35];
extern UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
extern pthread_mutex_t ue_pf_po_mutex;
extern uint16_t reestablish_rnti_map[NUMBER_OF_UE_MAX][2];
#endif
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file rrc_types.h
* \brief rrc types and subtypes
* \author Navid Nikaein and Raymond Knopp
* \date 2011 - 2014, 2018
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr
*/
#ifndef RRC_TYPES_NR_H_
#define RRC_TYPES_NR_H_
typedef enum Rrc_State_NR_e {
RRC_STATE_INACTIVE_NR=0,
RRC_STATE_IDLE_NR,
RRC_STATE_CONNECTED_NR,
RRC_STATE_FIRST_NR = RRC_STATE_INACTIVE_NR,
RRC_STATE_LAST_NR = RRC_STATE_CONNECTED_NR,
} Rrc_State_NR_t;
typedef enum Rrc_Sub_State_NR_e {
RRC_SUB_STATE_INACTIVE_NR=0,
RRC_SUB_STATE_IDLE_SEARCHING_NR,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NR,
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR,
RRC_SUB_STATE_IDLE_CONNECTING_NR,
RRC_SUB_STATE_IDLE_NR,
RRC_SUB_STATE_CONNECTED_NR,
RRC_SUB_STATE_INACTIVE_FIRST_NB_IoT = RRC_SUB_STATE_INACTIVE_NR,
RRC_SUB_STATE_INACTIVE_LAST_NB_IoT = RRC_SUB_STATE_INACTIVE_NR,
RRC_SUB_STATE_IDLE_FIRST_NB_IoT = RRC_SUB_STATE_IDLE_SEARCHING_NR,
RRC_SUB_STATE_IDLE_LAST_NB_IoT = RRC_SUB_STATE_IDLE_NR,
RRC_SUB_STATE_CONNECTED_FIRST_NB_IoT = RRC_SUB_STATE_CONNECTED_NR,
RRC_SUB_STATE_CONNECTED_LAST_NB_IoT = RRC_SUB_STATE_CONNECTED_NR,
} Rrc_Sub_State_NR_t;
#endif /* RRC_TYPES_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment