File usrp_driver.cpp¶
Functions
-
RadctrlPacket parse_radctrl_packet(std::string message)¶
Parses a string into a RadctrlPacket, if possible.
- Parameters:
message – [in] The message in string form
- Returns:
A struct containing the parsed message.
-
std::string format_rxpacket(RxPacket packet)¶
Formats an RxPacket into a string for IPC messaging.
- Parameters:
packet – [in] The RxPacket to format
- Returns:
A string containing the formatted message.
- std::vector<std::vector<std::complex<float>>> make_tx_samples(
- int total_tx_channels,
- const RadctrlPacket &driver_packet,
- std::vector<std::complex<float>*> pulse_ptrs
Makes a set of vectors of the samples for each TX channel from shared memory.
- Parameters:
total_tx_channels – [in] Number of tx channels.
driver_packet – [in] A received driver packet from radar_control.
pulse_ptrs – [in] Pointer for each channel in the pulse buffer.
- Returns:
A set of vectors of TX samples for each USRP channel.
- void transmit(
- zmq::context_t &driver_c,
- USRP &usrp_d,
- const DriverOptions &driver_options
- void receive(
- zmq::context_t &driver_c,
- USRP &usrp_d,
- const DriverOptions &driver_options
Runs in a seperate thread to control receiving from the USRPs.
- Parameters:
driver_c – [in] The driver ZMQ context.
usrp_d – [in] The multi-USRP SuperDARN wrapper object.
driver_options – [in] The driver options parsed from config.
-
int32_t UHD_SAFE_MAIN(int32_t argc, char *argv[])¶
UHD wrapped main function to start threads.
Creates a new multi-USRP object using parameters from config file. Starts receive and transmit threads to operate on the multi-USRP object.
- Returns:
EXIT_SUCCESS
-
struct clocks_t¶
-
struct RadctrlPacket¶
Struct replacing the driver_packet.proto definition. This will be populated from the messages received from radar_control.
Public Members
-
uint32_t sequence_num = {}¶
-
double rxrate = {}¶
-
double txrate = {}¶
-
double txcenterfreq = {}¶
-
double rxcenterfreq = {}¶
-
uint32_t num_rx_samps = {}¶
-
uint32_t num_tx_samps = {}¶
-
double seqtime = {}¶
-
double sample_timing = {}¶
-
bool burst_start = {}¶
-
bool burst_end = {}¶
-
bool align_sequences = {}¶
-
uint32_t buffer_offset = {}¶
-
uint32_t sequence_num = {}¶
-
struct RxPacket¶
Struct replacing the rxsamplesmetadata.proto definition. This will be populated and converted to messages to send to rx_signal_processing.
Public Members
-
uint32_t sequence_num¶
-
uint32_t num_rx_samps¶
-
double rx_rate¶
-
double sequence_time¶
-
double initialization_time¶
-
double sequence_start_time¶
-
uint64_t ringbuffer_size¶
-
uint32_t agc_status_bank_h¶
-
uint32_t lp_status_bank_h¶
-
uint32_t agc_status_bank_l¶
-
uint32_t lp_status_bank_l¶
-
bool gps_locked¶
-
double gps_to_system_time_diff¶
-
uint32_t sequence_num¶