diff options
-rw-r--r-- | grc/blocks/Makefile.am | 2 | ||||
-rw-r--r-- | grc/blocks/blks2_cvsd_decode.xml | 32 | ||||
-rw-r--r-- | grc/blocks/blks2_cvsd_encode.xml | 32 | ||||
-rw-r--r-- | grc/blocks/block_tree.xml | 5 | ||||
-rw-r--r-- | grc/examples/Makefile.am | 3 | ||||
-rw-r--r-- | grc/examples/audio/cvsd_sweep.grc | 918 | ||||
-rwxr-xr-x | usrp2/firmware/configure.gnu | 6 | ||||
-rw-r--r-- | vrt/include/vrt/quadradio.h | 12 | ||||
-rw-r--r-- | vrt/lib/quadradio.cc | 20 |
9 files changed, 1016 insertions, 14 deletions
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index 32ddc6567..617a3bf60 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -30,6 +30,8 @@ dist_ourdata_DATA = \ band_reject_filter.xml \ blks2_am_demod_cf.xml \ blks2_analysis_filterbank.xml \ + blks2_cvsd_encode.xml \ + blks2_cvsd_decode.xml \ blks2_dxpsk_demod.xml \ blks2_dxpsk_mod.xml \ blks2_error_rate.xml \ diff --git a/grc/blocks/blks2_cvsd_decode.xml b/grc/blocks/blks2_cvsd_decode.xml new file mode 100644 index 000000000..6be7daa22 --- /dev/null +++ b/grc/blocks/blks2_cvsd_decode.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +## CVSD Encoder +################################################### + --> +<block> + <name>CVSD Decoder</name> + <key>blks2_cvsd_decode</key> + <import>from gnuradio import blks2</import> + <make>blks2.cvsd_decode($resample,$bw)</make> + <param> + <name>Resample</name> + <key>resample</key> + <value>8</value> + <type>int</type> + </param> + <param> + <name>Frac. Bandwidth</name> + <key>bw</key> + <value>0.5</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>byte</type> + </sink> + <source> + <name>out</name> + <type>float</type> + </source> +</block> diff --git a/grc/blocks/blks2_cvsd_encode.xml b/grc/blocks/blks2_cvsd_encode.xml new file mode 100644 index 000000000..3123b1aa9 --- /dev/null +++ b/grc/blocks/blks2_cvsd_encode.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- +################################################### +## CVSD Encoder +################################################### + --> +<block> + <name>CVSD Encoder</name> + <key>blks2_cvsd_encode</key> + <import>from gnuradio import blks2</import> + <make>blks2.cvsd_encode($resample,$bw)</make> + <param> + <name>Resample</name> + <key>resample</key> + <value>8</value> + <type>int</type> + </param> + <param> + <name>Frac. Bandwidth</name> + <key>bw</key> + <value>0.5</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>byte</type> + </source> +</block> diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 5a989cc01..296f0ee91 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -252,6 +252,11 @@ <block>gr_descrambler_bb</block> </cat> <cat> + <name>Vocoders</name> + <block>blks2_cvsd_encode</block> + <block>blks2_cvsd_decode</block> + </cat> + <cat> <name>Probes</name> <block>gr_probe_avg_mag_sqrd_x</block> <block>gr_probe_density_b</block> diff --git a/grc/examples/Makefile.am b/grc/examples/Makefile.am index 969485c0d..78321ce0a 100644 --- a/grc/examples/Makefile.am +++ b/grc/examples/Makefile.am @@ -25,7 +25,8 @@ grc_examples_prefix = $(exampledir)/grc audiodatadir = $(grc_examples_prefix)/audio dist_audiodata_DATA = \ - audio/dial_tone.grc + audio/dial_tone.grc \ + audio/cvsd_sweep.grc simpledatadir = $(grc_examples_prefix)/simple dist_simpledata_DATA = \ diff --git a/grc/examples/audio/cvsd_sweep.grc b/grc/examples/audio/cvsd_sweep.grc new file mode 100644 index 000000000..8d0b385ce --- /dev/null +++ b/grc/examples/audio/cvsd_sweep.grc @@ -0,0 +1,918 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Sat Sep 19 20:30:08 2009</timestamp> + <block> + <key>import</key> + <param> + <key>id</key> + <value>import_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>import</key> + <value>import math</value> + </param> + <param> + <key>_coordinate</key> + <value>(157, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_cvsd_decode</key> + <param> + <key>id</key> + <value>blks2_cvsd_decode_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>resample</key> + <value>resample</value> + </param> + <param> + <key>bw</key> + <value>bw</value> + </param> + <param> + <key>_coordinate</key> + <value>(887, 340)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sig_source_x</key> + <param> + <key>id</key> + <value>tri_source</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>waveform</key> + <value>gr.GR_TRI_WAVE</value> + </param> + <param> + <key>freq</key> + <value>0.05</value> + </param> + <param> + <key>amp</key> + <value>0.5</value> + </param> + <param> + <key>offset</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(44, 316)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>throttle</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>samples_per_second</key> + <value>audio_rate</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(238, 348)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_vco_f</key> + <param> + <key>id</key> + <value>vco</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>sensitivity</key> + <value>audio_rate*2*math.pi</value> + </param> + <param> + <key>amplitude</key> + <value>0.9</value> + </param> + <param> + <key>_coordinate</key> + <value>(427, 332)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>blks2_cvsd_encode</key> + <param> + <key>id</key> + <value>enc</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>resample</key> + <value>resample</value> + </param> + <param> + <key>bw</key> + <value>bw</value> + </param> + <param> + <key>_coordinate</key> + <value>(655, 340)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_packed_to_unpacked_xx</key> + <param> + <key>id</key> + <value>p2u</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>byte</value> + </param> + <param> + <key>bits_per_chunk</key> + <value>1</value> + </param> + <param> + <key>endianness</key> + <value>gr.GR_MSB_FIRST</value> + </param> + <param> + <key>_coordinate</key> + <value>(648, 415)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>gr_char_to_float</key> + <param> + <key>id</key> + <value>c2f</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(676, 483)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>audio_sink</key> + <param> + <key>id</key> + <value>audio_sink</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>device_name</key> + <value>plughw:0,0</value> + </param> + <param> + <key>ok_to_block</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(1127, 340)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>audio_rate</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>8000</value> + </param> + <param> + <key>_coordinate</key> + <value>(251, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>resample</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>8</value> + </param> + <param> + <key>_coordinate</key> + <value>(344, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>bw</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>0.5</value> + </param> + <param> + <key>_coordinate</key> + <value>(431, 11)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>notebook</key> + <param> + <key>id</key> + <value>displays</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>style</key> + <value>wx.NB_TOP</value> + </param> + <param> + <key>labels</key> + <value>['Original','Encoded','Decoded']</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(12, 106)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>orig_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Original Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 0</value> + </param> + <param> + <key>_coordinate</key> + <value>(415, 97)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>orig_scope</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Original Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 0</value> + </param> + <param> + <key>_coordinate</key> + <value>(414, 425)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>enc_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Encoded Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate*resample</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>10</value> + </param> + <param> + <key>y_divs</key> + <value>8</value> + </param> + <param> + <key>ref_level</key> + <value>10</value> + </param> + <param> + <key>ref_scale</key> + <value>2.0</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> + </param> + <param> + <key>_coordinate</key> + <value>(610, 551)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>enc_scope</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Encoded Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate*resample</value> + </param> + <param> + <key>v_scale</key> + <value>0.5</value> + </param> + <param> + <key>t_scale</key> + <value>20.0/(audio_rate*resample)</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 1</value> + </param> + <param> + <key>_coordinate</key> + <value>(858, 591)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_fftsink2</key> + <param> + <key>id</key> + <value>dec_fft</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Decoded Spectrum</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>baseband_freq</key> + <value>0</value> + </param> + <param> + <key>y_per_div</key> + <value>5</value> + </param> + <param> + <key>y_divs</key> + <value>10</value> + </param> + <param> + <key>ref_level</key> + <value>10</value> + </param> + <param> + <key>ref_scale</key> + <value>0.1</value> + </param> + <param> + <key>fft_size</key> + <value>1024</value> + </param> + <param> + <key>fft_rate</key> + <value>30</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>False</value> + </param> + <param> + <key>avg_alpha</key> + <value>0</value> + </param> + <param> + <key>grid_pos</key> + <value>0, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 2</value> + </param> + <param> + <key>_coordinate</key> + <value>(891, 98)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>dec_scope</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Decoded Waveform</value> + </param> + <param> + <key>samp_rate</key> + <value>audio_rate</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>grid_pos</key> + <value>1, 0, 1, 1</value> + </param> + <param> + <key>notebook</key> + <value>displays, 2</value> + </param> + <param> + <key>_coordinate</key> + <value>(889, 422)</value> + </param> + <param> + <key>_rotation</key> + <value>180</value> + </param> + </block> + <block> + <key>options</key> + <param> + <key>id</key> + <value>cvsd_sweep</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>CVSD Vocoder Test</value> + </param> + <param> + <key>author</key> + <value></value> + </param> + <param> + <key>description</key> + <value></value> + </param> + <param> + <key>window_size</key> + <value>1280, 1024</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>vco</source_block_id> + <sink_block_id>orig_fft</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>tri_source</source_block_id> + <sink_block_id>throttle</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>throttle</source_block_id> + <sink_block_id>vco</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>vco</source_block_id> + <sink_block_id>enc</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>enc</source_block_id> + <sink_block_id>blks2_cvsd_decode_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>vco</source_block_id> + <sink_block_id>orig_scope</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>blks2_cvsd_decode_0</source_block_id> + <sink_block_id>dec_fft</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>blks2_cvsd_decode_0</source_block_id> + <sink_block_id>dec_scope</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>blks2_cvsd_decode_0</source_block_id> + <sink_block_id>audio_sink</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>enc</source_block_id> + <sink_block_id>p2u</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>p2u</source_block_id> + <sink_block_id>c2f</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>c2f</source_block_id> + <sink_block_id>enc_fft</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>c2f</source_block_id> + <sink_block_id>enc_scope</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> +</flow_graph> diff --git a/usrp2/firmware/configure.gnu b/usrp2/firmware/configure.gnu index 60d6d2a7e..53ca9b518 100755 --- a/usrp2/firmware/configure.gnu +++ b/usrp2/firmware/configure.gnu @@ -3,7 +3,7 @@ # wrapper to setup cross-compilation of firmware # -for v in CC CPP CXX AS AR NM RANLIB STRIP F77 CFLAGS CXXFLAGS CPPFLAGS LDFLAGS +for v in CC CPP CXX AS AR NM RANLIB STRIP F77 CFLAGS CXXFLAGS CPPFLAGS LDFLAGS CCAS CCASFLAGS USB_LIBS USB_CFLAGS do unset $v done @@ -26,6 +26,10 @@ do (CXXFLAGS=*) ;; (CPPFLAGS=*) ;; (LDFLAGS=*) ;; + (CCAS=*) ;; + (CCASFLAGS=*) ;; + (USB_CFLAGS=*) ;; + (USB_LIBS=*) ;; (*) args="$args $t" ;; esac done diff --git a/vrt/include/vrt/quadradio.h b/vrt/include/vrt/quadradio.h index 83323f093..d30ee14f1 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 8cf542e0f..a8bc3e525 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 |