diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bbfcd759dbb028e11483a5c44ce3850f3ba10a1..abc1b630f5e439d7d1c8408320e8ffd175452915 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -755,6 +755,7 @@ set(NFAPI_SRC ) add_library(NFAPI_LIB ${NFAPI_SRC}) target_link_libraries(NFAPI_LIB PUBLIC nfapi_common) +target_link_libraries(NFAPI_LIB PUBLIC nr_fapi_p5) include_directories(${NFAPI_DIR}/nfapi/public_inc) include_directories(${NFAPI_DIR}/nfapi/inc) @@ -779,6 +780,7 @@ set(NFAPI_VNF_SRC ) add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC}) target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) +target_link_libraries(NFAPI_VNF_LIB PRIVATE nr_fapi_p5) if(OAI_AERIAL) target_compile_definitions(NFAPI_VNF_LIB PRIVATE ENABLE_AERIAL) endif() diff --git a/nfapi/oai_integration/aerial/CMakeLists.txt b/nfapi/oai_integration/aerial/CMakeLists.txt index f34615dd0dcabc4550e8e15288a926f190e07c78..4c02ab01e95c904c78094c98d0df10b3b5b5a3dd 100644 --- a/nfapi/oai_integration/aerial/CMakeLists.txt +++ b/nfapi/oai_integration/aerial/CMakeLists.txt @@ -21,6 +21,7 @@ if (OAI_AERIAL) endif () target_compile_definitions(aerial_lib PUBLIC ENABLE_L2_SLT_RSP ENABLE_AERIAL) target_link_libraries(aerial_lib PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) + target_link_libraries(aerial_lib PRIVATE nr_fapi_p5) target_link_libraries(aerial_lib PRIVATE "${NVLOG_LIB}" "${NVIPC_LIB}") else () message(STATUS "No Support for Aerial") diff --git a/nfapi/oai_integration/aerial/fapi_vnf_p5.c b/nfapi/oai_integration/aerial/fapi_vnf_p5.c index c303255bfe63c2988cee250428644c182676df23..dcf30a7ab0445747467ec840af9c6ffeed2f8529 100644 --- a/nfapi/oai_integration/aerial/fapi_vnf_p5.c +++ b/nfapi/oai_integration/aerial/fapi_vnf_p5.c @@ -33,6 +33,8 @@ #include "fapi_vnf_p5.h" #include "fapi_vnf_p7.h" #include "nfapi/open-nFAPI/vnf/inc/vnf_p7.h" +#include "nr_fapi.h" +#include "nr_fapi_p5.h" extern RAN_CONTEXT_t RC; extern UL_RCC_IND_t UL_RCC_INFO; diff --git a/nfapi/open-nFAPI/CMakeLists.txt b/nfapi/open-nFAPI/CMakeLists.txt index e4717b2d6719fa2d26a6c88fb841d656f8ae79be..ad4131c621f54eb7309eabed5160dd6da601283a 100644 --- a/nfapi/open-nFAPI/CMakeLists.txt +++ b/nfapi/open-nFAPI/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(common) +add_subdirectory(fapi) diff --git a/nfapi/open-nFAPI/fapi/CMakeLists.txt b/nfapi/open-nFAPI/fapi/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..35e129746bf2bffaf7f074f661b486c640e005ec --- /dev/null +++ b/nfapi/open-nFAPI/fapi/CMakeLists.txt @@ -0,0 +1,6 @@ +add_library(nr_fapi_p5 + src/nr_fapi_p5.c +) +target_include_directories(nr_fapi_p5 PUBLIC inc) +# Note: Dependencies with NFAPI_LIB NFAPI_USER_LIB only necessary until last FAPI function is moved into new library, to be removed at a later stage +target_link_libraries(nr_fapi_p5 PUBLIC nfapi_common NFAPI_LIB NFAPI_USER_LIB) diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi.h new file mode 100644 index 0000000000000000000000000000000000000000..bf01868df9dce26c923a5972ca26d4d750c56a02 --- /dev/null +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi.h @@ -0,0 +1,52 @@ +/* + * 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 nfapi/open-nFAPI/fapi/inc/nr_fapi.h + * \brief + * \author Ruben S. Silva + * \date 2024 + * \version 0.1 + * \company OpenAirInterface Software Alliance + * \email: contact@openairinterface.org, rsilva@allbesmart.pt + * \note + * \warning + */ + +#ifndef OPENAIRINTERFACE_NR_FAPI_H +#define OPENAIRINTERFACE_NR_FAPI_H + +#include "stdint.h" +#include "string.h" +#include "nfapi_interface.h" +#include "nfapi_nr_interface.h" +#include "nfapi_nr_interface_scf.h" +#include "nfapi.h" +#include "assertions.h" + +#define DEBUG_FAPI_NFAPI_MSGS 0 + +typedef struct { + uint8_t num_msg; + uint8_t opaque_handle; + uint16_t message_id; + uint32_t message_length; +} fapi_message_header_t; + +#endif // OPENAIRINTERFACE_NR_FAPI_H diff --git a/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h new file mode 100644 index 0000000000000000000000000000000000000000..197f23d06d5d76336b1adf0000c1671f5ccc3d89 --- /dev/null +++ b/nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h @@ -0,0 +1,37 @@ +/* + * 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 nfapi/open-nFAPI/fapi/inc/nr_fapi_p5.h + * \brief + * \author Ruben S. Silva + * \date 2024 + * \version 0.1 + * \company OpenAirInterface Software Alliance + * \email: contact@openairinterface.org, rsilva@allbesmart.pt + * \note + * \warning + */ + +#ifndef OPENAIRINTERFACE_NR_FAPI_P5_H +#define OPENAIRINTERFACE_NR_FAPI_P5_H +#include "stdint.h" +#include "nfapi_interface.h" + +#endif // OPENAIRINTERFACE_NR_FAPI_P5_H diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c new file mode 100644 index 0000000000000000000000000000000000000000..53ed3aa1be119b1524ccba74674aa02ae9b5971b --- /dev/null +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c @@ -0,0 +1,33 @@ +/* + * 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 nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c + * \brief + * \author Ruben S. Silva + * \date 2024 + * \version 0.1 + * \company OpenAirInterface Software Alliance + * \email: contact@openairinterface.org, rsilva@allbesmart.pt + * \note + * \warning + */ +#include "nr_fapi.h" +#include "nr_fapi_p5.h" +#include "debug.h" diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c index 3701ef9f0504429a59bc1457322c7e79990d992c..49c6f757a1a0e91b15429646da3f4e07a8e1ca12 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c @@ -37,7 +37,7 @@ #include "nfapi_nr_interface_scf.h" #include "nfapi/oai_integration/vendor_ext.h" #include <debug.h> - +#include "nr_fapi_p5.h" // Pack routines //TODO: Add pacl/unpack fns for uint32 and uint64 diff --git a/nfapi/open-nFAPI/vnf/src/vnf.c b/nfapi/open-nFAPI/vnf/src/vnf.c index 6a769acd772f6d02912db304c1a23d6e6968db9e..631ce2b7e9fb36542418d40ea8f1de675696ac94 100644 --- a/nfapi/open-nFAPI/vnf/src/vnf.c +++ b/nfapi/open-nFAPI/vnf/src/vnf.c @@ -30,6 +30,7 @@ #ifdef ENABLE_AERIAL #include "nfapi/oai_integration/aerial/fapi_nvIPC.h" #include "nfapi/oai_integration/aerial/fapi_vnf_p5.h" +#include "nr_fapi.h" #endif #include "nfapi/oai_integration/vendor_ext.h"