diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..11cb330 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,52 @@ +find_external_library( + DEPENDENCY_NAME e2sim + HEADER_NAME e2sim.hpp + LIBRARY_NAME e2sim + PATH_SUFFIXES e2sim + SEARCH_PATHS /usr/local/include +) + +set(source_files + helper/indication-message-helper.cc + helper/lte-indication-message-helper.cc + helper/mmwave-indication-message-helper.cc + helper/oran-interface-helper.cc + model/asn1c-types.cc + model/function-description.cc + model/kpm-function-description.cc + model/kpm-indication.cc + model/oran-interface.cc + model/ric-control-function-description.cc + model/ric-control-message.cc +) + +set(header_files + helper/indication-message-helper.h + helper/lte-indication-message-helper.h + helper/mmwave-indication-message-helper.h + helper/oran-interface-helper.h + model/asn1c-types.h + model/function-description.h + model/kpm-function-description.h + model/kpm-indication.h + model/oran-interface.h + model/ric-control-function-description.h + model/ric-control-message.h +) + +set(test_sources + test/oran-interface-test-suite.cc +) + +include_directories(${e2sim_INCLUDE_DIRS}) + +build_lib( + LIBNAME oran-interface + SOURCE_FILES ${source_files} + HEADER_FILES ${header_files} + LIBRARIES_TO_LINK + ${libcore} + ${e2sim_LIBRARIES} + TEST_SOURCES ${test_sources} +) + diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt new file mode 100644 index 0000000..f02c307 --- /dev/null +++ b/examples/CMakeLists.txt @@ -0,0 +1,19 @@ +set(base_examples + e2sim-integration-example + oran-interface-example + ric-indication-messages + ric-control-function-desc + l3-rrc-example + test-wrappers +) +foreach( + example + ${base_examples} +) + build_lib_example( + NAME ${example} + SOURCE_FILES ${example}.cc + LIBRARIES_TO_LINK ${liboran-interface} + ) +endforeach() + diff --git a/model/kpm-indication.cc b/model/kpm-indication.cc index ae237e0..11e088c 100644 --- a/model/kpm-indication.cc +++ b/model/kpm-indication.cc @@ -373,14 +373,14 @@ KpmIndicationMessage::FillODuContainer (PF_Container_t *ranContainer, (PerQCIReportListItem_t *) calloc (1, sizeof (PerQCIReportListItem_t)); pqrl->qci = perQciReportItem->m_qci; - NS_ABORT_MSG_IF ((perQciReportItem->m_dlPrbUsage < 0) | (perQciReportItem->m_dlPrbUsage > 100), + NS_ABORT_MSG_IF ((perQciReportItem->m_dlPrbUsage < 0) || (perQciReportItem->m_dlPrbUsage > 100), "As per ASN definition, dl_PRBUsage should be between 0 and 100"); long *dlUsedPrbs = (long *) calloc (1, sizeof (long)); *dlUsedPrbs = perQciReportItem->m_dlPrbUsage; pqrl->dl_PRBUsage = dlUsedPrbs; NS_LOG_LOGIC ("DL PRBs " << dlUsedPrbs); - NS_ABORT_MSG_IF ((perQciReportItem->m_ulPrbUsage < 0) | (perQciReportItem->m_ulPrbUsage > 100), + NS_ABORT_MSG_IF ((perQciReportItem->m_ulPrbUsage < 0) || (perQciReportItem->m_ulPrbUsage > 100), "As per ASN definition, ul_PRBUsage should be between 0 and 100"); long *ulUsedPrbs = (long *) calloc (1, sizeof (long)); *ulUsedPrbs = perQciReportItem->m_ulPrbUsage; diff --git a/model/kpm-indication.h b/model/kpm-indication.h index 7121ef0..9b18384 100644 --- a/model/kpm-indication.h +++ b/model/kpm-indication.h @@ -48,7 +48,7 @@ namespace ns3 { public: enum GlobalE2nodeType { gNB = 0, eNB = 1, ng_eNB = 2, en_gNB = 3 }; - const static int TIMESTAMP_LIMIT_SIZE = 8; + const int TIMESTAMP_LIMIT_SIZE = 8; /** * Holds the values to be used to fill the RIC Indication header */