Commit 524b9e8b authored by Aniq Ur Rahman's avatar Aniq Ur Rahman

UL_TTI [DONE]

parent ac1d74cb
......@@ -26,37 +26,42 @@ sudo <oai_codebase>/cmake_targets/ran_build/build/nr-softmodem -O <oai_codebase>
### Task-A [packing]
* Modify `nfapi_p7_message_pack()` in `nfapi_p7.c`
* In the switch case, change the labels as well as the pack functions:
* `pack_dl_config_request` becomes `pack_dl_tti_request` [x]
* `pack_ul_config_request` becomes `pack_ul_tti_request`
* `pack_dl_config_request` becomes `pack_dl_tti_request` [x]
* `pack_ul_config_request` becomes `pack_ul_tti_request` [x]
* `pack_hi_dci0_request` becomes `pack_ul_dci_request`
* `pack_tx_request` becomes `pack_tx_data_request`
### Task-B [unpacking]
* Modify `nfapi_p7_message_unpack()` in `nfapi_p7.c`
* `unpack_dl_tti_request` [x]
* `unpack_ul_tti_request`
* `unpack_dl_tti_request` [x]
* `unpack_ul_tti_request` [x]
* `unpack_ul_dci_request`
* `unpack_tx_data_request`
* Similarly change all the `unpack` functions within the switch-case block.
* Modify the behaviour of `check_unpack_length()` for the new `TAGS`
* this is where the unpack functions are called
* `dl_tti_request` [x]
* `ul_tti_request`
* `dl_tti_request` [x]
* `ul_tti_request` [x]
* `ul_dci_request`
* `tx_data_request`
### Task-C
* Write the `ul_tti` alternative for `nfapi_vnf_p7_ul_config_req()` in `vnf_p7_interface.c` and other such functions.
* `dl_tti` is present as `nr_dl_config` [x]
* `ul_tti`
* `ul_tti` [x]
* `ul_dci`
* `tx_data`
* Resolve the hard-coded areas in source code. [`HIGH-PRIORITY`] [x]
* Write the `ul_tti` equivalent for `oai_nfapi_dl_config_req` in `nfapi_vnf.c` and other such functions.
* `dl_tti` is present as `nr_dl_config` [x]
* `ul_tti`
* `ul_tti` is present as `oai_nfapi_ul_tti_req()` [x]
* `ul_dci`
* `tx_data`
* Check if `nr_schedule_response()` needs to be upgraded [x]
* only a couple of `NFAPI_MODE!=VNF_MODE` checks *can be added* before calling the functions to handle PDUs
* we need to add `NFAPI_MODE!=MONOLITHIC` checks before `oai_nfapi_dl_config_req` and other such fns [x]
......
......@@ -1354,6 +1354,26 @@ int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) {
return retval;
}
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) {
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
ul_tti_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
ul_tti_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST;
int retval = nfapi_vnf_p7_ul_tti_req(p7_config, ul_tti_req);
if (retval!=0) {
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
} else {
// Reset number of PDUs so that it is not resent
ul_tti_req->n_pdus = 0;
ul_tti_req->n_group = 0;
ul_tti_req->n_ulcch = 0;
ul_tti_req->n_ulsch = 0;
}
return retval;
}
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) {
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
ul_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
......
......@@ -1322,6 +1322,7 @@ typedef struct
} nfapi_nr_ul_tti_request_number_of_groups_t;
typedef struct {
nfapi_p7_message_header_t header;
uint16_t SFN; //0->1023
uint16_t Slot;//0->319
uint8_t n_pdus;//Number of PDUs that are included in this message. All PDUs in the message are numbered in order. Value 0 -> 255
......
This diff is collapsed.
......@@ -493,6 +493,15 @@ int nfapi_vnf_p7_nr_dl_config_req(nfapi_vnf_p7_config_t* config, nfapi_nr_dl_tti
return vnf_p7_pack_and_send_p7_msg(vnf_p7, &req->header);
}
int nfapi_vnf_p7_ul_tti_req(nfapi_vnf_p7_config_t* config, nfapi_nr_ul_tti_request_t* req)
{
if(config == 0 || req == 0)
return -1;
vnf_p7_t* vnf_p7 = (vnf_p7_t*)config;
return vnf_p7_pack_and_send_p7_msg(vnf_p7, &req->header);
}
int nfapi_vnf_p7_ul_config_req(nfapi_vnf_p7_config_t* config, nfapi_ul_config_request_t* req)
{
if(config == 0 || req == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment