Files
openairinterface5g/openair2/RRC/LTE/MESSAGES
Robert Schmidt fdb2abebd0 Add cmake option to select asn1c, and test asn1c parameters
CMake now takes the option ASN1C_EXEC to select an asn1c to use for
compilation. For instance, run with
cmake .. -GNinja -DASN1C_EXEC=/opt/asn1c/bin/asn1c
or
./build_oai --cmake-opt -DASN1C_EXEC=/opt/asn1c/bin/asn1c
to select the alternative asn1c. For instance, this is important for the
CI to allow to build multiple versions of OAI in parallel that might use
different commits of OAI.

Further, this patch introduces functionality to check for the support of
asn1c options that we require, and alerts the user if they are missing,
alongside a message of how to resolve the problem.
2023-06-02 10:42:02 +02:00
..
2023-06-01 18:26:00 +02:00
2023-05-26 12:35:33 +02:00
2023-06-01 18:26:00 +02:00

This directory contains the necessary schema files to generate all the LTE configuration data structures based on the ASN.1 RRC source code from the 36.331 RRC specifications. These structures are used by MAC and PHY for configuration purposes.

It contains the following files

README.txt                      : This file
ASN.1                           : Directory to place asn1c package
ASN.1/extract_asn1_from_spec.pl : Pearl script to extract ASN.1 source from 36311-860.txt
ASN.1/*.asn1                    : Extracted ASN.1 sources
ASN.1/*.cmake                   : Definitions of which files the corresponding *.asn1 will generate
CMakeLists.txt                  : The "driver" to generate and build generated source files at build time

Instructions to build data structures from ASN1 sources

The asn.1 files have already been built using the extract_asn1_from_spec.pl Pearl script. This should be used again if a newer version of the RRC spec is used to synthesize the data structures and encoding/decoding routines. To do this:

  1. use Microsoft WORD to generate a text version of the 3GPP 36.331 document
  2. run the script on the text file to generate the *.asn1 file

You should install the asn1c utility using ./build_oai -I.

Run

ASN1C_PREFIX=LTE_ asn1c -pdu=all -fcompound-names -gen-UPER -no-gen-BER -no-gen-JER -no-gen-OER -no-gen-APER -no-gen-example -D <dir> <asn.1-file>

to generate the files that result from the asn.1-file. Create an ASN.1/*.cmake file with the following structure:

set(LTE_RRC_GRAMMAR <path-to-asn.1-file>)

set(lte_rrc_source
    <list-of-c-files>
)

set(lte_rrc_headers
    <list-of-h-files>
)

Modify the CMakeLists.txt to point to the newly generated .cmake file. On the next LTE RRC compilation, the source files will be automatically generated from the ASN.1 file and built henceforth.