|
|
@ -26,6 +26,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace srslte {
|
|
|
|
namespace srslte {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac_pcap::mac_pcap() : enable_write(false), ue_id(0), pcap_file(nullptr) {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mac_pcap::~mac_pcap()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
close();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void mac_pcap::enable(bool en)
|
|
|
|
void mac_pcap::enable(bool en)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
enable_write = true;
|
|
|
|
enable_write = true;
|
|
|
@ -39,8 +46,11 @@ void mac_pcap::open(const char* filename, uint32_t ue_id)
|
|
|
|
void mac_pcap::close()
|
|
|
|
void mac_pcap::close()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
enable_write = false;
|
|
|
|
enable_write = false;
|
|
|
|
|
|
|
|
if (pcap_file != nullptr) {
|
|
|
|
fprintf(stdout, "Saving MAC PCAP file\n");
|
|
|
|
fprintf(stdout, "Saving MAC PCAP file\n");
|
|
|
|
LTE_PCAP_Close(pcap_file);
|
|
|
|
LTE_PCAP_Close(pcap_file);
|
|
|
|
|
|
|
|
pcap_file = nullptr;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void mac_pcap::set_ue_id(uint16_t ue_id) {
|
|
|
|
void mac_pcap::set_ue_id(uint16_t ue_id) {
|
|
|
|