Commit 41244607 authored by Robert Schmidt's avatar Robert Schmidt

IF module slot_indication: send message in PNF

Use this function to implement distinct behavior for monolithic or PNF:

- monolithic: run the scheduler, as normal
- PNF: send a slot indication; the VNF will send an answer which the PNF
  will handle elsewhere.

Add function declarations to make nr_ulsim compile, as NR_IF_Module.c is
part of the MAC sources. As of now, this is necessary; I think the right
way would be to take NR_IF_Module.c out of the MAC, and make this a
"glue" library that sticks L1 and L2 together, in monolithic (in VNF, in
that case, we should not link in L1, and for the PNF not the L2,
creating separate executables... Rome was not built in one day).
parent c5a76d66
......@@ -15,6 +15,8 @@ int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return (0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return (0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return 0; }
void handle_nr_slot_ind(uint16_t sfn, uint16_t slot) { }
int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; }
int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; }
int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; }
......
......@@ -396,7 +396,15 @@ static void match_crc_rx_pdu(nfapi_nr_rx_data_indication_t *rx_ind, nfapi_nr_crc
}
}
static void run_scheduler(module_id_t module_id, int CC_id, int frame, int slot)
extern void handle_nr_slot_ind(uint16_t sfn, uint16_t slot);
static void pnf_send_slot_ind(module_id_t module_id, int CC_id, int frame, int slot)
{
(void)module_id;
(void)CC_id;
handle_nr_slot_ind(frame, slot);
}
static void run_scheduler_monolithic(module_id_t module_id, int CC_id, int frame, int slot)
{
NR_IF_Module_t *ifi = nr_if_inst[module_id];
......@@ -509,7 +517,12 @@ NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {
nr_if_inst[Mod_id]->CC_mask=0;
nr_if_inst[Mod_id]->NR_UL_indication = NR_UL_indication;
nr_if_inst[Mod_id]->NR_slot_indication = run_scheduler;
if (NFAPI_MODE == NFAPI_MONOLITHIC)
nr_if_inst[Mod_id]->NR_slot_indication = run_scheduler_monolithic;
else if (NFAPI_MODE == NFAPI_MODE_PNF)
nr_if_inst[Mod_id]->NR_slot_indication = pnf_send_slot_ind;
else // NFAPI_MODE_VNF
NULL;
AssertFatal(pthread_mutex_init(&nr_if_inst[Mod_id]->if_mutex,NULL)==0,
"allocation of nr_if_inst[%d]->if_mutex fails\n",Mod_id);
}
......
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