Commit 75f213ea authored by Rúben Soares Silva's avatar Rúben Soares Silva Committed by Robert Schmidt

Move functions for packing/unpacking UL_TTI.request

Add unitary test for UL_TTI.request ( test pack/unpack, free, copy and compare )

Add function rand32_range
parent 0653c38a
......@@ -31,5 +31,7 @@ int fapi_nr_p7_message_unpack(void *pMessageBuf,
uint8_t pack_dl_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config);
uint8_t unpack_dl_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config);
uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config);
uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config);
#endif // OPENAIRINTERFACE_NR_FAPI_P7_H
This diff is collapsed.
......@@ -46,11 +46,6 @@ uint8_t unpack_nr_srs_indication(uint8_t **ppReadPackedMsg,
nfapi_nr_srs_indication_t *pNfapiMsg,
nfapi_p7_codec_config_t *config);
uint8_t pack_ul_tti_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config);
uint8_t unpack_ul_tti_request(uint8_t **ppReadPackedMsg, uint8_t *end, void *msg, nfapi_p7_codec_config_t *config);
uint8_t pack_ul_dci_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config);
uint8_t pack_ue_release_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *end, nfapi_p7_codec_config_t *config);
......
This diff is collapsed.
......@@ -81,6 +81,11 @@ uint16_t rand16_range(uint16_t lower, uint16_t upper)
return (rand() % (upper - lower + 1)) + lower;
}
uint32_t rand32_range(uint32_t lower, uint32_t upper)
{
return (rand() % (upper - lower + 1)) + lower;
}
int main(int n, char *v[]);
static inline void fapi_test_init_seeded(time_t seed)
......
set(Test_Labels fapi p7)
set(_fapi_p7_messages "dci_inversion;dl_tti_request")
set(_fapi_p7_messages "dci_inversion;dl_tti_request;ul_tti_request")
foreach (fapi_p7_message IN LISTS _fapi_p7_messages)
add_executable(nr_fapi_${fapi_p7_message}_test nr_fapi_${fapi_p7_message}_test.c)
target_link_libraries(nr_fapi_${fapi_p7_message}_test PUBLIC nr_fapi_p7)
......
This diff is collapsed.
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