usrp_echotimer_cc_impl.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2014 Communications Engineering Lab, KIT.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_RADAR_USRP_ECHOTIMER_CC_IMPL_H
#define INCLUDED_RADAR_USRP_ECHOTIMER_CC_IMPL_H
#include <radar/usrp_echotimer_cc.h>
#include <uhd/usrp/multi_usrp.hpp>
#include <uhd/utils/thread.hpp>
namespace gr {
namespace radar {
class usrp_echotimer_cc_impl : public usrp_echotimer_cc
{
private:
// Nothing to declare in this block.
protected:
int calculate_output_stream_length(const gr_vector_int& ninput_items);
public:
usrp_echotimer_cc_impl(int samp_rate,
float center_freq,
int num_delay_samps,
std::string args_tx,
int channel_tx,
std::string wire_tx,
std::string clock_source_tx,
std::string time_source_tx,
std::string antenna_tx,
float gain_tx,
float timeout_tx,
float wait_tx,
float lo_offset_tx,
std::string args_rx,
int channel_rx,
std::string wire_rx,
std::string clock_source_rx,
std::string time_source_rx,
std::string antenna_rx,
float gain_rx,
float timeout_rx,
float wait_rx,
float lo_offset_rx,
const std::string& len_key);
~usrp_echotimer_cc_impl();
void send();
void receive();
void set_num_delay_samps(int num_samps);
void set_rx_gain(float gain);
void set_tx_gain(float gain);
int d_samp_rate;
float d_center_freq;
int d_num_delay_samps;
std::vector<gr_complex> d_out_buffer;
std::string d_args_tx, d_args_rx;
std::string d_clock_source_tx, d_clock_source_rx;
std::string d_wire_tx, d_wire_rx;
std::string d_antenna_tx, d_antenna_rx;
std::string d_time_source_tx, d_time_source_rx;
uhd::usrp::multi_usrp::sptr d_usrp_tx, d_usrp_rx;
uhd::tune_request_t d_tune_request_tx, d_tune_request_rx;
uhd::tx_streamer::sptr d_tx_stream;
uhd::rx_streamer::sptr d_rx_stream;
uhd::tx_metadata_t d_metadata_tx;
uhd::rx_metadata_t d_metadata_rx;
double d_lo_offset_tx, d_lo_offset_rx;
float d_timeout_tx, d_timeout_rx;
float d_wait_tx, d_wait_rx;
float d_gain_tx, d_gain_rx;
uhd::time_spec_t d_time_now_tx, d_time_now_rx;
gr::thread::thread d_thread_recv;
gr_complex* d_out_recv;
int d_noutput_items_recv;
pmt::pmt_t d_time_key, d_time_val, d_srcid;
gr::thread::thread d_thread_send;
gr_complex* d_in_send;
int d_noutput_items_send;
// Where all the action really happens
int work(int noutput_items,
gr_vector_int& ninput_items,
gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items);
};
} // namespace radar
} // namespace gr
#endif /* INCLUDED_RADAR_USRP_ECHOTIMER_CC_IMPL_H */
gr::radar::usrp_echotimer_cc_impl::d_usrp_tx
uhd::usrp::multi_usrp::sptr d_usrp_tx
Definition usrp_echotimer_cc_impl.h:82
gr::radar::usrp_echotimer_cc_impl::d_time_now_rx
uhd::time_spec_t d_time_now_rx
Definition usrp_echotimer_cc_impl.h:93
gr::radar::usrp_echotimer_cc_impl::d_tune_request_tx
uhd::tune_request_t d_tune_request_tx
Definition usrp_echotimer_cc_impl.h:83
gr::radar::usrp_echotimer_cc_impl::set_num_delay_samps
void set_num_delay_samps(int num_samps)
gr::radar::usrp_echotimer_cc_impl::usrp_echotimer_cc_impl
usrp_echotimer_cc_impl(int samp_rate, float center_freq, int num_delay_samps, std::string args_tx, int channel_tx, std::string wire_tx, std::string clock_source_tx, std::string time_source_tx, std::string antenna_tx, float gain_tx, float timeout_tx, float wait_tx, float lo_offset_tx, std::string args_rx, int channel_rx, std::string wire_rx, std::string clock_source_rx, std::string time_source_rx, std::string antenna_rx, float gain_rx, float timeout_rx, float wait_rx, float lo_offset_rx, const std::string &len_key)
gr::radar::usrp_echotimer_cc_impl::d_args_tx
std::string d_args_tx
Definition usrp_echotimer_cc_impl.h:77
gr::radar::usrp_echotimer_cc_impl::~usrp_echotimer_cc_impl
~usrp_echotimer_cc_impl()
gr::radar::usrp_echotimer_cc_impl::d_samp_rate
int d_samp_rate
Definition usrp_echotimer_cc_impl.h:72
gr::radar::usrp_echotimer_cc_impl::d_time_key
pmt::pmt_t d_time_key
Definition usrp_echotimer_cc_impl.h:98
gr::radar::usrp_echotimer_cc_impl::d_thread_recv
gr::thread::thread d_thread_recv
Definition usrp_echotimer_cc_impl.h:95
gr::radar::usrp_echotimer_cc_impl::d_lo_offset_rx
double d_lo_offset_rx
Definition usrp_echotimer_cc_impl.h:88
gr::radar::usrp_echotimer_cc_impl::d_gain_rx
float d_gain_rx
Definition usrp_echotimer_cc_impl.h:91
gr::radar::usrp_echotimer_cc_impl::calculate_output_stream_length
int calculate_output_stream_length(const gr_vector_int &ninput_items)
gr::radar::usrp_echotimer_cc_impl::set_tx_gain
void set_tx_gain(float gain)
gr::radar::usrp_echotimer_cc_impl::d_tx_stream
uhd::tx_streamer::sptr d_tx_stream
Definition usrp_echotimer_cc_impl.h:84
gr::radar::usrp_echotimer_cc_impl::d_time_val
pmt::pmt_t d_time_val
Definition usrp_echotimer_cc_impl.h:98
gr::radar::usrp_echotimer_cc_impl::d_wait_tx
float d_wait_tx
Definition usrp_echotimer_cc_impl.h:90
gr::radar::usrp_echotimer_cc_impl::d_time_source_tx
std::string d_time_source_tx
Definition usrp_echotimer_cc_impl.h:81
gr::radar::usrp_echotimer_cc_impl::d_lo_offset_tx
double d_lo_offset_tx
Definition usrp_echotimer_cc_impl.h:88
gr::radar::usrp_echotimer_cc_impl::d_args_rx
std::string d_args_rx
Definition usrp_echotimer_cc_impl.h:77
gr::radar::usrp_echotimer_cc_impl::d_rx_stream
uhd::rx_streamer::sptr d_rx_stream
Definition usrp_echotimer_cc_impl.h:85
gr::radar::usrp_echotimer_cc_impl::d_srcid
pmt::pmt_t d_srcid
Definition usrp_echotimer_cc_impl.h:98
gr::radar::usrp_echotimer_cc_impl::receive
void receive()
gr::radar::usrp_echotimer_cc_impl::d_timeout_tx
float d_timeout_tx
Definition usrp_echotimer_cc_impl.h:89
gr::radar::usrp_echotimer_cc_impl::d_tune_request_rx
uhd::tune_request_t d_tune_request_rx
Definition usrp_echotimer_cc_impl.h:83
gr::radar::usrp_echotimer_cc_impl::d_center_freq
float d_center_freq
Definition usrp_echotimer_cc_impl.h:73
gr::radar::usrp_echotimer_cc_impl::d_antenna_tx
std::string d_antenna_tx
Definition usrp_echotimer_cc_impl.h:80
gr::radar::usrp_echotimer_cc_impl::d_time_source_rx
std::string d_time_source_rx
Definition usrp_echotimer_cc_impl.h:81
gr::radar::usrp_echotimer_cc_impl::work
int work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
gr::radar::usrp_echotimer_cc_impl::d_wire_rx
std::string d_wire_rx
Definition usrp_echotimer_cc_impl.h:79
gr::radar::usrp_echotimer_cc_impl::d_timeout_rx
float d_timeout_rx
Definition usrp_echotimer_cc_impl.h:89
gr::radar::usrp_echotimer_cc_impl::d_noutput_items_recv
int d_noutput_items_recv
Definition usrp_echotimer_cc_impl.h:97
gr::radar::usrp_echotimer_cc_impl::d_time_now_tx
uhd::time_spec_t d_time_now_tx
Definition usrp_echotimer_cc_impl.h:93
gr::radar::usrp_echotimer_cc_impl::d_usrp_rx
uhd::usrp::multi_usrp::sptr d_usrp_rx
Definition usrp_echotimer_cc_impl.h:82
gr::radar::usrp_echotimer_cc_impl::d_gain_tx
float d_gain_tx
Definition usrp_echotimer_cc_impl.h:91
gr::radar::usrp_echotimer_cc_impl::d_wire_tx
std::string d_wire_tx
Definition usrp_echotimer_cc_impl.h:79
gr::radar::usrp_echotimer_cc_impl::d_antenna_rx
std::string d_antenna_rx
Definition usrp_echotimer_cc_impl.h:80
gr::radar::usrp_echotimer_cc_impl::d_in_send
gr_complex * d_in_send
Definition usrp_echotimer_cc_impl.h:101
gr::radar::usrp_echotimer_cc_impl::d_clock_source_tx
std::string d_clock_source_tx
Definition usrp_echotimer_cc_impl.h:78
gr::radar::usrp_echotimer_cc_impl::d_out_recv
gr_complex * d_out_recv
Definition usrp_echotimer_cc_impl.h:96
gr::radar::usrp_echotimer_cc_impl::send
void send()
gr::radar::usrp_echotimer_cc_impl::d_num_delay_samps
int d_num_delay_samps
Definition usrp_echotimer_cc_impl.h:74
gr::radar::usrp_echotimer_cc_impl::d_thread_send
gr::thread::thread d_thread_send
Definition usrp_echotimer_cc_impl.h:100
gr::radar::usrp_echotimer_cc_impl::d_out_buffer
std::vector< gr_complex > d_out_buffer
Definition usrp_echotimer_cc_impl.h:75
gr::radar::usrp_echotimer_cc_impl::d_metadata_tx
uhd::tx_metadata_t d_metadata_tx
Definition usrp_echotimer_cc_impl.h:86
gr::radar::usrp_echotimer_cc_impl::d_metadata_rx
uhd::rx_metadata_t d_metadata_rx
Definition usrp_echotimer_cc_impl.h:87
gr::radar::usrp_echotimer_cc_impl::d_clock_source_rx
std::string d_clock_source_rx
Definition usrp_echotimer_cc_impl.h:78
gr::radar::usrp_echotimer_cc_impl::d_noutput_items_send
int d_noutput_items_send
Definition usrp_echotimer_cc_impl.h:102
gr::radar::usrp_echotimer_cc_impl::set_rx_gain
void set_rx_gain(float gain)
gr::radar::usrp_echotimer_cc_impl::d_wait_rx
float d_wait_rx
Definition usrp_echotimer_cc_impl.h:90
gr::radar::usrp_echotimer_cc
<+description of block+>
Definition usrp_echotimer_cc.h:36
gr::radar
Definition crop_matrix_vcvc.h:29
gr
Definition crop_matrix_vcvc.h:28
usrp_echotimer_cc.h