mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
Merge remote-tracking branch 'origin/nfapi-p7-refactoring' into integration_2024_w48 (!3131)
FAPI P7 Refactoring and unitary test creation This MR is a follow-up to the work done in !2714 this time separating the P7 FAPI messages into its own library (nr_fapi_p7). In the same way, utility functions to copy, free and compare have been added for each message, as well as an addition function to get the allocated size for a message, which is used for the messages that can be too big to fit in a buffer that's allocated in the stack. Unitary tests have been added for each of the messages, testing pack/unpack and the utility functions added.
This commit is contained in:
@@ -146,20 +146,17 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
|
||||
|
||||
static bool crc_sfn_slot_matcher(void *wanted, void *candidate)
|
||||
{
|
||||
nfapi_p7_message_header_t *msg = candidate;
|
||||
int sfn_sf = *(int*)wanted;
|
||||
nfapi_nr_p7_message_header_t *msg = candidate;
|
||||
int sfn_sf = *(int *)wanted;
|
||||
|
||||
switch (msg->message_id)
|
||||
{
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
|
||||
{
|
||||
switch (msg->message_id) {
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION: {
|
||||
nfapi_nr_crc_indication_t *ind = candidate;
|
||||
return NFAPI_SFNSLOT2SFN(sfn_sf) == ind->sfn && NFAPI_SFNSLOT2SLOT(sfn_sf) == ind->slot;
|
||||
}
|
||||
|
||||
default:
|
||||
LOG_E(NR_MAC, "sfn_slot_match bad ID: %d\n", msg->message_id);
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user