Commit 0a981987 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

1. Modify the wrong name file ans1c to asn1c 2.Update the do_MIB function...

1. Modify the wrong name file ans1c to asn1c 2.Update the do_MIB function 3.Update the gNB initial parameter for non-standalone
parent c4e0f475
......@@ -333,7 +333,7 @@ add_custom_command (
add_list2_option(NR_RRC_ASN1_VERSION "Rel15" "ASN.1 version of NR_RRC interface")
if (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/ans1c/ASN1_files/NR-RRC-Definitions.asn)
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-Definitions.asn)
endif (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
......
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 openair2/GNB_APP/RRC_paramsvalues.h
* \brief macro definitions for RRC authorized and asn1 parameters values, to be used in paramdef_t/chechedparam_t structure initializations
* \author Francois TABURET
* \date 2017
* \version 0.1
* \company NOKIA BellLabs France
* \email: francois.taburet@nokia-bell-labs.com
* \note
* \warning
*/
#ifndef __NRRRC_PARAMSVALUES__H__
#define __NRRRC_PARAMSVALUES__H__
/* cell configuration section name */
#define GNB_CONFIG_STRING_GNB_LIST "gNBs"
/* component carriers configuration section name */
#define GNB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
#define GNB_CONFIG_STRING_FRAME_TYPE "frame_type"
#define GNB_CONFIG_STRING_TDD_CONFIG "tdd_config"
#define GNB_CONFIG_STRING_TDD_CONFIG_S "tdd_config_s"
#define GNB_CONFIG_STRING_PREFIX_TYPE "prefix_type"
#define GNB_CONFIG_STRING_PREFIX_TYPE_UL "prefix_type_UL"
#define GNB_CONFIG_STRING_EUTRA_BAND "eutra_band"
#define GNB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
#define GNB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
#define GNB_CONFIG_STRING_NID_CELL "Nid_cell"
#define GNB_CONFIG_STRING_N_RB_DL "N_RB_DL"
#define GNB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
#define FRAMETYPE_OKVALUES {"FDD","TDD"}
#define FRAMETYPE_MODVALUES { FDD, TDD}
#define TDDCFG(A) TDD_Config__subframeAssignment_ ## A
#define TDDCONFIG_OKRANGE { TDDCFG(sa0), TDDCFG(sa6)}
#define TDDCFGS(A) TDD_Config__specialSubframePatterns_ ## A
#define TDDCONFIGS_OKRANGE { TDDCFGS(ssp0), TDDCFGS(ssp8)}
#define PREFIX_OKVALUES {"NORMAL","EXTENDED"}
#define PREFIX_MODVALUES { NORMAL, EXTENDED}
#define PREFIXUL_OKVALUES {"NORMAL","EXTENDED"}
#define PREFIXUL_MODVALUES { NORMAL, EXTENDED}
#define NRBDL_OKVALUES {6,15,25,50,75,100}
#define UETIMER_T300_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT300(A) UE_TimersAndConstants__t300_ ## A
#define UETIMER_T300_MODVALUES { UETT300(ms100), UETT300(ms200),UETT300(ms300),UETT300(ms400),UETT300(ms600),UETT300(ms1000),UETT300(ms1500),UETT300(ms2000)}
#define UETIMER_T301_OKVALUES {100,200,300,400,600,1000,1500,2000}
#define UETT301(A) UE_TimersAndConstants__t301_ ## A
#define UETIMER_T301_MODVALUES { UETT301(ms100), UETT301(ms200),UETT301(ms300),UETT301(ms400),UETT301(ms600),UETT301(ms1000),UETT301(ms1500),UETT301(ms2000)}
#define UETIMER_T310_OKVALUES {0,50,100,200,500,1000,2000}
#define UETT310(A) UE_TimersAndConstants__t310_ ## A
#define UETIMER_T310_MODVALUES { UETT310(ms0), UETT310(ms50),UETT310(ms100),UETT310(ms200),UETT310(ms500),UETT310(ms1000),UETT310(ms2000)}
#define UETIMER_T311_OKVALUES {1000,3110,5000,10000,15000,20000,31100}
#define UETT311(A) UE_TimersAndConstants__t311_ ## A
#define UETIMER_T311_MODVALUES { UETT311(ms1000), UETT311(ms3000),UETT311(ms5000),UETT311(ms10000),UETT311(ms15000),UETT311(ms20000),UETT311(ms30000)}
#define UETIMER_N310_OKVALUES {1,2,3,4,6,8,10,20}
#define UETN310(A) UE_TimersAndConstants__n310_ ## A
#define UETIMER_N310_MODVALUES { UETN310(n1), UETN310(n2),UETN310(n3),UETN310(n4),UETN310(n6),UETN310(n8),UETN310(n10),UETN310(n20)}
#define UETIMER_N311_OKVALUES {1,2,3,4,5,6,8,10}
#define UETN311(A) UE_TimersAndConstants__n311_ ## A
#define UETIMER_N311_MODVALUES { UETN311(n1), UETN311(n2),UETN311(n3),UETN311(n4),UETN311(n5),UETN311(n6),UETN311(n8),UETN311(n10)}
#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
*/
/*
gnb_app.h
-------------------
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
*/
#ifndef GNB_APP_H_
#define GNB_APP_H_
#include <stdint.h>
void *gNB_app_task(void *args_p);
#endif /* GNB_APP_H_ */
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* 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
*/
/*
gnb_config.h
-------------------
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
*/
#ifndef GNB_CONFIG_H_
#define GNB_CONFIG_H_
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <libconfig.h>
#include "commonDef.h"
#include "platform_types.h"
#include "platform_constants.h"
#include "PHY/impl_defs_lte.h"
#include "PHY/defs.h"
#include "s1ap_messages_types.h"
//#ifdef CMAKER
//#include "SystemInformationBlockType2.h"
//#include "rrc_messages_types.h"
//#else
//#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
//#endif
#include "intertask_interface_types.h"
#include "RRC/NR/defs_NR.h"
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\
if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
AssertFatal (0, MeSsAgE);\
} else {\
NwBo = inp.s_addr;\
}\
} while (0);
/** @defgroup _enb_app ENB APP
* @ingroup _oai2
* @{
*/
// Hard to find a defined value for max enb...
#define MAX_ENB 16
/*
typedef struct mme_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
unsigned active:1;
char *ipv4_address;
char *ipv6_address;
} mme_ip_address_t;
typedef struct ru_config_s {
// indicates if local or remote rf is used (1 == LOCAL)
unsigned local_rf:1;
// indicates if UDP socket is used
unsigned udp:1;
// indicates if RAW socket is used
unsigned raw:1;
char *ru_if_name;
char *local_address;
char *remote_address;
uint16_t local_port;
uint16_t remote_port;
uint8_t udpif4p5;
uint8_t rawif4p5;
uint8_t rawif5_mobipass;
uint8_t if_compress;
} ru_config_t;
*/
//extern void RCconfig_RU(void);
//extern void RCconfig_flexran(void);
//extern void RCconfig_L1(void);
//extern void RCconfig_macrlc(void);
//extern int RCconfig_gtpu(void );
extern void NRRCConfig(void);
//void enb_config_display(void);
//void ru_config_display(void);
int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
//int RCconfig_S1(MessageDef *msg_p, uint32_t i);
#endif /* GNB_CONFIG_H_ */
/** @} */
This diff is collapsed.
This diff is collapsed.
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>;
}
}
......@@ -391,9 +391,10 @@ typedef struct {
// buffer that contains the encoded messages
uint8_t *MIB_NR;
uint8_t sizeof_MIB_NR;
uint8_t *SIB1_NR;
uint8_t sizeof_SIB1_NR;
/*
uint8_t *SIB1_NB_IoT;
uint8_t sizeof_SIB1_NB_IoT;
uint8_t *SIB23_NB_IoT;
uint8_t sizeof_SIB23_NB_IoT;
*/
......
......@@ -138,59 +138,54 @@ init_SI(
const int CC_id
#if defined(ENABLE_ITTI)
,
RrcConfigurationReq * configuration
gNB_RrcConfigurationReq * configuration
#endif
)
//-----------------------------------------------------------------------------
{
#if defined(Rel10) || defined(Rel14)
int i;
#endif
#ifdef Rel14
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(SystemInformationBlockType1_v1310_IEs_t *)NULL;
#endif
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t*) malloc16(4);
// copy basic parameters
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->prefix_type[CC_id];
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
#ifdef Rel14
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition = configuration->pbch_repetition[CC_id];
#endif
LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
(int)configuration->N_RB_DL[CC_id],
(int)configuration->phich_resource[CC_id],
(int)configuration->phich_duration[CC_id]);
do_MIB(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
#ifdef ENABLE_ITTI
configuration->N_RB_DL[CC_id],
configuration->phich_resource[CC_id],
configuration->phich_duration[CC_id]
#else
50,0,0
#endif
,0);
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->prefix_type[CC_id];
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
///MIB
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB_NR = 0;
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_NR = (uint8_t*) malloc16(4);
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB_NR = do_MIB_NR(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],0,
#ifdef ENABLE_ITTI
configuration->ssb_SubcarrierOffset[CC_id],
configuration->pdcch_ConfigSIB1[CC_id],
configuration->subCarrierSpacingCommon[CC_id],
configuration->dmrs_TypeA_Position[CC_id]
#else
0,0,15,2
#endif
);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1 = (uint8_t*) malloc16(32);
///SIB1
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_NR = 0;
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_NR = (uint8_t*) malloc16(32);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_NR! = NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for NR SIB1 allocated\n",PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
#if defined(ENABLE_ITTI)
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_NR = do_SIB1_NR(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
ctxt_pP->module_id,
CC_id
#if defined(ENABLE_ITTI)
, configuration
#endif
#endif
);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.nr_rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1_NR == 255");
/*
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = 0;
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23 = (uint8_t*) malloc16(64);
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23!=NULL,"cannot allocate memory for SIB");
......@@ -301,7 +296,7 @@ init_SI(
#endif
LOG_D(RRC, "About to call rrc_mac_config_req_eNB\n");
*/
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB,
......
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