Remove cast in pack_nr_slot_indication
Add utility functions related to SLOT.indication
This commit is contained in:
committed by
Robert Schmidt
parent
75f213ea92
commit
18799ef44b
@@ -37,11 +37,14 @@
|
||||
|
||||
bool eq_dl_tti_request(const nfapi_nr_dl_tti_request_t *a, const nfapi_nr_dl_tti_request_t *b);
|
||||
bool eq_ul_tti_request(const nfapi_nr_ul_tti_request_t *a, const nfapi_nr_ul_tti_request_t *b);
|
||||
bool eq_slot_indication(const nfapi_nr_slot_indication_scf_t *a, const nfapi_nr_slot_indication_scf_t *b);
|
||||
|
||||
void free_dl_tti_request(nfapi_nr_dl_tti_request_t *msg);
|
||||
void free_ul_tti_request(nfapi_nr_ul_tti_request_t *msg);
|
||||
void free_slot_indication(nfapi_nr_slot_indication_scf_t *msg);
|
||||
|
||||
void copy_dl_tti_request(const nfapi_nr_dl_tti_request_t *src, nfapi_nr_dl_tti_request_t *dst);
|
||||
void copy_ul_tti_request(const nfapi_nr_ul_tti_request_t *src, nfapi_nr_ul_tti_request_t *dst);
|
||||
void copy_slot_indication(const nfapi_nr_slot_indication_scf_t *src, nfapi_nr_slot_indication_scf_t *dst);
|
||||
|
||||
#endif // OPENAIRINTERFACE_NR_FAPI_P7_UTILS_H
|
||||
|
||||
@@ -487,6 +487,16 @@ bool eq_ul_tti_request(const nfapi_nr_ul_tti_request_t *a, const nfapi_nr_ul_tti
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eq_slot_indication(const nfapi_nr_slot_indication_scf_t *a, const nfapi_nr_slot_indication_scf_t *b)
|
||||
{
|
||||
EQ(a->header.message_id, b->header.message_id);
|
||||
EQ(a->header.message_length, b->header.message_length);
|
||||
|
||||
EQ(a->sfn, b->sfn);
|
||||
EQ(a->slot, b->slot);
|
||||
return true;
|
||||
}
|
||||
|
||||
void free_dl_tti_request(nfapi_nr_dl_tti_request_t *msg)
|
||||
{
|
||||
if (msg->vendor_extension) {
|
||||
@@ -508,6 +518,11 @@ void free_ul_tti_request(nfapi_nr_ul_tti_request_t *msg)
|
||||
}
|
||||
}
|
||||
|
||||
void free_slot_indication(nfapi_nr_slot_indication_scf_t *msg)
|
||||
{
|
||||
// Nothing to free
|
||||
}
|
||||
|
||||
static void copy_dl_tti_beamforming(const nfapi_nr_tx_precoding_and_beamforming_t *src,
|
||||
nfapi_nr_tx_precoding_and_beamforming_t *dst)
|
||||
{
|
||||
@@ -967,3 +982,12 @@ void copy_ul_tti_request(const nfapi_nr_ul_tti_request_t *src, nfapi_nr_ul_tti_r
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void copy_slot_indication(const nfapi_nr_slot_indication_scf_t *src, nfapi_nr_slot_indication_scf_t *dst)
|
||||
{
|
||||
dst->header.message_id = src->header.message_id;
|
||||
dst->header.message_length = src->header.message_length;
|
||||
|
||||
dst->sfn = src->sfn;
|
||||
dst->slot = src->slot;
|
||||
}
|
||||
|
||||
@@ -2648,7 +2648,7 @@ uint8_t pack_nr_slot_indication(void *msg, uint8_t **ppWritePackedMsg, uint8_t *
|
||||
{
|
||||
nfapi_nr_slot_indication_scf_t *pNfapiMsg = (nfapi_nr_slot_indication_scf_t *)msg;
|
||||
|
||||
if (!(push16((uint16_t)pNfapiMsg->sfn, ppWritePackedMsg, end) && push16((uint16_t)pNfapiMsg->slot, ppWritePackedMsg, end)))
|
||||
if (!(push16(pNfapiMsg->sfn, ppWritePackedMsg, end) && push16(pNfapiMsg->slot, ppWritePackedMsg, end)))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user