Files
openairinterface5g/nfapi/open-nFAPI/pnf_sim/inc/fapi_stub.h
T
Cedric Roux 922b5b595a Fix NFAPI integration
This commit fixes issues introduced by the previous commit.

Summary of work:
- cleanup:
  - fix LOG_XX to be less verbose
  - fix cmake_targets/CMakeLists.txt
  - fix oaienv
  - remove dead code
- bug fixes:
  - in openair1/SCHED/fapi_l1.c we had:
      eNB->pdcch_vars[subframe&1].num_dci           = number_dci;
    should be:
      eNB->pdcch_vars[subframe&1].num_dci           = 0;
    This bug let the PHY send more DCIs than what should have been
    sent because num_dci is incremented later on in the code.
    This fix may be a problem for fapi mode, to be checked.
  - add new T VCD traces
  - revert openair1/PHY/TOOLS/file_output.c to 'develop' version
  - remove thread_id in logRecord/logRecord_mt
  - revert (and adapt) configuration files
  - be careful when doing frame++, we need to % 1024
  - revert target_rx_power in openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
- NFAPI:
  - the open-nFAPI code has been included in the repository. See nfapi/README.
    Maybe we should "git clone" the Cisco repository instead. We have to be
    careful of availability though.

What has been tested:
- monolithic eNB FDD 5/10MHz with one UE, iperf UDP/TCP uplink/downlink

Anything else may fail to work, especially the FAPI mode, which has not
been tested at all.
2018-01-15 15:24:50 +01:00

77 lines
2.4 KiB
C

/*
* Copyright 2017 Cisco Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
#ifndef _FAPI_STUB_H_
#define _FAPI_STUB_H_
#include "fapi_interface.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct fapi fapi_t;
typedef struct fapi {
void* user_data;
} fapi_t;
typedef struct {
int (*fapi_param_response)(fapi_t* fapi, fapi_param_resp_t* resp);
int (*fapi_config_response)(fapi_t* fapi, fapi_config_resp_t* resp);
int (*fapi_subframe_ind)(fapi_t* fapi, fapi_subframe_ind_t* ind);
int (*fapi_harq_ind)(fapi_t* fapi, fapi_harq_ind_t* ind);
int (*fapi_crc_ind)(fapi_t* fapi, fapi_crc_ind_t* ind);
int (*fapi_rx_ulsch_ind)(fapi_t* fapi, fapi_rx_ulsch_ind_t* ind);
int (*fapi_rx_cqi_ind)(fapi_t* fapi, fapi_rx_cqi_ind_t* ind);
int (*fapi_rx_sr_ind)(fapi_t* fapi, fapi_rx_sr_ind_t* ind);
int (*fapi_rach_ind)(fapi_t* fapi, fapi_rach_ind_t* ind);
int (*fapi_srs_ind)(fapi_t* fapi, fapi_srs_ind_t* ind);
int (*fapi_lbt_dl_ind)(fapi_t* fapi, fapi_lbt_dl_ind_t* ind);
int (*fapi_nb_harq_ind)(fapi_t* fapi, fapi_nb_harq_ind_t* ind);
int (*fapi_nrach_ind)(fapi_t* fapi, fapi_nrach_ind_t* ind);
} fapi_cb_t;
typedef struct {
uint16_t duplex_mode;
uint16_t dl_channel_bw_support;
uint16_t ul_channel_bw_support;
} fapi_config_t;
fapi_t* fapi_create(fapi_cb_t* callbacks, fapi_config_t* config);
void fapi_start_data(fapi_t* fapi, unsigned rx_port, const char* tx_address, unsigned tx_port);
int fapi_param_request(fapi_t* fapi, fapi_param_req_t* req);
int fapi_config_request(fapi_t* fapi, fapi_config_req_t* req);
int fapi_start_request(fapi_t* fapi, fapi_start_req_t* req);
int fapi_dl_config_request(fapi_t* fapi, fapi_dl_config_req_t* req);
int fapi_ul_config_request(fapi_t* fapi, fapi_ul_config_req_t* req);
int fapi_hi_dci0_request(fapi_t* fapi, fapi_hi_dci0_req_t* req);
int fapi_tx_request(fapi_t* fapi, fapi_tx_req_t* req);
#if defined(__cplusplus)
}
#endif
#endif