|
|
|
@ -730,6 +730,26 @@ int mac_sch_pdu_unpack_test2()
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int mac_slsch_pdu_unpack_test1()
|
|
|
|
|
{
|
|
|
|
|
// SL-SCH PDU captures from UXM 5G CV2X
|
|
|
|
|
static uint8_t tv[] = {0x30, 0xED, 0x0E, 0x03, 0x00, 0x00, 0x01, 0x21, 0x2B, 0x1F, 0x9F, 0x75, 0x76,
|
|
|
|
|
0x87, 0x00, 0x00, 0x8E, 0x9E, 0xA5, 0xFD, 0xA1, 0xA3, 0xA7, 0xA9, 0x7F, 0x68,
|
|
|
|
|
0x6C, 0xB8, 0xBF, 0x0F, 0x96, 0x89, 0x2E, 0xDC, 0x80, 0x64, 0x06, 0x40, 0x00,
|
|
|
|
|
0x18, 0x6A, 0x07, 0x20, 0x7C, 0xE1, 0xE0, 0x04, 0x40, 0x02, 0x04, 0x80, 0x60,
|
|
|
|
|
0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
|
|
|
|
|
|
|
|
|
srslte::log_filter mac_log("MAC");
|
|
|
|
|
mac_log.set_level(srslte::LOG_LEVEL_DEBUG);
|
|
|
|
|
mac_log.set_hex_limit(100000);
|
|
|
|
|
|
|
|
|
|
#if HAVE_PCAP
|
|
|
|
|
pcap_handle->write_sl_crnti(tv, sizeof(tv), CRNTI, true, 1);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
|
{
|
|
|
|
|
#if HAVE_PCAP
|
|
|
|
@ -820,5 +840,7 @@ int main(int argc, char** argv)
|
|
|
|
|
|
|
|
|
|
TESTASSERT(mac_sch_pdu_pack_test8() == SRSLTE_SUCCESS);
|
|
|
|
|
|
|
|
|
|
TESTASSERT(mac_slsch_pdu_unpack_test1() == SRSLTE_SUCCESS);
|
|
|
|
|
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|