summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blossom <eb@comsec.com>2009-09-17 22:51:03 -0700
committerEric Blossom <eb@comsec.com>2009-09-17 22:51:03 -0700
commitcc5657e25f8e8f364cb6553e9eb8289cc0aca027 (patch)
tree34d3b46f0561676c30231f240be98755aca48823
parentf7d6badfb78b5820ae7c2169a88cdbb56b5cd778 (diff)
Add rxdspno parameter to private interface of quadradio.
This allows control of each Rx DSP pipeline independent of each other. The public interface remains unchanged, but should have the rxdspno parameter added as indicated in the FIXMEs. When that is done, the gr-vrt interface (and any code using it) will need to be updated too.
-rw-r--r--vrt/include/vrt/quadradio.h12
-rw-r--r--vrt/lib/quadradio.cc20
2 files changed, 20 insertions, 12 deletions
diff --git a/vrt/include/vrt/quadradio.h b/vrt/include/vrt/quadradio.h
index 83323f0935..d30ee14f12 100644
--- a/vrt/include/vrt/quadradio.h
+++ b/vrt/include/vrt/quadradio.h
@@ -72,12 +72,14 @@ namespace vrt {
int *ctrl_fd_ptr, struct in_addr *ctrl_port_inaddr,
int *data_fd_ptr, int *data_port_ptr);
+ // dsprxno selects the Rx DSP pipe (0 or 1) to configure
static bool
- send_rx_command(int ctrl_fd, bool start,
- struct in_addr addr, int data_port, int samples_per_pkt, int siggen_param);
+ send_rx_command(int ctrl_fd, int rxdspno, bool start,
+ struct in_addr addr, int data_port, int samples_per_pkt);
+ // dsprxno selects the Rx DSP pipe (0 or 1) to stop
static bool
- send_stop_rx_command(int ctrl_fd);
+ send_stop_rx_command(int ctrl_fd, int rxdspno);
static int control_port() { return 790; }
int data_socket_fd() const { return d_data_fd; }
@@ -94,9 +96,11 @@ namespace vrt {
vrt::rx::sptr vrt_rx() const { return d_rx; }
+ // FIXME add rxdspno as the first parameter
bool start_streaming(int samples_per_pkt = 0);
- bool stop_streaming();
+ // FIXME add rxdspno as the first parameter
+ bool stop_streaming();
/* convenience methods that ultimately write the dboard pins */
bool set_center_freq(double target_freq);
diff --git a/vrt/lib/quadradio.cc b/vrt/lib/quadradio.cc
index 8cf542e0f3..a8bc3e525b 100644
--- a/vrt/lib/quadradio.cc
+++ b/vrt/lib/quadradio.cc
@@ -76,14 +76,18 @@ vrt::quadradio::open(const char *ip)
bool
vrt::quadradio::start_streaming(int samples_per_pkt)
{
- return send_rx_command(d_ctrl_fd, true, d_ctrl_port_inaddr,
- d_data_port, samples_per_pkt, 0);
+ int rxdspno = 0; // FIXME make it the first param
+
+ return send_rx_command(d_ctrl_fd, rxdspno, true, d_ctrl_port_inaddr,
+ d_data_port, samples_per_pkt);
}
bool
vrt::quadradio::stop_streaming()
{
- return send_stop_rx_command(d_ctrl_fd);
+ int rxdspno = 0; // FIXME make it the first param
+
+ return send_stop_rx_command(d_ctrl_fd, rxdspno);
}
bool
@@ -288,9 +292,9 @@ vrt::quadradio::open_sockets(const char *quad_radio_ip, int quad_radio_ctrl_port
// ------------------------------------------------------------------------
bool
-vrt::quadradio::send_rx_command(int ctrl_fd, bool start,
+vrt::quadradio::send_rx_command(int ctrl_fd, int rxdspno, bool start,
struct in_addr addr, int data_port,
- int samples_per_pkt, int siggen_param)
+ int samples_per_pkt)
{
uint32_t cmd[7];
cmd[0] = htonl(0); // verb: set
@@ -299,17 +303,17 @@ vrt::quadradio::send_rx_command(int ctrl_fd, bool start,
cmd[3] = addr.s_addr; // ip address to send data to (already network endian)
cmd[4] = htonl(data_port); // port to send data to
cmd[5] = htonl(samples_per_pkt);
- cmd[6] = htonl(siggen_param);
+ cmd[6] = htonl(rxdspno); // the DSP pipeline to configure
return send_and_check(ctrl_fd, cmd, sizeof(cmd));
}
bool
-vrt::quadradio::send_stop_rx_command(int ctrl_fd)
+vrt::quadradio::send_stop_rx_command(int ctrl_fd, int rxdspno)
{
struct in_addr in_addr;
in_addr.s_addr = 0;
- return send_rx_command(ctrl_fd, false, in_addr, 0, 0, 0);
+ return send_rx_command(ctrl_fd, rxdspno, false, in_addr, 0, 0);
}
bool