### Start gNB Natively Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md Use this command to start the gNB directly on the host machine. Ensure metrics are enabled in the configuration file. ```bash sudo ./ocudu_gnb -c gnb.yml ``` -------------------------------- ### Install CU Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/cu/CMakeLists.txt Specifies the installation rules for the CU executable, ensuring it is installed at runtime. ```cmake install(TARGETS ocu RUNTIME) ``` -------------------------------- ### Install CU UP Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/cu_up/CMakeLists.txt Configures the installation of the 'ocuup' executable to the runtime directory. ```cmake install(TARGETS ocuup RUNTIME) ``` -------------------------------- ### Build E2 Subscription Setup Test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/e2/CMakeLists.txt Creates an executable for testing the E2 subscription setup procedure. It links required libraries and discovers GTest tests. ```cmake add_executable(e2_subscription_setup_test e2_subscription_setup_test.cpp) target_link_libraries(e2_subscription_setup_test ocudu_e2 ocudu_support ocudulog e2ap_asn1 ocudu_ran e2_test_helpers GTest::gtest GTest::gtest_main ) target_include_directories(e2_subscription_setup_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(e2_subscription_setup_test) ``` -------------------------------- ### Install CU-CP Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/cu_cp/CMakeLists.txt Configures the installation of the 'ocucp' executable to the runtime directory. ```cmake install(TARGETS ocucp RUNTIME) ``` -------------------------------- ### LDPC Decoder Benchmark Setup Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/phy/upper/channel_coding/ldpc/CMakeLists.txt Configures the LDPC decoder benchmark executable. Links against necessary libraries and adds a test case. ```cmake add_executable(ldpc_decoder_benchmark ldpc_decoder_benchmark.cpp) target_link_libraries(ldpc_decoder_benchmark ocudu_channel_coding ocudulog) add_test(ldpc_decoder_benchmark ldpc_decoder_benchmark -s -R 1 -I 2 -T generic) ``` -------------------------------- ### Install Ru Emulator Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/examples/ofh/CMakeLists.txt Installs the 'ru_emulator' target to the runtime directory. ```cmake install(TARGETS ru_emulator RUNTIME) ``` -------------------------------- ### LDPC Encoder Benchmark Setup Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/phy/upper/channel_coding/ldpc/CMakeLists.txt Configures the LDPC encoder benchmark executable. Links against necessary libraries and adds a test case. ```cmake add_executable(ldpc_encoder_benchmark ldpc_encoder_benchmark.cpp) target_link_libraries(ldpc_encoder_benchmark ocudu_channel_coding ocudulog) add_test(ldpc_encoder_benchmark ldpc_encoder_benchmark -s -R 1 -T generic) ``` -------------------------------- ### Start Monitoring Stack with gNB in Docker Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md Start both the main application and the UI stack when the gNB is running within Docker. No specific configuration changes are needed as the default WS_URL is set for Docker DNS. ```bash # Just start both compose files together docker compose -f docker/docker-compose.yml -f docker/docker-compose.ui.yml up ``` -------------------------------- ### Project Setup and C++ Standard Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/CMakeLists.txt Sets the minimum CMake version, project name, C++ standard to C++17, and enables all compiler warnings. ```cmake cmake_minimum_required(VERSION 3.14) project(ocudu) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") ``` -------------------------------- ### Build E2 Setup Procedure Test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/e2/CMakeLists.txt Defines an executable for testing the E2 setup procedure. It links necessary libraries and discovers tests using GTest. ```cmake add_executable(e2_setup_procedure_test e2_setup_procedure_test.cpp) target_link_libraries(e2_setup_procedure_test ocudu_e2 ocudu_support ocudulog e2ap_asn1 e2_test_helpers GTest::gtest GTest::gtest_main ) target_include_directories(e2_setup_procedure_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(e2_setup_procedure_test) ``` -------------------------------- ### Install Sidekiq Radio Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/radio/sidekiq/CMakeLists.txt Installs the Sidekiq radio library target for export. ```cmake install(TARGETS ocudu_radio_sidekiq EXPORT ocudu_export) ``` -------------------------------- ### Benchmark Executable and Test Setup Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/adt/CMakeLists.txt Defines a benchmark executable, links it to the ocudulog library, and adds a test case with a specified repetition count. ```cmake add_executable(bounded_bitset_count_benchmark bounded_bitset_count_benchmark.cpp) target_link_libraries(bounded_bitset_count_benchmark ocudulog) add_test(bounded_bitset_count_benchmark bounded_bitset_count_benchmark -R 100) ``` -------------------------------- ### Subscriber Data Format Example Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/open5gs/README.md This example shows the expected format for subscriber data in a CSV file or as a comma-separated string for the SUBSCRIBER_DB environment variable. It includes details like IMSI, key, and IP allocation. ```text # Kept in the following format: "Name,IMSI,Key,OP_Type,OP/OPc,AMF,QCI,IP_alloc" # # Name: Human readable name to help distinguish UE's. Ignored by the HSS # IMSI: UE's IMSI value # Key: UE's key, where other keys are derived from. Stored in hexadecimal # OP_Type: Operator's code type, either OP or OPc # OP/OPc: Operator Code/Cyphered Operator Code, stored in hexadecimal # AMF: Authentication management field, stored in hexadecimal # QCI: QoS Class Identifier for the UE's default bearer. # IP_alloc: IP allocation stratagy for the SPGW. # With 'dynamic' the SPGW will automatically allocate IPs # With a valid IPv4 (e.g. '10.45.0.2') the UE will have a statically assigned IP. # # Note: Lines starting by '#' are ignored and will be overwritten # List of UEs with IMSI, and key increasing by one for each new UE. Useful for testing with AmariUE simulator and ue_count option ue01,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,9,10.45.1.2 ue02,001010123456790,00112233445566778899aabbccddef00,opc,63bfa50ee6523365ff14c1f45f88737d,9001,9,10.45.2.2 ue03,001010123456791,00112233445566778899aabbccddef01,opc,63bfa50ee6523365ff14c1f45f88737d,9001,9,10.45.3.2 ``` -------------------------------- ### Set Installation Data Directory Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/CMakeLists.txt Defines the installation directory for project data, relative to the installation prefix. ```cmake set(DATA_DIR share/${CMAKE_PROJECT_NAME}) ``` -------------------------------- ### Another Benchmark Executable and Test Setup Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/adt/CMakeLists.txt Defines a second benchmark executable, links it to the ocudulog library, and adds a corresponding test case. ```cmake add_executable(bounded_bitset_range_benchmark bounded_bitset_range_benchmark.cpp) target_link_libraries(bounded_bitset_range_benchmark ocudulog) add_test(bounded_bitset_range_benchmark bounded_bitset_range_benchmark -R 100) ``` -------------------------------- ### Create Symbolic Link for UE Application Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/utils/trx_ocudu/README.md Create a symbolic link for the UE application to load the ocudu TRX driver. This is done within the UE's installation directory. ```bash cd ln -s /utils/trx_ocudu/libtrx_ocudu.so trx_ocudu.so ``` -------------------------------- ### Define Executable for Start Cell Procedure Test Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/fapi_adaptor/mac/p5/CMakeLists.txt Defines a C++ executable for the MAC P5 start cell procedure test and links required libraries. ```cmake add_executable(mac_fapi_p5_start_cell_procedure_test mac_fapi_p5_start_cell_procedure_test.cpp) target_include_directories(mac_fapi_p5_start_cell_procedure_test PRIVATE ${CMAKE_SOURCE_DIR}/lib/fapi_adaptor/mac/p5) target_link_libraries(mac_fapi_p5_start_cell_procedure_test PRIVATE ocudu_mac_to_fapi_p5_sector_fastpath_adaptor ocudu_support ocudulog gtest gtest_main) gtest_discover_tests(mac_fapi_p5_start_cell_procedure_test) ``` -------------------------------- ### Configure Monitoring Stack for Kubernetes Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md After exposing the gNB metrics in Kubernetes, edit the docker/.env file with the K8s node IP and port, then start the monitoring stack using docker compose. ```bash # 3. Edit docker/.env with the K8s node IP and port sed -i 's/^WS_URL=.*/WS_URL=10.0.0.50:30801/' docker/.env # 4. Start the monitoring stack docker compose -f docker/docker-compose.ui.yml up -d ``` -------------------------------- ### Execute and Inspect Program State in GDB Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/utils/gdb/pretty_printers/pretty_printer_gdb_commands.txt Starts the program execution and displays the full backtrace. Useful for identifying the program's state at a crash or breakpoint. ```gdb commands run bt -full ``` -------------------------------- ### Configure Monitoring Stack for Remote gNB Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md When the gNB runs on a different machine, edit the docker/.env file with the remote server's IP and port, ensure the gNB is reachable, and then start the monitoring stack. ```bash # 1. Edit docker/.env with the remote server's IP sed -i 's/^WS_URL=.*/WS_URL=192.168.1.100:8001/' docker/.env # 2. Ensure the remote gNB is reachable on port 8001 # (check firewalls, security groups, etc.) # 3. Start the monitoring stack docker compose -f docker/docker-compose.ui.yml up -d ``` -------------------------------- ### List Main gNB Configuration Options Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/configs/readme.md Run the gNB binary with the -h flag to display all main configuration options and available subcommands. ```bash $ ./apps/gnb/gnb -h ocudu application Usage: ./apps/gnb/gnb [OPTIONS] [SUBCOMMAND] Options: -h,--help Print this help message and exit -v,--version Display program version information and exit -c Read config from file --gnb_id UINT [411] gNodeB identifier --gnb_id_bit_length UINT:INT in [22 - 32] [ ] gNodeB identifier length in bits --ran_node_name TEXT [gnb01] RAN node name --cells TEXT ... Sets the cell configuration on a per cell basis, overwriting the default configuration defined by cell_cfg --qos TEXT ... Configures RLC and PDCP radio bearers on a per 5QI basis. Subcommands: log Logging configuration pcap PCAP configuration amf AMF parameters cu_cp CU-CP parameters ru_sdr SDR Radio Unit configuration ru_ofh Open Fronthaul Radio Unit configuration cell_cfg Default cell configuration expert_phy Expert physical layer configuration test_mode Test mode configuration ``` -------------------------------- ### Include Directories Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/support/versioning/CMakeLists.txt Sets up include directories for the build process. ```cmake include_directories(${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/fapi_adaptor/mac/p5/CMakeLists.txt Creates a static library named ocudu_mac_to_fapi_p5_sector_fastpath_adaptor using the defined sources. ```cmake add_library(ocudu_mac_to_fapi_p5_sector_fastpath_adaptor STATIC ${SOURCES}) ``` -------------------------------- ### Run Default OCUDU Stack Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md Launches the complete gNB and core network deployment using the default docker-compose.yml file. Navigate to the docker directory first. ```bash docker compose -f docker/docker-compose.yml up ``` ```bash cd docker/ docker compose up ``` -------------------------------- ### General Subdirectory Inclusion Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/CMakeLists.txt Includes common subdirectories for examples, helpers, services, and units. These are always added to the build. ```cmake add_subdirectory(examples) add_subdirectory(helpers) add_subdirectory(services) add_subdirectory(units) ``` -------------------------------- ### Find and Link SCTP Package Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/gateways/CMakeLists.txt This snippet finds the SCTP package and links its libraries to the target. Ensure SCTP is installed on your system. ```cmake find_package(SCTP REQUIRED) add_library(ocudu_gateway sctp_socket.cpp sctp_network_gateway_common_impl.cpp sctp_network_client_impl.cpp sctp_network_server_impl.cpp udp_network_gateway_impl.cpp sctp_network_client_factory.cpp sctp_network_server_factory.cpp udp_network_gateway_factory.cpp ) target_link_libraries(ocudu_gateway ocudu_support ocudulog ${SCTP_LIBRARIES}) ``` -------------------------------- ### Create O-CU-UP Application Unit Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_up/CMakeLists.txt Creates a static library named 'ocudu_o_cu_up_app_unit' using the defined source files. Static libraries are linked directly into the executable. ```cmake add_library(ocudu_o_cu_up_app_unit STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_up/e2/CMakeLists.txt Creates a static library named 'ocudu_o_cu_up_app_unit_e2' using the defined sources. ```cmake add_library(ocudu_o_cu_up_app_unit_e2 STATIC ${SOURCES}) ``` -------------------------------- ### Create and Link UE Context Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/scheduler/ue_context/CMakeLists.txt Creates a static library for UE Context and links it with other necessary libraries. ```cmake add_library(sched_ue_context STATIC ${SOURCES}) target_link_libraries(sched_ue_context ocudu_ran sched_support sched_cell) ``` -------------------------------- ### Navigate to Project Root and Set GDB Options Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/utils/gdb/pretty_printers/pretty_printer_gdb_commands.txt Navigates to the project root directory and configures GDB settings for optimal debugging output. Use this to prepare your GDB environment before running commands. ```gdb commands cd ../../../../.. set width 0 set height 0 set verbose off source .gdbinit ``` -------------------------------- ### Generate Build Information File Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/CMakeLists.txt Configures a build information file by copying a template from the source directory to the binary directory. ```cmake configure_file( ${PROJECT_SOURCE_DIR}/cmake/modules/build_info.cmake.in ${CMAKE_BINARY_DIR}/build_info.cmake ) ``` -------------------------------- ### Define DU Low Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/du_low/CMakeLists.txt Defines the main executable 'odu_low', includes necessary directories, links against the base library and a split library, and installs the target. ```cmake add_executable(odu_low du_low.cpp) add_backward(odu_low) target_include_directories(odu_low PRIVATE ${CMAKE_SOURCE_DIR}) install(TARGETS odu_low RUNTIME) target_link_libraries(odu_low PRIVATE odu_low_base ocudu_flexible_o_du_low_split_6) notify_binary_target(odu_low) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/e2/CMakeLists.txt Creates a static library named 'ocudu_o_cu_cp_e2_app_unit' using the defined source files. ```cmake add_library(ocudu_o_cu_cp_e2_app_unit STATIC ${SOURCES}) ``` -------------------------------- ### Get Latest Open5GS Tag Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/open5gs/README.md This Dockerfile command retrieves the latest tag from the Open5GS repository. It's used to ensure the container is built with the most recent version. ```Dockerfile # get latest open5gs tag (must be stored in a file, because docker does not allow to use the return value directly) # RUN git ls-remote --tags https://github.com/open5gs/open5gs | sort -t '/' -k 3 -V | awk -F/ '{ print $3 }' | awk '!/\^\{\}/' | tail -n 1 > ./open5gsversion ``` -------------------------------- ### Add Executable and Link ocudu_ran and ocudulog Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/ran/CMakeLists.txt Configures a test executable, linking it with the ocudu_ran and ocudulog libraries. This setup is used for tests that rely on both RAN functionality and logging. ```cmake add_executable(ssb_mapping_test ssb_mapping_test.cpp) target_link_libraries(ssb_mapping_test ocudu_ran ocudulog) add_test(ssb_mapping_test ssb_mapping_test) ``` -------------------------------- ### Combine Configuration Files Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/configs/readme.md Use multiple configuration files to overlay parameters, minimizing duplication. The last specified file's parameters take precedence. ```bash sudo ./gnb -c qos.yml -c gnb_ru_ran550_tdd_n78_20mhz.yml ``` -------------------------------- ### Creating Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/CMakeLists.txt Creates a static library named 'ocudu_o_cu_cp_app_unit' using the defined source files. ```cmake add_library(ocudu_o_cu_cp_app_unit STATIC ${SOURCES}) ``` -------------------------------- ### CU-CP Test Helper Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/cu_cp/CMakeLists.txt Defines a library for CU-CP unit testing, including mock objects and test environment setup. It links against various OCUDU modules and ASN.1 encoding libraries. ```cmake add_library(cu_cp_test_helpers test_doubles/mock_cu_up.cpp test_doubles/mock_amf.cpp test_doubles/mock_du.cpp test_doubles/mock_xnc_cu_cp.cpp cu_cp_test_environment.cpp cu_cp_test_messages.cpp du_processor_test_messages.cpp test_helpers.cpp) target_include_directories(cu_cp_test_helpers PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(cu_cp_test_helpers ocudu_cu_cp ocudu_support ocudulog e1ap_test_helpers e1ap_test_doubles f1ap_test_doubles ngap_test_helpers ngap_test_doubles xnap_test_doubles nrppa_test_doubles rrc_ue_test_helpers f1ap_asn1 ngap_asn1 nrppa_asn1 xnap_asn1 e1ap_asn1 ocudu_e2) ``` -------------------------------- ### Create Static Library and Link Dependencies Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/fapi_adaptor/phy/p7/pdu_translators/CMakeLists.txt Builds a static library named 'ocudu_fapi_phy_message_adaptors' and links it with necessary dependencies. ```cmake add_library(ocudu_fapi_phy_message_adaptors STATIC ${SOURCES}) target_link_libraries(ocudu_fapi_phy_message_adaptors ocuduvec ocudu_phy_support ocudu_fapi_precoding_matrix_tools ocudu_fapi_uci_part2_tools ocudu_upper_phy_support ocudu_ran) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/services/remote_control/CMakeLists.txt Builds a static library named 'ocudu_remote_control_app_service' from the defined sources. ```cmake add_library(ocudu_remote_control_app_service STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/ofh/ethernet/dpdk/CMakeLists.txt Creates a static library named 'ocudu_ofh_dpdk_ethernet' from the defined source files. ```cmake add_library(ocudu_ofh_dpdk_ethernet STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library for Metrics Helpers Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/split_6/o_du_low/metrics/CMakeLists.txt Creates a static library named 'ocudu_split6_flexible_o_du_low_unit_metrics_helpers' using the defined source files. ```cmake add_library(ocudu_split6_flexible_o_du_low_unit_metrics_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Add Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/services/cmdline/CMakeLists.txt Creates a static library named 'ocudu_cmdline_app_service' using the defined source files. ```cmake add_library(ocudu_cmdline_app_service STATIC ${SOURCES}) ``` -------------------------------- ### Add Benchmark Tests Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/phy/upper/equalization/CMakeLists.txt Adds test cases for the channel equalizer benchmark using ZF and MMSE algorithms. ```cmake add_test(channel_equalizer_benchmark channel_equalizer_benchmark -s -R 1 -T ZF) add_test(channel_equalizer_benchmark channel_equalizer_benchmark -s -R 1 -T MMSE) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/split_8/helpers/CMakeLists.txt Defines a static library named 'ocudu_split_8_app_unit_helpers' using the previously defined source files. ```cmake add_library(ocudu_split_8_app_unit_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Create CU UP Metrics Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_up/cu_up/metrics/CMakeLists.txt Creates a static library named 'ocudu_cu_up_unit_metrics_helpers' using the defined source files. ```cmake add_library(ocudu_cu_up_unit_metrics_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/phy/upper/equalization/CMakeLists.txt Creates a static library named 'ocudu_channel_equalizer' using the defined sources. ```cmake add_library(ocudu_channel_equalizer STATIC ${SOURCES}) ``` -------------------------------- ### Configure Include Directories and Link Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/o_du_high/du_high/CMakeLists.txt Sets include directories and links necessary libraries for the 'ocudu_du_high_unit_helpers' library. ```cmake target_include_directories(ocudu_du_high_unit_helpers PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(ocudu_du_high_unit_helpers sched_config ocudu_app_helpers ocudu_cpu_affinities_helper ocudu_du_high_unit_metrics_helpers ocudu_yaml_util ocudu_pusch_processor) ``` -------------------------------- ### Add Executable and Link Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/phy/upper/precoding/CMakeLists.txt Defines the benchmark executable and links it against required libraries. Used for building the channel precoding benchmark. ```cmake add_executable(channel_precoder_benchmark channel_precoder_benchmark.cpp) target_link_libraries(channel_precoder_benchmark ocudulog ocudu_channel_precoder) ``` -------------------------------- ### Configure Ru Emulator Include Directories and Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/examples/ofh/CMakeLists.txt Sets private include directories and links necessary libraries for the 'ru_emulator' target. ```cmake target_include_directories(ru_emulator PRIVATE ${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR}/external) target_link_libraries(ru_emulator ocudulog ocudu_ofh ocudu_phy_support ocudu_support ocudu_yaml_util) ``` -------------------------------- ### Create Static Library for Metrics Helpers Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/split_helpers/metrics/CMakeLists.txt Creates a static library named 'ocudu_flexible_o_du_unit_metrics_helpers' using the defined source files. Static libraries are linked directly into the executable. ```cmake add_library(ocudu_flexible_o_du_unit_metrics_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/services/metrics/CMakeLists.txt Creates a static library named ocudu_metrics_app_service using the defined sources. ```cmake add_library(ocudu_metrics_app_service STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library and Link Dependencies Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/ofh/compression/CMakeLists.txt Defines the static library 'ocudu_ofh_compression' using the collected source files and links it with the 'ocuduvec' library. This is the final step in building the compression module. ```cmake add_library(ocudu_ofh_compression STATIC ${SOURCES}) target_link_libraries(ocudu_ofh_compression ocuduvec) ``` -------------------------------- ### Define UDP Network Gateway RX Benchmark Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/gateways/CMakeLists.txt Builds the UDP network gateway receive benchmark executable and links it with OCUDU libraries. ```cmake add_executable(udp_network_gateway_rx_benchmark udp_network_gateway_rx_benchmark.cpp) target_link_libraries(udp_network_gateway_rx_benchmark ocudu_gateway ocudu_support ocudulog) ``` -------------------------------- ### Build radio_util_sample executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/examples/radio/CMakeLists.txt Defines the 'radio_util_sample' executable and links it with core ocudu radio, logging, and support libraries. ```cmake add_executable(radio_util_sample radio_util_sample.cpp) target_link_libraries(radio_util_sample ocudu_radio ocudulog ocudu_support) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/split_7_2/helpers/CMakeLists.txt Creates a static library named 'ocudu_split_7_2_app_unit_helpers' using the defined sources. Static libraries are linked directly into the executable. ```cmake add_library(ocudu_split_7_2_app_unit_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Configure XNAP Gateway Include Directories Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/xnap/gateways/CMakeLists.txt Sets the private include directories for the ocudu_xnc_gateway library. ```cmake target_include_directories(ocudu_xnc_gateway PRIVATE ..) ``` -------------------------------- ### Add Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/helpers/e2/CMakeLists.txt Creates a static library named 'ocudu_e2_app_helpers' using the defined sources. ```cmake add_library(ocudu_e2_app_helpers STATIC ${SOURCES}) ``` -------------------------------- ### List cell_cfg Subcommand Options Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/configs/readme.md Run the gNB binary with the 'cell_cfg -h' parameters to list all configuration options for the cell_cfg subcommand. ```bash $ ./apps/gnb/gnb cell_cfg -h Default cell configuration Usage: ./apps/gnb/gnb cell_cfg [OPTIONS] [SUBCOMMAND] Options: -h,--help Print this help message and exit --pci UINT:INT in [0 - 1007] [1] PCI --dl_arfcn UINT [536020] Downlink ARFCN --band TEXT [auto] NR band --common_scs ENUM [15kHz] Cell common subcarrier spacing --channel_bandwidth_MHz ENUM [20] Channel bandwidth in MHz --nof_antennas_ul UINT [1] Number of antennas in uplink --nof_antennas_dl UINT [1] Number of antennas in downlink --plmn TEXT [00101] PLMN --tac UINT [7] TAC --ssb_period UINT:{5,10,20} [10] Period of SSB scheduling in milliseconds Subcommands: pdcch PDCCH parameters pdsch PDSCH parameters pusch PUSCH parameters pucch PUCCH parameters prach PRACH parameters tdd_ul_dl_cfg TDD UL DL configuration parameters paging Paging parameters ``` -------------------------------- ### Create FMT Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/external/fmt/CMakeLists.txt Creates a static library named 'fmt' using the defined sources. ```cmake add_library(fmt STATIC ${SOURCES}) ``` -------------------------------- ### Configure cu_up Unit Application Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_up/cu_up/CMakeLists.txt Sets include directories and links necessary libraries for the cu_up unit application library. ```cmake target_include_directories(ocudu_cu_up_app_unit PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(ocudu_cu_up_app_unit PRIVATE ocudu_cu_up_unit_metrics_helpers ocudu_app_helpers) ``` -------------------------------- ### Create Static Library for Network App Helpers Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/helpers/network/CMakeLists.txt Builds a static library named 'ocudu_network_app_helpers' using the previously defined source files. Static libraries are linked directly into the executable during the build process. ```cmake add_library(ocudu_network_app_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Build Test Executable: context_repository_helpers_test Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/ofh/support/CMakeLists.txt Configures the build for the 'context_repository_helpers_test' executable. It links against the 'ocudu_support' library and Google Test, and sets the include directory for OFH support. ```cmake set_directory_properties(PROPERTIES LABELS "support") add_executable(context_repository_helpers_test context_repository_helpers_test.cpp) target_link_libraries(context_repository_helpers_test ocudu_support GTest::gtest GTest::gtest_main) target_include_directories(context_repository_helpers_test PRIVATE ${CMAKE_SOURCE_DIR}/lib/ofh/support) gtest_discover_tests(context_repository_helpers_test) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/split_helpers/CMakeLists.txt Creates a static library named 'ocudu_flexible_o_du_helpers' from the defined sources. ```cmake add_library(ocudu_flexible_o_du_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Create phy_fapi_p7_sector_fastpath_adaptor Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/fapi_adaptor/phy/p7/CMakeLists.txt Defines a static library for the PHY to FAPI P7 sector fastpath adaptor implementation. ```cmake add_library(ocudu_phy_to_fapi_p7_sector_fastpath_adaptor STATIC phy_fapi_p7_sector_fastpath_adaptor_impl.cpp) ``` -------------------------------- ### Define Library Sources Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/fapi_adaptor/mac/p5/CMakeLists.txt Lists the source files for the ocudu_mac_to_fapi_p5_sector_fastpath_adaptor library. ```cmake set(SOURCES mac_fapi_p5_fastpath_cell_operation_controller_impl.cpp mac_fapi_p5_sector_fastpath_adaptor_impl.cpp mac_fapi_p5_start_cell_procedure.cpp mac_fapi_p5_stop_cell_procedure.cpp p5_responses_handler.cpp) ``` -------------------------------- ### Add Static Library Target Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/fapi_adaptor/mac/p7/pdu_translators/CMakeLists.txt Creates a static library named 'ocudu_mac_fapi_adaptors' using the defined source files. ```cmake add_library(ocudu_mac_fapi_adaptors STATIC ${SOURCES}) ``` -------------------------------- ### Combine Compose Files for Custom Deployments Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md Demonstrates how to merge multiple Docker Compose files to create custom OCUDU deployments, such as combining gNB with monitoring or using a split CU/DU architecture. ```bash # Run gNB + core docker compose -f docker/docker-compose.yml up # Run cu-cp + cu-up + du + core (gNB is replaced) docker compose -f docker/docker-compose.yml -f docker/docker-compose.split.yml up # Run gNB + core with monitoring stack docker compose -f docker/docker-compose.yml -f docker/docker-compose.ui.yml up # Run split architecture with monitoring stack docker compose -f docker/docker-compose.yml -f docker/docker-compose.split.yml -f docker/docker-compose.ui.yml up # Run only the monitoring components (useful when connecting to external gNB docker compose -f docker/docker-compose.ui.yml up ``` -------------------------------- ### Include Realtime Loopback Subdirectory Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/radio/CMakeLists.txt This command includes the 'realtime_loopback' subdirectory, making its targets and configurations available. ```cmake add_subdirectory(realtime_loopback) ``` -------------------------------- ### Configure and Build TRX Driver Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/utils/trx_ocudu/README.md Use CMake to enable the TRX driver and build the ocudu test. Ensure the TRX driver header path is correctly provided. ```bash cmake .. -DENABLE_EXPORT=TRUE -DENABLE_ZEROMQ=TRUE -DENABLE_TRX_DRIVER=TRUE -DTRX_DRIVER_DIR= make trx_ocudu_test ctest -R trx_ocudu_test ``` -------------------------------- ### Add Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/helpers/tracing/CMakeLists.txt Creates a static library named 'ocudu_tracing_app_helpers' from the defined sources. ```cmake add_library(ocudu_tracing_app_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Create Static Library for CU-CP Metrics Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/cu_cp/metrics/CMakeLists.txt Creates a static library named 'ocudu_cu_cp_unit_metrics_helpers' using the defined source files. ```cmake add_library(ocudu_cu_cp_unit_metrics_helpers STATIC ${SOURCES}) ``` -------------------------------- ### Configure f1u_cu_up_rx_metrics_test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/f1u/cu_up/CMakeLists.txt Defines the f1u_cu_up_rx_metrics_test executable, links necessary libraries, and sets include directories. It also discovers Google Tests with the 'tsan' label. ```cmake add_executable(f1u_cu_up_rx_metrics_test f1u_cu_up_rx_metrics_test.cpp) target_link_libraries(f1u_cu_up_rx_metrics_test ocudu_f1u_cu_up ocudu_support ocudulog GTest::gtest GTest::gtest_main) target_include_directories(f1u_cu_up_rx_metrics_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(f1u_cu_up_rx_metrics_test PROPERTIES LABELS "tsan") ``` -------------------------------- ### Create BBDEV Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/hal/dpdk/bbdev/CMakeLists.txt Creates a static library for the BBDEV module. ```cmake add_library(ocudu_hal_bbdev STATIC ${SOURCES}) ``` -------------------------------- ### Add PDCP RX Benchmark Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/pdcp/CMakeLists.txt Configures the build system to create an executable for the PDCP receive benchmark. It links against necessary libraries. ```cmake add_executable(pdcp_rx_benchmark pdcp_rx_benchmark.cpp) target_link_libraries(pdcp_rx_benchmark ocudu_pdcp ocudu_security ocudulog) ``` -------------------------------- ### Build E2AP Network Adapter Test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/e2/CMakeLists.txt Creates an executable for testing the E2AP network adapter. It includes dummy_ric.cpp as a source and links various libraries, including SCTP specific labels. ```cmake add_executable(e2ap_network_adapter_test e2ap_network_adapter_test.cpp dummy_ric.cpp) target_link_libraries(e2ap_network_adapter_test ocudulog ocudu_e2 e2ap_asn1 ocudu_gateway ocudu_support e2_test_helpers GTest::gtest GTest::gtest_main ) target_include_directories(e2ap_network_adapter_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(e2ap_network_adapter_test PROPERTIES "LABELS;sctp") ``` -------------------------------- ### Configure f1u_cu_up_tx_metrics_test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/f1u/cu_up/CMakeLists.txt Defines the f1u_cu_up_tx_metrics_test executable, links necessary libraries, and sets include directories. It also discovers Google Tests with the 'tsan' label. ```cmake add_executable(f1u_cu_up_tx_metrics_test f1u_cu_up_tx_metrics_test.cpp) target_link_libraries(f1u_cu_up_tx_metrics_test ocudu_f1u_cu_up ocudu_support ocudulog GTest::gtest GTest::gtest_main) target_include_directories(f1u_cu_up_tx_metrics_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(f1u_cu_up_tx_metrics_test PROPERTIES LABELS "tsan") ``` -------------------------------- ### Add Executable and Tests for LLR Pretty Printer Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/utils/gdb/pretty_printers/CMakeLists.txt Compiles a C++ source file, links it with 'fmt', and sets up two tests to verify GDB output for finite and infinite LLR values. ```cmake add_executable(pretty_printer_llr_test pretty_printer_llr_test.cpp) target_link_libraries(pretty_printer_llr_test PRIVATE fmt) add_test(NAME pretty_printer_llr_finite_test COMMAND sh -c "gdb $ -x ${CMAKE_CURRENT_SOURCE_DIR}/pretty_printer_gdb_commands.txt --batch | grep 'a = 33'" ) add_test(NAME pretty_printer_llr_infinite_test COMMAND sh -c "gdb $ -x ${CMAKE_CURRENT_SOURCE_DIR}/pretty_printer_gdb_commands.txt --batch | grep 'b = 127'" ) ``` -------------------------------- ### Create Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/phy/upper/channel_coding/ldpc/CMakeLists.txt Creates a static library named 'ocudu_ldpc' from the collected LDPC source files. ```cmake add_library(ocudu_ldpc STATIC ${ldpc_sources}) ``` -------------------------------- ### Define UDP Network Gateway TX Benchmark Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/gateways/CMakeLists.txt Builds the UDP network gateway transmit benchmark executable and links it with OCUDU libraries. ```cmake add_executable(udp_network_gateway_tx_benchmark udp_network_gateway_tx_benchmark.cpp) target_link_libraries(udp_network_gateway_tx_benchmark ocudu_gateway ocudu_support ocudulog) ``` -------------------------------- ### Add Executable and Link Libraries for TX Precoding and Beamforming PDU Builder Test Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/fapi/p7/builders/CMakeLists.txt Defines a test executable for the TX precoding and beamforming PDU builder and links it with required libraries including OCUDU support, logging, and Google Test. ```cmake add_executable(tx_precoding_and_beamforming_pdu_builder_test tx_precoding_and_beamforming_pdu_test.cpp) target_link_libraries(tx_precoding_and_beamforming_pdu_builder_test ocudu_support ocudulog GTest::gtest GTest::gtest_main) gtest_discover_tests(tx_precoding_and_beamforming_pdu_builder_test) ``` -------------------------------- ### Create Static Library and Link Dependencies Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/phy/upper/channel_modulation/CMakeLists.txt Builds the ocudu_channel_modulation library as a static library and links it with required dependencies. ```cmake add_library(ocudu_channel_modulation STATIC ${SOURCES}) target_link_libraries(ocudu_channel_modulation ocudu_support log_likelihood_ratio) ``` -------------------------------- ### Define UDP Network Gateway Benchmark Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/gateways/CMakeLists.txt Builds the UDP network gateway benchmark executable and links it with OCUDU libraries. ```cmake add_executable(udp_network_gateway_benchmark udp_network_gateway_benchmark.cpp) target_link_libraries(udp_network_gateway_benchmark ocudu_gateway ocudu_support ocudulog) ``` -------------------------------- ### Configure Version Info Header Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/support/versioning/CMakeLists.txt Configures the version information header file from a template. ```cmake configure_file(version_info.h.in ${CMAKE_CURRENT_BINARY_DIR}/version_info.h) ``` -------------------------------- ### Add Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/phy/generic_functions/precoding/CMakeLists.txt Creates a static library named 'ocudu_channel_precoder' using the collected source files. ```cmake add_library(ocudu_channel_precoder STATIC ${channel_precoder_sources}) ``` -------------------------------- ### Add PDCP TX Benchmark Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/pdcp/CMakeLists.txt Configures the build system to create an executable for the PDCP transmit benchmark. It links against necessary libraries. ```cmake add_executable(pdcp_tx_benchmark pdcp_tx_benchmark.cpp) target_link_libraries(pdcp_tx_benchmark ocudu_pdcp ocudu_security ocudulog) ``` -------------------------------- ### Add Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/cu_cp/metrics/consumers/CMakeLists.txt Creates a static library named 'ocudu_cu_cp_unit_metrics_consumers' from the defined sources. ```cmake add_library(ocudu_cu_cp_unit_metrics_consumers STATIC ${SOURCES}) ``` -------------------------------- ### Share Custom Configuration File with Container Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/README.md Mount a custom Open5GS configuration file from the host into the container using the '-v' flag with 'docker compose run'. ```bash docker compose -f docker/docker-compose.yml run -v /tmp/my-open5gs-5gc.yml:/config/my-open5gs-5gc.yml 5gc epc -c /config/my-open5gs-5gc.yml ``` -------------------------------- ### Add Executable and Link Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/phy/upper/equalization/CMakeLists.txt Defines the executable for the channel equalizer support tests and links it against the channel equalizer library and Google Test framework. ```cmake add_executable(channel_equalizer_support_test channel_equalizer_support.cpp) target_link_libraries(channel_equalizer_support_test ocudu_channel_equalizer GTest::gtest GTest::gtest_main) ``` -------------------------------- ### Generate Software Bill of Materials (SBOM) Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/CMakeLists.txt Parses copyright information and adds license and file details to the SBOM. Finalizes the SBOM generation, with an option to verify the contents. ```cmake parse_copyright_file("${CMAKE_SOURCE_DIR}/COPYRIGHTS.txt") sbom_add( LICENSE "LicenseRef-OCUDU" NAME "BSD-3-Clause-Open-MPI" FILE "${CMAKE_SOURCE_DIR}/LICENSE" ) sbom_finalize(NO_VERIFY) ``` -------------------------------- ### Define Executable and Link Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/phy/generic_functions/CMakeLists.txt Defines the 'dft_processor_test' executable and links it with required libraries including logging, DFT, and Google Test. ```cmake add_executable(dft_processor_test dft_processor_test.cpp) target_link_libraries(dft_processor_test ocudulog ocudu_dft GTest::gtest GTest::gtest_main) ``` -------------------------------- ### Configure f1u_cu_up_bearer_test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/f1u/cu_up/CMakeLists.txt Defines the f1u_cu_up_bearer_test executable, links necessary libraries, and sets include directories. It also discovers Google Tests. ```cmake add_executable(f1u_cu_up_bearer_test f1u_cu_up_bearer_test.cpp) target_link_libraries(f1u_cu_up_bearer_test ocudu_f1u_cu_up ocudu_support ocudulog GTest::gtest GTest::gtest_main) target_include_directories(f1u_cu_up_bearer_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(f1u_cu_up_bearer_test) ``` -------------------------------- ### Create OFH Ethernet Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/ofh/ethernet/CMakeLists.txt Creates a static library named 'ocudu_ofh_ethernet' using the defined source files. ```cmake add_library(ocudu_ofh_ethernet STATIC ${SOURCES}) ``` -------------------------------- ### Create SDAP Static Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/sdap/CMakeLists.txt Creates a static library named 'ocudu_sdap' using the defined sources. ```cmake add_library(ocudu_sdap STATIC ${SOURCES}) ``` -------------------------------- ### Find and Configure ZeroMQ Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/CMakeLists.txt Finds the ZeroMQ library if enabled, includes its directories, links to it, and adds it to the SBOM. ZeroMQ is a high-performance asynchronous messaging library. ```cmake if (ENABLE_ZEROMQ) find_package(ZeroMQ) if (ZEROMQ_FOUND) include_directories(${ZEROMQ_INCLUDE_DIRS}) link_directories(${ZEROMQ_LIBRARY_DIRS}) sbom_add( PACKAGE "ZeroMQ" DOWNLOAD_LOCATION "https://zeromq.org/" SUPPLIER "ZeroMQ project" LICENSE "LGPL-3.0-or-later" VERSION ${ZEROMQ_PKG_VERSION} ) endif (ZEROMQ_FOUND) else (ENABLE_ZEROMQ) unset(ZEROMQ_FOUND CACHE) endif (ENABLE_ZEROMQ) ``` -------------------------------- ### Configure CU CP Application Unit Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/cu_cp/CMakeLists.txt Sets include directories and links necessary libraries for the CU CP application unit. ```cmake target_include_directories(ocudu_cu_cp_app_unit PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(ocudu_cu_cp_app_unit PRIVATE ocudu_cu_cp_unit_metrics_helpers ocudu_app_helpers) ``` -------------------------------- ### Build Open5GS Docker Container Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/docker/open5gs/README.md Builds the Docker container for Open5GS. The `--target open5gs` flag specifies the build stage, and `-t open5gs-docker` tags the image. An optional build argument can be used to specify the Open5GS version. ```bash docker build --target open5gs -t open5gs-docker . ``` ```bash docker build --target open5gs -t open5gs-docker . --build-arg OPEN5GS_VERSION=v2.6.6 ``` -------------------------------- ### Add Executable and Link Libraries Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/benchmarks/ofh/CMakeLists.txt Defines the 'ofh_compression_benchmark' executable and links it with 'ocudulog' and 'ocudu_ofh_compression' libraries. ```cmake add_executable(ofh_compression_benchmark ofh_compression_benchmark.cpp) target_link_libraries(ofh_compression_benchmark ocudulog ocudu_ofh_compression) ``` -------------------------------- ### Define MAC Configuration Helper Sources Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/mac/CMakeLists.txt Defines the source files for the MAC configuration helper library and links it with other necessary libraries. ```cmake set(SOURCES config/mac_cell_group_config_factory.cpp config/mac_config_helpers.cpp) add_library(mac_configuration_helpers STATIC ${SOURCES}) target_link_libraries(mac_configuration_helpers ocudu_support ocudu_ran) ``` -------------------------------- ### Add Executable and Link Libraries for NTN Math Helpers Test Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/ntn/CMakeLists.txt Defines the 'ntn_math_helpers_test' executable, sets its include directories, and links it with necessary libraries including the NTN library, support libraries, logging, and Google Test framework. It also discovers tests for this executable. ```cmake add_executable(ntn_math_helpers_test ntn_math_helpers_test.cpp) target_include_directories(ntn_math_helpers_test PRIVATE ${CMAKE_SOURCE_DIR}) target_link_libraries(ntn_math_helpers_test ocudu_ntn_lib ocudu_support ocudulog gtest gtest_main) gtest_discover_tests(ntn_math_helpers_test) ``` -------------------------------- ### Setting Include Directories Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_cp/CMakeLists.txt Specifies private include directories for the 'ocudu_o_cu_cp_app_unit' library. ```cmake target_include_directories(ocudu_o_cu_cp_app_unit PRIVATE ${CMAKE_SOURCE_DIR}) ``` -------------------------------- ### Add PUCCH Adaptor Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/fapi_adaptor/phy/p7/pdu_translators/CMakeLists.txt Sets up the PUCCH adaptor test executable, linking to message adaptors, test helpers, and logging. ```cmake add_executable(fapi_phy_pucch_adaptor_test ul_pucch_pdu_test.cpp) target_link_libraries(fapi_phy_pucch_adaptor_test ocudu_fapi_phy_message_adaptors gtest gtest_main ocudu_fapi_message_builder_test_helpers ocudulog) target_include_directories(fapi_phy_pucch_adaptor_test PRIVATE ${CMAKE_SOURCE_DIR}/lib/fapi_adaptor/phy/p7/pdu_translators ${CMAKE_SOURCE_DIR}/tests/unittests/fapi) gtest_discover_tests(fapi_phy_pucch_adaptor_test) ``` -------------------------------- ### Add Subdirectory Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/phy/lower/processors/downlink/CMakeLists.txt Includes build configurations from a subdirectory. ```cmake add_subdirectory(pdxch) ``` -------------------------------- ### Define Application Unit Sources Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/o_cu_up/e2/CMakeLists.txt Lists the source files for the O-CU-UP E2 application unit library. ```cmake set(SOURCES o_cu_up_e2_config_cli11_schema.cpp o_cu_up_e2_config_translators.cpp o_cu_up_e2_config_yaml_writer.cpp) ``` -------------------------------- ### Define HAL Application Helper Library Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/helpers/hal/CMakeLists.txt Defines a static library named 'ocudu_hal_app_helpers' and lists its source files. It also sets the include directories for the library. ```cmake set(SOURCES hal_cli11_schema.cpp) add_library(ocudu_hal_app_helpers STATIC ${SOURCES}) target_include_directories(ocudu_hal_app_helpers PRIVATE ${CMAKE_SOURCE_DIR}) ``` -------------------------------- ### Add Executable and Link Libraries for gtpu_tunnel_nru_rx_test Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/gtpu/CMakeLists.txt Defines the 'gtpu_tunnel_nru_rx_test' executable, links it with required libraries, and discovers tests. ```cmake add_executable(gtpu_tunnel_nru_rx_test gtpu_tunnel_nru_rx_test.cpp) target_link_libraries(gtpu_tunnel_nru_rx_test ocudu_gtpu ocudu_pcap ocudu_support ocudulog GTest::gtest GTest::gtest_main) gtest_discover_tests(gtpu_tunnel_nru_rx_test) ``` -------------------------------- ### Build rx_power_analyzer executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/examples/radio/CMakeLists.txt Defines the 'rx_power_analyzer' executable and links it with ocudu radio, logging, support, and vector libraries. ```cmake add_executable(rx_power_analyzer rx_power_analyzer.cpp) target_link_libraries(rx_power_analyzer ocudu_radio ocudulog ocudu_support ocuduvec) ``` -------------------------------- ### Create Static Library for Channel Coding Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/lib/phy/upper/channel_coding/CMakeLists.txt Builds a static library named 'ocudu_channel_coding' using the channel coding factories implementation. ```cmake add_library(ocudu_channel_coding STATIC channel_coding_factories.cpp) ``` -------------------------------- ### Create Static Library for E2 Unit Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/units/flexible_o_du/o_du_high/e2/CMakeLists.txt Creates a static library named 'ocudu_o_du_high_app_unit_e2' using the defined source files. ```cmake add_library(ocudu_o_du_high_app_unit_e2 STATIC ${SOURCES}) ``` -------------------------------- ### Add PRS Adaptor Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/fapi_adaptor/phy/p7/pdu_translators/CMakeLists.txt Sets up the PRS adaptor test executable, including linking to message adaptors, support libraries, and test helpers. ```cmake add_executable(fapi_phy_prs_adaptor_test dl_prs_pdu_test.cpp) target_link_libraries(fapi_phy_prs_adaptor_test ocudu_fapi_phy_message_adaptors ocudu_upper_phy_support ocudulog gtest gtest_main ocudu_fapi_message_builder_test_helpers) target_include_directories(fapi_phy_prs_adaptor_test PRIVATE ${CMAKE_SOURCE_DIR}/tests/unittests/fapi) target_include_directories(fapi_phy_prs_adaptor_test PRIVATE ${CMAKE_SOURCE_DIR}/lib/fapi_adaptor/phy/p7/pdu_translators) gtest_discover_tests(fapi_phy_prs_adaptor_test) ``` -------------------------------- ### Build E2SM KPM Measurement Provider Metrics Test Executable Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/tests/unittests/e2/CMakeLists.txt Creates an executable for testing E2SM KPM measurement provider metrics. It links required libraries and discovers GTest tests. ```cmake add_executable(e2sm_kpm_meas_provider_metrics_test e2sm_kpm_meas_provider_metrics_test.cpp) target_link_libraries(e2sm_kpm_meas_provider_metrics_test ocudulog ocudu_e2 e2ap_asn1 ocudu_pcap ocudu_gateway ocudu_support e2_test_helpers GTest::gtest GTest::gtest_main ) target_include_directories(e2sm_kpm_meas_provider_metrics_test PRIVATE ${CMAKE_SOURCE_DIR}) gtest_discover_tests(e2sm_kpm_meas_provider_metrics_test) ``` -------------------------------- ### CMakeLists.txt Configuration Source: https://gitlab.com/ocudu/ocudu/-/blob/dev/apps/helpers/metrics/json_generators/ru/CMakeLists.txt Defines a static library, sets include directories, and links against yaml-cpp. Ensure yaml-cpp is available in your CMake environment. ```cmake # SPDX-FileCopyrightText: Copyright (C) 2021-2026 Software Radio Systems Limited # SPDX-License-Identifier: BSD-3-Clause-Open-MPI # Portions of this file may implement 3GPP specifications, which may be subject to additional licensing requirements. set(SOURCES ofh.cpp) add_library(ocudu_ru_metrics_json_generators_helpers STATIC ${SOURCES}) target_include_directories(ocudu_ru_metrics_json_generators_helpers PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/apps/helpers/metrics) target_link_libraries(ocudu_ru_metrics_json_generators_helpers PRIVATE ocudu::yaml-cpp) ```