|
|
@ -25,7 +25,14 @@
|
|
|
|
#include "srslte/common/mac_pcap.h"
|
|
|
|
#include "srslte/common/mac_pcap.h"
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
fprintf(stdout, "Saving MAC PCAP file\n");
|
|
|
|
if (pcap_file != nullptr) {
|
|
|
|
LTE_PCAP_Close(pcap_file);
|
|
|
|
fprintf(stdout, "Saving MAC PCAP file\n");
|
|
|
|
|
|
|
|
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) {
|
|
|
|