diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2017-09-24 12:16:22 +0200 |
---|---|---|
committer | Håkon Vågsether <haakonsv@gmail.com> | 2017-10-10 10:49:36 +0200 |
commit | baf7eaf8f29d5a490f2580917362cf5b3db47281 (patch) | |
tree | 7afab4ee2dfa6439ecf95d47aa68996020ea04c5 /gr-blocks/grc | |
parent | 6fa9d33246251f44a0e78682e50e9a1cb0b03171 (diff) |
Added auto-generated YAML blocks
Diffstat (limited to 'gr-blocks/grc')
273 files changed, 5202 insertions, 7782 deletions
diff --git a/gr-blocks/grc/CMakeLists.txt b/gr-blocks/grc/CMakeLists.txt index 2dd1481a47..3d0e5d81a0 100644 --- a/gr-blocks/grc/CMakeLists.txt +++ b/gr-blocks/grc/CMakeLists.txt @@ -18,14 +18,14 @@ # Boston, MA 02110-1301, USA. ######################################################################## -file(GLOB xml_files "*.xml") +file(GLOB yml_files "*.yml") # Force out the controlport GRC blocks if we've disabled it. if(NOT ENABLE_GR_CTRLPORT) - list(REMOVE_ITEM xml_files - ${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe_c.xml - ${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe2_c.xml + list(REMOVE_ITEM yml_files + ${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe_c.block.yml + ${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe2_c.block.yml ) endif(NOT ENABLE_GR_CTRLPORT) -install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR}) +install(FILES ${yml_files} DESTINATION ${GRC_BLOCKS_DIR}) diff --git a/gr-blocks/grc/blocks.tree.yml b/gr-blocks/grc/blocks.tree.yml new file mode 100644 index 0000000000..ebe509ddc4 --- /dev/null +++ b/gr-blocks/grc/blocks.tree.yml @@ -0,0 +1,171 @@ +'[Core]': +- Audio: + - blocks_wavfile_source + - blocks_wavfile_sink +- Boolean Operators: + - blocks_and_xx + - blocks_and_const_xx + - blocks_not_xx + - blocks_or_xx + - blocks_xor_xx +- Byte Operators: + - blocks_packed_to_unpacked_xx + - blocks_unpacked_to_packed_xx + - blocks_pack_k_bits_bb + - blocks_unpack_k_bits_bb + - blocks_repack_bits_bb +- Control Port: + - blocks_ctrlport_monitor + - blocks_ctrlport_monitor_performance + - blocks_ctrlport_probe2_x + - blocks_ctrlport_probe2_c + - blocks_ctrlport_probe_c +- Debug Tools: + - blocks_vector_sink_x + - blocks_tag_debug + - blocks_message_debug + - blocks_random_pdu + - blocks_message_strobe + - blocks_message_strobe_random + - blocks_tags_strobe + - blocks_test_tag_variable_rate_ff +- File Operators: + - blocks_wavfile_source + - blocks_wavfile_sink + - blocks_file_source + - blocks_file_sink + - blocks_file_descriptor_source + - blocks_file_descriptor_sink + - blocks_file_meta_source + - blocks_file_meta_sink + - blocks_tagged_file_sink +- Level Controllers: + - blocks_mute_xx + - blocks_sample_and_hold_xx + - blocks_moving_average_xx + - blocks_threshold_ff +- Math Operators: + - blocks_abs_xx + - blocks_add_xx + - blocks_add_const_vxx + - blocks_divide_xx + - blocks_exponentiate_const_cci + - blocks_multiply_xx + - blocks_multiply_const_xx + - blocks_multiply_const_vxx + - blocks_multiply_conjugate_cc + - blocks_multiply_matrix_xx + - blocks_multiply_by_tag_value_cc + - blocks_sub_xx + - blocks_conjugate_cc + - blocks_integrate_xx + - blocks_nlog10_ff + - blocks_rms_xx + - blocks_rotator_cc + - blocks_transcendental + - blocks_argmax_xx + - blocks_max_xx + - blocks_min_xx +- Measurement Tools: + - blocks_message_debug + - blocks_tag_debug + - blocks_probe_signal_x + - blocks_probe_signal_vx + - blocks_probe_rate + - blocks_ctrlport_probe2_c + - blocks_ctrlport_probe_c +- Message Tools: + - blocks_message_strobe + - blocks_message_strobe_random + - blocks_message_debug + - blocks_pdu_filter + - blocks_pdu_remove + - blocks_pdu_set + - blocks_pdu_to_tagged_stream + - blocks_tagged_stream_multiply_length + - blocks_tagged_stream_to_pdu + - blocks_random_pdu +- Misc: + - blocks_throttle + - blocks_vector_source_x + - blocks_head + - blocks_skiphead + - blocks_delay + - blocks_null_source + - blocks_null_sink + - blocks_copy + - blocks_nop + - xmlrpc_server + - xmlrpc_client +- Modulators: + - blocks_vco_f + - blocks_vco_c +- Networking Tools: + - blocks_tuntap_pdu + - blocks_socket_pdu + - blocks_tcp_server_sink + - blocks_udp_source + - blocks_udp_sink +- Peak Detectors: + - blocks_burst_tagger + - blocks_peak_detector_xb + - blocks_peak_detector2_fb + - blocks_plateau_detector_fb +- Stream Operators: + - blocks_deinterleave + - blocks_interleave + - blocks_keep_m_in_n + - blocks_keep_one_in_n + - blocks_stream_mux + - blocks_stream_to_streams + - blocks_stream_to_vector + - blocks_streams_to_stream + - blocks_streams_to_vector + - blocks_stream_to_vector_decimator + - blocks_vector_to_stream + - blocks_vector_to_streams + - blocks_patterned_interleaver + - blocks_endian_swap + - blocks_vector_insert_x + - blocks_tagged_stream_mux + - blocks_repeat + - blocks_regenerate_bb + - blocks_stretch_ff +- Stream Tag Tools: + - blocks_tag_debug + - blocks_tag_gate + - blocks_tag_share + - blocks_tagged_file_sink + - blocks_tagged_stream_mux + - blocks_tagged_stream_align + - blocks_stream_to_tagged_stream + - blocks_test_tag_variable_rate_ff +- Type Converters: + - blocks_char_to_float + - blocks_char_to_short + - blocks_complex_to_interleaved_char + - blocks_complex_to_interleaved_short + - blocks_complex_to_float + - blocks_complex_to_magphase + - blocks_complex_to_imag + - blocks_complex_to_real + - blocks_complex_to_mag + - blocks_complex_to_mag_squared + - blocks_complex_to_arg + - blocks_float_to_char + - blocks_float_to_complex + - blocks_magphase_to_complex + - blocks_float_to_int + - blocks_float_to_short + - blocks_float_to_uchar + - blocks_int_to_float + - blocks_interleaved_short_to_complex + - blocks_interleaved_char_to_complex + - blocks_short_to_char + - blocks_short_to_float + - blocks_uchar_to_float +- Waveform Generators: + - blocks_vco_f + - blocks_vco_c +- Variables: + - variable_tag_object diff --git a/gr-blocks/grc/blocks_abs_xx.block.yml b/gr-blocks/grc/blocks_abs_xx.block.yml new file mode 100644 index 0000000000..12d9a8fc3a --- /dev/null +++ b/gr-blocks/grc/blocks_abs_xx.block.yml @@ -0,0 +1,32 @@ +id: blocks_abs_xx +label: Abs + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: type + label: IO Type + dtype: enum + options: [int, short, float] + option_attributes: + fcn: [ii, ss, ff] + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.abs_${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_abs_xx.xml b/gr-blocks/grc/blocks_abs_xx.xml deleted file mode 100644 index 77298716c8..0000000000 --- a/gr-blocks/grc/blocks_abs_xx.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Abs Block -################################################### - --> -<block> - <name>Abs</name> - <key>blocks_abs_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.abs_$(type.fcn)($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_add_const_vxx.block.yml b/gr-blocks/grc/blocks_add_const_vxx.block.yml new file mode 100644 index 0000000000..b95065cdba --- /dev/null +++ b/gr-blocks/grc/blocks_add_const_vxx.block.yml @@ -0,0 +1,43 @@ +id: blocks_add_const_vxx +label: Add Const + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + const_type: [complex_vector, real_vector, int_vector, int_vector] + fcn: [cc, ff, ii, ss] + hide: part +- id: const + label: Constant + dtype: ${ type.const_type } + default: '0' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ len(const) == vlen } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.add_const_v${type.fcn}(${const}) + callbacks: + - set_k(${const}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_add_const_vxx.xml b/gr-blocks/grc/blocks_add_const_vxx.xml deleted file mode 100644 index 96303acef1..0000000000 --- a/gr-blocks/grc/blocks_add_const_vxx.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Add Const Block: -## all types, 1 output, 1 input & const -################################################### - --> -<block> - <name>Add Const</name> - <key>blocks_add_const_vxx</key> - <import>from gnuradio import blocks</import> - <make>blocks.add_const_v$(type.fcn)($const)</make> - <callback>set_k($const)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>const_type:complex_vector</opt> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>const_type:real_vector</opt> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>const_type:int_vector</opt> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>const_type:int_vector</opt> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Constant</name> - <key>const</key> - <value>0</value> - <type>$type.const_type</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>len($const) == $vlen</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_add_xx.block.yml b/gr-blocks/grc/blocks_add_xx.block.yml new file mode 100644 index 0000000000..38df37a65b --- /dev/null +++ b/gr-blocks/grc/blocks_add_xx.block.yml @@ -0,0 +1,42 @@ +id: blocks_add_xx +label: Add + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_inputs > 1 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.add_v${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_add_xx.xml b/gr-blocks/grc/blocks_add_xx.xml deleted file mode 100644 index 951dff5e5b..0000000000 --- a/gr-blocks/grc/blocks_add_xx.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Add Block: -## all types, 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Add</name> - <key>blocks_add_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.add_v$(type.fcn)($vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs > 1</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_and_const_xx.block.yml b/gr-blocks/grc/blocks_and_const_xx.block.yml new file mode 100644 index 0000000000..459527260c --- /dev/null +++ b/gr-blocks/grc/blocks_and_const_xx.block.yml @@ -0,0 +1,31 @@ +id: blocks_and_const_xx +label: And Const + +parameters: +- id: type + label: IO Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: const + label: Constant + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.and_const_${type.fcn}(${const}) + callbacks: + - set_k(${const}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_and_const_xx.xml b/gr-blocks/grc/blocks_and_const_xx.xml deleted file mode 100644 index d0abbfe51b..0000000000 --- a/gr-blocks/grc/blocks_and_const_xx.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## And Const Block: -## all types, 1 output, 1 input & const -################################################### - --> -<block> - <name>And Const</name> - <key>blocks_and_const_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.and_const_$(type.fcn)($const)</make> - <callback>set_k($const)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Constant</name> - <key>const</key> - <value>0</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_and_xx.block.yml b/gr-blocks/grc/blocks_and_xx.block.yml new file mode 100644 index 0000000000..a8bba020a5 --- /dev/null +++ b/gr-blocks/grc/blocks_and_xx.block.yml @@ -0,0 +1,34 @@ +id: blocks_and_xx +label: And + +parameters: +- id: type + label: IO Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + +asserts: +- ${ num_inputs >= 2 } + +templates: + imports: from gnuradio import blocks + make: blocks.and_${type.fcn}() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_and_xx.xml b/gr-blocks/grc/blocks_and_xx.xml deleted file mode 100644 index 317a0f6457..0000000000 --- a/gr-blocks/grc/blocks_and_xx.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Logical And Block -################################################### - --> -<block> - <name>And</name> - <key>blocks_and_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.and_$(type.fcn)()</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <check>$num_inputs >= 2</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_argmax_xx.block.yml b/gr-blocks/grc/blocks_argmax_xx.block.yml new file mode 100644 index 0000000000..723f3fed6a --- /dev/null +++ b/gr-blocks/grc/blocks_argmax_xx.block.yml @@ -0,0 +1,45 @@ +id: blocks_argmax_xx +label: Argmax + +parameters: +- id: type + label: IO Type + dtype: enum + options: [float, int, short] + option_attributes: + fcn: [fs, is, dd] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- label: max_vec + domain: stream + dtype: short +- label: max_inp + domain: stream + dtype: short + +asserts: +- ${ num_inputs >= 1 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.argmax_${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_argmax_xx.xml b/gr-blocks/grc/blocks_argmax_xx.xml deleted file mode 100644 index 7adfa75973..0000000000 --- a/gr-blocks/grc/blocks_argmax_xx.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##ArgMax: -## 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Argmax</name> - <key>blocks_argmax_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.argmax_$(type.fcn)($vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:fs</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:is</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:dd</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs >= 1</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>max_vec</name> - <type>short</type> - </source> - <source> - <name>max_inp</name> - <type>short</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml deleted file mode 100644 index ef2703f695..0000000000 --- a/gr-blocks/grc/blocks_block_tree.xml +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012,2013 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<!-- -################################################### -##Block Tree for gr-blocks. -################################################### - --> -<cat> - <name>[Core]</name> - <cat> - <name>Audio</name> - <block>blocks_wavfile_source</block> - <block>blocks_wavfile_sink</block> - </cat> - <cat> - <name>Boolean Operators</name> - <block>blocks_and_xx</block> - <block>blocks_and_const_xx</block> - <block>blocks_not_xx</block> - <block>blocks_or_xx</block> - <block>blocks_xor_xx</block> - </cat> - <cat> - <name>Byte Operators</name> - <block>blocks_packed_to_unpacked_xx</block> - <block>blocks_unpacked_to_packed_xx</block> - <block>blocks_pack_k_bits_bb</block> - <block>blocks_unpack_k_bits_bb</block> - <block>blocks_repack_bits_bb</block> - </cat> - <cat> - <name>Control Port</name> - <block>blocks_ctrlport_monitor</block> - <block>blocks_ctrlport_monitor_performance</block> - <block>blocks_ctrlport_probe2_x</block> - <block>blocks_ctrlport_probe2_c</block> - <block>blocks_ctrlport_probe_c</block> - </cat> - <cat> - <name>Debug Tools</name> - <block>blocks_vector_sink_x</block> - <block>blocks_tag_debug</block> - <block>blocks_message_debug</block> - <block>blocks_random_pdu</block> - <block>blocks_message_strobe</block> - <block>blocks_message_strobe_random</block> - <block>blocks_tags_strobe</block> - <block>blocks_test_tag_variable_rate_ff</block> - </cat> - <cat> - <name>File Operators</name> - <block>blocks_wavfile_source</block> - <block>blocks_wavfile_sink</block> - <block>blocks_file_source</block> - <block>blocks_file_sink</block> - <block>blocks_file_descriptor_source</block> - <block>blocks_file_descriptor_sink</block> - <block>blocks_file_meta_source</block> - <block>blocks_file_meta_sink</block> - <block>blocks_tagged_file_sink</block> - </cat> - <cat> - <name>Level Controllers</name> - <block>blocks_mute_xx</block> - <block>blocks_sample_and_hold_xx</block> - <block>blocks_moving_average_xx</block> - <block>blocks_threshold_ff</block> - </cat> - <cat> - <name>Math Operators</name> - <block>blocks_abs_xx</block> - <block>blocks_add_xx</block> - <block>blocks_add_const_vxx</block> - <block>blocks_divide_xx</block> - <block>blocks_exponentiate_const_cci</block> - <block>blocks_multiply_xx</block> - <block>blocks_multiply_const_xx</block> - <block>blocks_multiply_const_vxx</block> - <block>blocks_multiply_conjugate_cc</block> - <block>blocks_multiply_matrix_xx</block> - <block>blocks_multiply_by_tag_value_cc</block> - <block>blocks_sub_xx</block> - <block>blocks_conjugate_cc</block> - <block>blocks_integrate_xx</block> - <block>blocks_nlog10_ff</block> - <block>blocks_rms_xx</block> - <block>blocks_rotator_cc</block> - <block>blocks_transcendental</block> - <block>blocks_argmax_xx</block> - <block>blocks_max_xx</block> - <block>blocks_min_xx</block> - </cat> - <cat> - <name>Measurement Tools</name> - <block>blocks_message_debug</block> - <block>blocks_tag_debug</block> - <block>blocks_probe_signal_x</block> - <block>blocks_probe_signal_vx</block> - <block>blocks_probe_rate</block> - <block>blocks_ctrlport_probe2_c</block> - <block>blocks_ctrlport_probe_c</block> - </cat> - <cat> - <name>Message Tools</name> - <block>blocks_message_strobe</block> - <block>blocks_message_strobe_random</block> - <block>blocks_message_debug</block> - <block>blocks_pdu_filter</block> - <block>blocks_pdu_remove</block> - <block>blocks_pdu_set</block> - <block>blocks_pdu_to_tagged_stream</block> - <block>blocks_tagged_stream_multiply_length</block> - <block>blocks_tagged_stream_to_pdu</block> - <block>blocks_random_pdu</block> - </cat> - <cat> - <name>Misc</name> - <block>blocks_throttle</block> - <block>blocks_vector_source_x</block> - <block>blocks_head</block> - <block>blocks_skiphead</block> - <block>blocks_delay</block> - <block>blocks_null_source</block> - <block>blocks_null_sink</block> - <block>blocks_copy</block> - <block>blocks_nop</block> - <block>xmlrpc_server</block> - <block>xmlrpc_client</block> - </cat> - <cat> - <name>Modulators</name> - <block>blocks_vco_f</block> - <block>blocks_vco_c</block> - </cat> - <cat> - <name>Networking Tools</name> - <block>blocks_tuntap_pdu</block> - <block>blocks_socket_pdu</block> - <block>blocks_tcp_server_sink</block> - <block>blocks_udp_source</block> - <block>blocks_udp_sink</block> - </cat> - <cat> - <name>Peak Detectors</name> - <block>blocks_burst_tagger</block> - <block>blocks_peak_detector_xb</block> - <block>blocks_peak_detector2_fb</block> - <block>blocks_plateau_detector_fb</block> - </cat> - <cat> - <name>Stream Operators</name> - <block>blocks_deinterleave</block> - <block>blocks_interleave</block> - <block>blocks_keep_m_in_n</block> - <block>blocks_keep_one_in_n</block> - <block>blocks_stream_mux</block> - <block>blocks_stream_to_streams</block> - <block>blocks_stream_to_vector</block> - <block>blocks_streams_to_stream</block> - <block>blocks_streams_to_vector</block> - <block>blocks_stream_to_vector_decimator</block> - <block>blocks_vector_to_stream</block> - <block>blocks_vector_to_streams</block> - <block>blocks_patterned_interleaver</block> - <block>blocks_endian_swap</block> - <block>blocks_vector_insert_x</block> - <block>blocks_tagged_stream_mux</block> - <block>blocks_repeat</block> - <block>blocks_regenerate_bb</block> - <block>blocks_stretch_ff</block> - </cat> - <cat> - <name>Stream Tag Tools</name> - <block>blocks_tag_debug</block> - <block>blocks_tag_gate</block> - <block>blocks_tag_share</block> - <block>blocks_tagged_file_sink</block> - <block>blocks_tagged_stream_mux</block> - <block>blocks_tagged_stream_align</block> - <block>blocks_stream_to_tagged_stream</block> - <block>blocks_test_tag_variable_rate_ff</block> - </cat> - <cat> - <name>Type Converters</name> - <block>blocks_char_to_float</block> - <block>blocks_char_to_short</block> - <block>blocks_complex_to_interleaved_char</block> - <block>blocks_complex_to_interleaved_short</block> - <block>blocks_complex_to_float</block> - <block>blocks_complex_to_magphase</block> - <block>blocks_complex_to_imag</block> - <block>blocks_complex_to_real</block> - <block>blocks_complex_to_mag</block> - <block>blocks_complex_to_mag_squared</block> - <block>blocks_complex_to_arg</block> - <block>blocks_float_to_char</block> - <block>blocks_float_to_complex</block> - <block>blocks_magphase_to_complex</block> - <block>blocks_float_to_int</block> - <block>blocks_float_to_short</block> - <block>blocks_float_to_uchar</block> - <block>blocks_int_to_float</block> - <block>blocks_interleaved_short_to_complex</block> - <block>blocks_interleaved_char_to_complex</block> - <block>blocks_short_to_char</block> - <block>blocks_short_to_float</block> - <block>blocks_uchar_to_float</block> - </cat> - <cat> - <name>Waveform Generators</name> - <block>blocks_vco_f</block> - <block>blocks_vco_c</block> - </cat> - <cat> - <name>Variables</name> - <block>variable_tag_object</block> - </cat> -</cat> diff --git a/gr-blocks/grc/blocks_burst_tagger.block.yml b/gr-blocks/grc/blocks_burst_tagger.block.yml new file mode 100644 index 0000000000..d2c4882e30 --- /dev/null +++ b/gr-blocks/grc/blocks_burst_tagger.block.yml @@ -0,0 +1,52 @@ +id: blocks_burst_tagger +label: Burst Tagger + +parameters: +- id: type + label: Stream Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: true_key + label: True KeyID + dtype: string + default: burst +- id: true_value + label: True Value + dtype: bool + default: 'True' +- id: false_key + label: False KeyID + dtype: string + default: burst +- id: false_value + label: False Value + dtype: bool + default: 'False' + +inputs: +- domain: stream + dtype: ${ type } + vlen: 1 +- label: trigger + domain: stream + dtype: short + vlen: 1 + +outputs: +- domain: stream + dtype: ${ type } + vlen: 1 + +templates: + imports: from gnuradio import blocks + make: "blocks.burst_tagger(${type.size})\nself.${id}.set_true_tag(${true_key},${true_value})\n\ + self.${id}.set_false_tag(${false_key},${false_value})\n\t" + callbacks: + - set_true_tag(${true_key},${true_value}) + - set_false_tag(${false_key},${false_value}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_burst_tagger.xml b/gr-blocks/grc/blocks_burst_tagger.xml deleted file mode 100644 index f603b53489..0000000000 --- a/gr-blocks/grc/blocks_burst_tagger.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Burst tagger: -## all types, 1 output, 2 input: stream & trigger (short) -################################################### - --> -<block> - <name>Burst Tagger</name> - <key>blocks_burst_tagger</key> - <import>from gnuradio import blocks</import> - <make>blocks.burst_tagger($type.size) -self.$(id).set_true_tag($true_key,$true_value) -self.$(id).set_false_tag($false_key,$false_value) - </make> - <callback>set_true_tag($true_key,$true_value)</callback> - <callback>set_false_tag($false_key,$false_value)</callback> - <param> - <name>Stream Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>True KeyID</name> - <key>true_key</key> - <value>burst</value> - <type>string</type> - </param> - <param> - <name>True Value</name> - <key>true_value</key> - <value>True</value> - <type>bool</type> - </param> - <param> - <name>False KeyID</name> - <key>false_key</key> - <value>burst</value> - <type>string</type> - </param> - <param> - <name>False Value</name> - <key>false_value</key> - <value>False</value> - <type>bool</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>1</vlen> - </sink> - <sink> - <name>trigger</name> - <type>short</type> - <vlen>1</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>1</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_char_to_float.block.yml b/gr-blocks/grc/blocks_char_to_float.block.yml new file mode 100644 index 0000000000..c0858b5c1d --- /dev/null +++ b/gr-blocks/grc/blocks_char_to_float.block.yml @@ -0,0 +1,31 @@ +id: blocks_char_to_float +label: Char To Float + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: byte + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.char_to_float(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_char_to_float.xml b/gr-blocks/grc/blocks_char_to_float.xml deleted file mode 100644 index 5d367d719d..0000000000 --- a/gr-blocks/grc/blocks_char_to_float.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Char to Float: -################################################### - --> -<block> - <name>Char To Float</name> - <key>blocks_char_to_float</key> - <import>from gnuradio import blocks</import> - <make>blocks.char_to_float($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_char_to_short.block.yml b/gr-blocks/grc/blocks_char_to_short.block.yml new file mode 100644 index 0000000000..f378e87e72 --- /dev/null +++ b/gr-blocks/grc/blocks_char_to_short.block.yml @@ -0,0 +1,25 @@ +id: blocks_char_to_short +label: Char To Short + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: byte + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: short + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.char_to_short(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_char_to_short.xml b/gr-blocks/grc/blocks_char_to_short.xml deleted file mode 100644 index b19fdb46ae..0000000000 --- a/gr-blocks/grc/blocks_char_to_short.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Char to Short: -################################################### - --> -<block> - <name>Char To Short</name> - <key>blocks_char_to_short</key> - <import>from gnuradio import blocks</import> - <make>blocks.char_to_short($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>short</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_arg.block.yml b/gr-blocks/grc/blocks_complex_to_arg.block.yml new file mode 100644 index 0000000000..4f44e4ae2c --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_arg.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_arg +label: Complex to Arg + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_arg(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_arg.xml b/gr-blocks/grc/blocks_complex_to_arg.xml deleted file mode 100644 index 83140501d2..0000000000 --- a/gr-blocks/grc/blocks_complex_to_arg.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Arg -################################################### - --> -<block> - <name>Complex to Arg</name> - <key>blocks_complex_to_arg</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_arg($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_float.block.yml b/gr-blocks/grc/blocks_complex_to_float.block.yml new file mode 100644 index 0000000000..f7b35936c3 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_float.block.yml @@ -0,0 +1,34 @@ +id: blocks_complex_to_float +label: Complex To Float + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- label: re + domain: stream + dtype: float + vlen: ${ vlen } +- label: im + domain: stream + dtype: float + vlen: ${ vlen } + optional: true + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_float(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_float.xml b/gr-blocks/grc/blocks_complex_to_float.xml deleted file mode 100644 index 7acf3fccb1..0000000000 --- a/gr-blocks/grc/blocks_complex_to_float.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Float: -## one or two output streams -################################################### - --> -<block> - <name>Complex To Float</name> - <key>blocks_complex_to_float</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_float($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>re</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> - <source> - <name>im</name> - <type>float</type> - <vlen>$vlen</vlen> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_imag.block.yml b/gr-blocks/grc/blocks_complex_to_imag.block.yml new file mode 100644 index 0000000000..29e14046aa --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_imag.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_imag +label: Complex to Imag + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_imag(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_imag.xml b/gr-blocks/grc/blocks_complex_to_imag.xml deleted file mode 100644 index cb2c2019ff..0000000000 --- a/gr-blocks/grc/blocks_complex_to_imag.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Imaginary -################################################### - --> -<block> - <name>Complex to Imag</name> - <key>blocks_complex_to_imag</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_imag($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_interleaved_char.block.yml b/gr-blocks/grc/blocks_complex_to_interleaved_char.block.yml new file mode 100644 index 0000000000..06a75fc8d9 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_interleaved_char.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_interleaved_char +label: Complex To IChar + +parameters: +- id: vector_output + label: Vector Output + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + option_attributes: + vlen: ['1', '2'] + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: byte + vlen: ${ vector_output.vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_interleaved_char(${vector_output}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_interleaved_char.xml b/gr-blocks/grc/blocks_complex_to_interleaved_char.xml deleted file mode 100644 index 5631f242ca..0000000000 --- a/gr-blocks/grc/blocks_complex_to_interleaved_char.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Interleaved Char: -################################################### - --> -<block> - <name>Complex To IChar</name> - <key>blocks_complex_to_interleaved_char</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_interleaved_char($vector_output)</make> - <param> - <name>Vector Output</name> - <key>vector_output</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - <opt>vlen:1</opt> - </option> - <option> - <name>Yes</name> - <key>True</key> - <opt>vlen:2</opt> - </option> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - <vlen>$vector_output.vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_interleaved_short.block.yml b/gr-blocks/grc/blocks_complex_to_interleaved_short.block.yml new file mode 100644 index 0000000000..0b8aa53621 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_interleaved_short.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_interleaved_short +label: Complex To IShort + +parameters: +- id: vector_output + label: Vector Output + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + option_attributes: + vlen: ['1', '2'] + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: short + vlen: ${ vector_output.vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_interleaved_short(${vector_output}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_interleaved_short.xml b/gr-blocks/grc/blocks_complex_to_interleaved_short.xml deleted file mode 100644 index 7f69d6b036..0000000000 --- a/gr-blocks/grc/blocks_complex_to_interleaved_short.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Interleaved Short: -################################################### - --> -<block> - <name>Complex To IShort</name> - <key>blocks_complex_to_interleaved_short</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_interleaved_short($vector_output)</make> - <param> - <name>Vector Output</name> - <key>vector_output</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - <opt>vlen:1</opt> - </option> - <option> - <name>Yes</name> - <key>True</key> - <opt>vlen:2</opt> - </option> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>short</type> - <vlen>$vector_output.vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_mag.block.yml b/gr-blocks/grc/blocks_complex_to_mag.block.yml new file mode 100644 index 0000000000..d9582d1722 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_mag.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_mag +label: Complex to Mag + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_mag(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_mag.xml b/gr-blocks/grc/blocks_complex_to_mag.xml deleted file mode 100644 index 2aa4faee71..0000000000 --- a/gr-blocks/grc/blocks_complex_to_mag.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Magnitude -################################################### - --> -<block> - <name>Complex to Mag</name> - <key>blocks_complex_to_mag</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_mag($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_mag_squared.block.yml b/gr-blocks/grc/blocks_complex_to_mag_squared.block.yml new file mode 100644 index 0000000000..815636d654 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_mag_squared.block.yml @@ -0,0 +1,28 @@ +id: blocks_complex_to_mag_squared +label: Complex to Mag^2 + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_mag_squared(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_mag_squared.xml b/gr-blocks/grc/blocks_complex_to_mag_squared.xml deleted file mode 100644 index ee2270fecd..0000000000 --- a/gr-blocks/grc/blocks_complex_to_mag_squared.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Magnitude Squared -################################################### - --> -<block> - <name>Complex to Mag^2</name> - <key>blocks_complex_to_mag_squared</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_mag_squared($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_magphase.block.yml b/gr-blocks/grc/blocks_complex_to_magphase.block.yml new file mode 100644 index 0000000000..80420ac2a0 --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_magphase.block.yml @@ -0,0 +1,34 @@ +id: blocks_complex_to_magphase +label: Complex To Mag Phase + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- label: mag + domain: stream + dtype: float + vlen: ${ vlen } +- label: phase + domain: stream + dtype: float + vlen: ${ vlen } + optional: true + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_magphase(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_magphase.xml b/gr-blocks/grc/blocks_complex_to_magphase.xml deleted file mode 100644 index cad310b2fb..0000000000 --- a/gr-blocks/grc/blocks_complex_to_magphase.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Magnitude and Phase (floats): -## two output streams -################################################### - --> -<block> - <name>Complex To Mag Phase</name> - <key>blocks_complex_to_magphase</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_magphase($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>mag</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> - <source> - <name>phase</name> - <type>float</type> - <vlen>$vlen</vlen> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_complex_to_real.block.yml b/gr-blocks/grc/blocks_complex_to_real.block.yml new file mode 100644 index 0000000000..41fbbb33cc --- /dev/null +++ b/gr-blocks/grc/blocks_complex_to_real.block.yml @@ -0,0 +1,29 @@ +id: blocks_complex_to_real +label: Complex To Real + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- label: re + domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.complex_to_real(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_complex_to_real.xml b/gr-blocks/grc/blocks_complex_to_real.xml deleted file mode 100644 index 6737f1da36..0000000000 --- a/gr-blocks/grc/blocks_complex_to_real.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex to Real: -## one or two output streams -################################################### - --> -<block> - <name>Complex To Real</name> - <key>blocks_complex_to_real</key> - <import>from gnuradio import blocks</import> - <make>blocks.complex_to_real($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>re</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_conjugate_cc.block.yml b/gr-blocks/grc/blocks_conjugate_cc.block.yml new file mode 100644 index 0000000000..a0d8b1a64c --- /dev/null +++ b/gr-blocks/grc/blocks_conjugate_cc.block.yml @@ -0,0 +1,16 @@ +id: blocks_conjugate_cc +label: Complex Conjugate + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.conjugate_cc() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_conjugate_cc.xml b/gr-blocks/grc/blocks_conjugate_cc.xml deleted file mode 100644 index 152f797b20..0000000000 --- a/gr-blocks/grc/blocks_conjugate_cc.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Complex Conjugate -################################################### - --> -<block> - <name>Complex Conjugate</name> - <key>blocks_conjugate_cc</key> - <import>from gnuradio import blocks</import> - <make>blocks.conjugate_cc()</make> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_copy.block.yml b/gr-blocks/grc/blocks_copy.block.yml new file mode 100644 index 0000000000..0de4bcadf5 --- /dev/null +++ b/gr-blocks/grc/blocks_copy.block.yml @@ -0,0 +1,57 @@ +id: blocks_copy +label: Copy + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: enabled + label: Enabled + dtype: bool + default: 'True' + options: ['True', 'False'] + option_labels: [Enabled, Disabled] +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: showports + label: Show Msg Ports + dtype: enum + default: 'True' + options: ['False', 'True'] + option_labels: ['Yes', 'No'] + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } +- domain: message + id: en + optional: true + hide: ${ showports } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: |- + blocks.copy(${type.size}*${vlen}) + self.${id}.set_enabled(${enabled}) + callbacks: + - set_enabled(${enabled}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_copy.xml b/gr-blocks/grc/blocks_copy.xml deleted file mode 100644 index 6192937cd8..0000000000 --- a/gr-blocks/grc/blocks_copy.xml +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Copy -################################################### - --> -<block> - <name>Copy</name> - <key>blocks_copy</key> - <import>from gnuradio import blocks</import> - <make>blocks.copy($type.size*$vlen) -self.$(id).set_enabled($enabled)</make> - <callback>set_enabled($enabled)</callback> - - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - - <param> - <name>Enabled</name> - <key>enabled</key> - <value>True</value> - <type>bool</type> - <option> - <name>Enabled</name> - <key>True</key> - </option> - <option> - <name>Disabled</name> - <key>False</key> - </option> - </param> - - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - - <param> - <name>Show Msg Ports</name> - <key>showports</key> - <value>True</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>Yes</name> - <key>False</key> - </option> - <option> - <name>No</name> - <key>True</key> - </option> - </param> - - <check>$vlen > 0</check> - - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - - <sink> - <name>en</name> - <type>message</type> - <optional>1</optional> - <hide>$showports</hide> - </sink> - - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_ctrlport_performance.block.yml b/gr-blocks/grc/blocks_ctrlport_performance.block.yml new file mode 100644 index 0000000000..80f541a41b --- /dev/null +++ b/gr-blocks/grc/blocks_ctrlport_performance.block.yml @@ -0,0 +1,17 @@ +id: blocks_ctrlport_monitor_performance +label: CtrlPort Performance Monitor + +parameters: +- id: en + label: Enabled + dtype: enum + options: ['True', 'False'] + +templates: + imports: from gnuradio.ctrlport.monitor import * + make: not ${en} or monitor("gr-perf-monitorx") + +documentation: |- + Place this in a graph to launch a QtPy GR CtrlPort Performance Monitor app. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_ctrlport_performance.xml b/gr-blocks/grc/blocks_ctrlport_performance.xml deleted file mode 100644 index ab17c9e263..0000000000 --- a/gr-blocks/grc/blocks_ctrlport_performance.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<block> - <name>CtrlPort Performance Monitor</name> - <key>blocks_ctrlport_monitor_performance</key> - <import>from gnuradio.ctrlport.monitor import *</import> - <make>not $en or monitor("gr-perf-monitorx")</make> - <param> - <name>Enabled</name> - <key>en</key> - <value></value> - <type>enum</type> - <option> - <name>True</name> - <key>True</key> - </option> - <option> - <name>False</name> - <key>False</key> - </option> - </param> - - <doc> - Place this in a graph to launch a QtPy GR CtrlPort Performance Monitor app. - </doc> - -</block> diff --git a/gr-blocks/grc/blocks_ctrlport_probe2_c.block.yml b/gr-blocks/grc/blocks_ctrlport_probe2_c.block.yml new file mode 100644 index 0000000000..2b757718a6 --- /dev/null +++ b/gr-blocks/grc/blocks_ctrlport_probe2_c.block.yml @@ -0,0 +1,41 @@ +id: blocks_ctrlport_probe2_c +label: Ctrlport Probe + +parameters: +- id: name + label: Name + dtype: string + default: samples +- id: desc + label: Description + dtype: string + default: Sample Points +- id: len + label: Length + dtype: int + default: '1024' +- id: disp_mask + label: Display Mask + dtype: int + default: gr.DISPTIME + options: [gr.DISPXY | gr.DISPOPTSCATTER, gr.DISPTIME, gr.DISPPSD, gr.DISPSPEC, + gr.DISPRAST] + option_labels: [Constellation, Time, PSD, Spectrogram, Raster] + +inputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.ctrlport_probe2_c(${name}, ${desc}, ${len}, ${disp_mask}) + callbacks: + - set_length(${len}) + +documentation: |- + Place this in a graph to export vectors of samples to a GRCP port probe. + + * Specify the number of samples to transmit at once and the type + of default display to use. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_ctrlport_probe2_c.xml b/gr-blocks/grc/blocks_ctrlport_probe2_c.xml deleted file mode 100644 index 708a8fdf9b..0000000000 --- a/gr-blocks/grc/blocks_ctrlport_probe2_c.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012-2013 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<block> - <name>Ctrlport Probe</name> - <key>blocks_ctrlport_probe2_c</key> - <import>from gnuradio import blocks</import> - <make>blocks.ctrlport_probe2_c($name, $desc, $len, $disp_mask)</make> - <callback>set_length($len)</callback> - - <param> - <name>Name</name> - <key>name</key> - <value>samples</value> - <type>string</type> - </param> - - <param> - <name>Description</name> - <key>desc</key> - <value>Sample Points</value> - <type>string</type> - </param> - - <param> - <name>Length</name> - <key>len</key> - <value>1024</value> - <type>int</type> - </param> - - <param> - <name>Display Mask</name> - <key>disp_mask</key> - <value>gr.DISPTIME</value> - <type>int</type> - <option> - <name>Constellation</name> - <key>gr.DISPXY | gr.DISPOPTSCATTER</key> - </option> - <option> - <name>Time</name> - <key>gr.DISPTIME</key> - </option> - <option> - <name>PSD</name> - <key>gr.DISPPSD</key> - </option> - <option> - <name>Spectrogram</name> - <key>gr.DISPSPEC</key> - </option> - <option> - <name>Raster</name> - <key>gr.DISPRAST</key> - </option> - </param> - - <sink> - <name>in</name> - <type>complex</type> - </sink> - - <doc> - Place this in a graph to export vectors of samples to a GRCP port probe. - - * Specify the number of samples to transmit at once and the type - of default display to use. - </doc> - -</block> - diff --git a/gr-blocks/grc/blocks_ctrlport_probe2_x.block.yml b/gr-blocks/grc/blocks_ctrlport_probe2_x.block.yml new file mode 100644 index 0000000000..f2b8e0a781 --- /dev/null +++ b/gr-blocks/grc/blocks_ctrlport_probe2_x.block.yml @@ -0,0 +1,48 @@ +id: blocks_ctrlport_probe2_x +label: Ctrlport Probe + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + fcn: [c, f, i, s, b] + hide: part +- id: name + label: Name + dtype: string + default: samples +- id: desc + label: Description + dtype: string + default: Sample Points +- id: len + label: Length + dtype: int + default: '1024' +- id: disp_mask + label: Display Mask + dtype: int + default: gr.DISPTIME + options: [gr.DISPXY | gr.DISPOPTSCATTER, gr.DISPTIME, gr.DISPPSD, gr.DISPSPEC, + gr.DISPRAST] + option_labels: [Constellation, Time, PSD, Spectrogram, Raster] + +inputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.ctrlport_probe2_${type.fcn}(${name}, ${desc}, ${len}, ${disp_mask}) + callbacks: + - set_length(${len}) + +documentation: |- + Place this in a graph to export vectors of samples to a GRCP port probe. + + * Specify the number of samples to transmit at once and the type + of default display to use. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_ctrlport_probe2_x.xml b/gr-blocks/grc/blocks_ctrlport_probe2_x.xml deleted file mode 100644 index 47d1b81d3d..0000000000 --- a/gr-blocks/grc/blocks_ctrlport_probe2_x.xml +++ /dev/null @@ -1,123 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2013 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<block> - <name>Ctrlport Probe</name> - <key>blocks_ctrlport_probe2_x</key> - <import>from gnuradio import blocks</import> - <make>blocks.ctrlport_probe2_$(type.fcn)($name, $desc, $len, $disp_mask)</make> - <callback>set_length($len)</callback> - - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - </option> - </param> - - <param> - <name>Name</name> - <key>name</key> - <value>samples</value> - <type>string</type> - </param> - - <param> - <name>Description</name> - <key>desc</key> - <value>Sample Points</value> - <type>string</type> - </param> - - <param> - <name>Length</name> - <key>len</key> - <value>1024</value> - <type>int</type> - </param> - - <param> - <name>Display Mask</name> - <key>disp_mask</key> - <value>gr.DISPTIME</value> - <type>int</type> - <option> - <name>Constellation</name> - <key>gr.DISPXY | gr.DISPOPTSCATTER</key> - </option> - <option> - <name>Time</name> - <key>gr.DISPTIME</key> - </option> - <option> - <name>PSD</name> - <key>gr.DISPPSD</key> - </option> - <option> - <name>Spectrogram</name> - <key>gr.DISPSPEC</key> - </option> - <option> - <name>Raster</name> - <key>gr.DISPRAST</key> - </option> - </param> - - <sink> - <name>in</name> - <type>$type</type> - </sink> - - <doc> - Place this in a graph to export vectors of samples to a GRCP port probe. - - * Specify the number of samples to transmit at once and the type - of default display to use. - </doc> - -</block> - diff --git a/gr-blocks/grc/blocks_ctrlport_probe_c.block.yml b/gr-blocks/grc/blocks_ctrlport_probe_c.block.yml new file mode 100644 index 0000000000..6f59f3e695 --- /dev/null +++ b/gr-blocks/grc/blocks_ctrlport_probe_c.block.yml @@ -0,0 +1,25 @@ +id: blocks_ctrlport_probe_c +label: Ctrlport Complex Probe + +parameters: +- id: name + label: Name + dtype: string + default: constellation +- id: desc + label: Description + dtype: string + default: Constellation Points + +inputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.ctrlport_probe_c(${name}, ${desc}) + +documentation: |- + Place this in a graph to export complex values to a GRCP port probe. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_ctrlport_probe_c.xml b/gr-blocks/grc/blocks_ctrlport_probe_c.xml deleted file mode 100644 index 64174204f1..0000000000 --- a/gr-blocks/grc/blocks_ctrlport_probe_c.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<block> - <name>Ctrlport Complex Probe</name> - <key>blocks_ctrlport_probe_c</key> - <import>from gnuradio import blocks</import> - <make>blocks.ctrlport_probe_c($name, $desc)</make> - - <param> - <name>Name</name> - <key>name</key> - <value>constellation</value> - <type>string</type> - </param> - - <param> - <name>Description</name> - <key>desc</key> - <value>Constellation Points</value> - <type>string</type> - </param> - - - <sink> - <name>in</name> - <type>complex</type> - </sink> - - <doc> - Place this in a graph to export complex values to a GRCP port probe. - </doc> - -</block> - diff --git a/gr-blocks/grc/blocks_ctrlport_viewer.block.yml b/gr-blocks/grc/blocks_ctrlport_viewer.block.yml new file mode 100644 index 0000000000..dc718aa975 --- /dev/null +++ b/gr-blocks/grc/blocks_ctrlport_viewer.block.yml @@ -0,0 +1,17 @@ +id: blocks_ctrlport_monitor +label: CtrlPort Monitor + +parameters: +- id: en + label: Enabled + dtype: enum + options: ['True', 'False'] + +templates: + imports: from gnuradio.ctrlport.monitor import * + make: not ${en} or monitor() + +documentation: |- + Place this in a graph to launch a QtPy GR CtrlPort Monitor app. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_ctrlport_viewer.xml b/gr-blocks/grc/blocks_ctrlport_viewer.xml deleted file mode 100644 index 1d5a2e5931..0000000000 --- a/gr-blocks/grc/blocks_ctrlport_viewer.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> - -<!-- - Copyright 2012 Free Software Foundation, Inc. - - This file is part of GNU Radio - - GNU Radio 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. - - GNU Radio 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 GNU Radio; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, - Boston, MA 02110-1301, USA. ---> - -<block> - <name>CtrlPort Monitor</name> - <key>blocks_ctrlport_monitor</key> - <import>from gnuradio.ctrlport.monitor import *</import> - <make>not $en or monitor()</make> - <param> - <name>Enabled</name> - <key>en</key> - <value></value> - <type>enum</type> - <option> - <name>True</name> - <key>True</key> - </option> - <option> - <name>False</name> - <key>False</key> - </option> - </param> - - <doc> - Place this in a graph to launch a QtPy GR CtrlPort Monitor app. - </doc> - -</block> diff --git a/gr-blocks/grc/blocks_deinterleave.block.yml b/gr-blocks/grc/blocks_deinterleave.block.yml new file mode 100644 index 0000000000..98761c4cc0 --- /dev/null +++ b/gr-blocks/grc/blocks_deinterleave.block.yml @@ -0,0 +1,48 @@ +id: blocks_deinterleave +label: Deinterleave + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: blocksize + label: Block Size + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.deinterleave(${type.size}*${vlen}, ${blocksize}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_deinterleave.xml b/gr-blocks/grc/blocks_deinterleave.xml deleted file mode 100644 index 4ada49dc38..0000000000 --- a/gr-blocks/grc/blocks_deinterleave.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Deinterleave -################################################### - --> -<block> - <name>Deinterleave</name> - <key>blocks_deinterleave</key> - <import>from gnuradio import blocks</import> - <make>blocks.deinterleave($type.size*$vlen, $blocksize)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Block Size</name> - <key>blocksize</key> - <value>1</value> - <type>int</type> - <hide>part</hide> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_delay.block.yml b/gr-blocks/grc/blocks_delay.block.yml new file mode 100644 index 0000000000..b9d63df586 --- /dev/null +++ b/gr-blocks/grc/blocks_delay.block.yml @@ -0,0 +1,50 @@ +id: blocks_delay +label: Delay + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: delay + label: Delay + dtype: int + default: '0' +- id: num_ports + label: Num Ports + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_ports } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_ports } + +asserts: +- ${ num_ports > 0 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.delay(${type.size}*${vlen}, ${delay}) + callbacks: + - set_dly(${delay}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_delay.xml b/gr-blocks/grc/blocks_delay.xml deleted file mode 100644 index a7c48c4dce..0000000000 --- a/gr-blocks/grc/blocks_delay.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Delay -################################################### - --> -<block> - <name>Delay</name> - <key>blocks_delay</key> - <import>from gnuradio import blocks</import> - <make>blocks.delay($type.size*$vlen, $delay)</make> - <callback>set_dly($delay)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Delay</name> - <key>delay</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Num Ports</name> - <key>num_ports</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_ports > 0</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_divide_XX.block.yml b/gr-blocks/grc/blocks_divide_XX.block.yml new file mode 100644 index 0000000000..a98dfde5c7 --- /dev/null +++ b/gr-blocks/grc/blocks_divide_XX.block.yml @@ -0,0 +1,42 @@ +id: blocks_divide_xx +label: Divide + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } +- ${ num_inputs >= 2 } + +templates: + imports: from gnuradio import blocks + make: blocks.divide_${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_divide_XX.xml b/gr-blocks/grc/blocks_divide_XX.xml deleted file mode 100644 index d784d305d9..0000000000 --- a/gr-blocks/grc/blocks_divide_XX.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Divide Block: -## all types, 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Divide</name> - <key>blocks_divide_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.divide_$(type.fcn)($vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <check>$num_inputs >= 2</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_endian_swap.block.yml b/gr-blocks/grc/blocks_endian_swap.block.yml new file mode 100644 index 0000000000..da2ef0c379 --- /dev/null +++ b/gr-blocks/grc/blocks_endian_swap.block.yml @@ -0,0 +1,26 @@ +id: blocks_endian_swap +label: Endian Swap + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, s32, s16] + option_labels: [Complex, Int, Short] + option_attributes: + size: ['8', '4', '2'] + hide: part + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.endian_swap(${type.size}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_endian_swap.xml b/gr-blocks/grc/blocks_endian_swap.xml deleted file mode 100644 index 5fea420664..0000000000 --- a/gr-blocks/grc/blocks_endian_swap.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Add Block: -## all types, 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Endian Swap</name> - <key>blocks_endian_swap</key> - <import>from gnuradio import blocks</import> - <make>blocks.endian_swap($type.size)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:8</opt> - </option> - <option> - <name>Int</name> - <key>s32</key> - <opt>size:4</opt> - </option> - <option> - <name>Short</name> - <key>s16</key> - <opt>size:2</opt> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_exponentiate_const_cci.block.yml b/gr-blocks/grc/blocks_exponentiate_const_cci.block.yml new file mode 100644 index 0000000000..10bef0d3cd --- /dev/null +++ b/gr-blocks/grc/blocks_exponentiate_const_cci.block.yml @@ -0,0 +1,43 @@ +id: blocks_exponentiate_const_cci +label: Exponentiate Const Int + +parameters: +- id: num_ports + label: Num Ports + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: exponent + label: Exponent + dtype: int + default: '1' + +inputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + multiplicity: ${ num_ports } + +outputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + multiplicity: ${ num_ports } + +asserts: +- ${ num_ports > 0 } +- ${ vlen > 0 } +- ${ exponent > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.exponentiate_const_cci(${exponent}, ${vlen}) + callbacks: + - set_exponent(${exponent}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_exponentiate_const_cci.xml b/gr-blocks/grc/blocks_exponentiate_const_cci.xml deleted file mode 100644 index 3c9e9b9625..0000000000 --- a/gr-blocks/grc/blocks_exponentiate_const_cci.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Exponentiate Const Int</name> - <key>blocks_exponentiate_const_cci</key> - <import>from gnuradio import blocks</import> - <make>blocks.exponentiate_const_cci($exponent, $vlen)</make> - <callback>set_exponent($exponent)</callback> - - <param> - <name>Num Ports</name> - <key>num_ports</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Exponent</name> - <key>exponent</key> - <value>1</value> - <type>int</type> - </param> - - <check>$num_ports > 0</check> - <check>$vlen > 0</check> - <check>$exponent > 0</check> - - <sink> - <name>in</name> - <type>complex</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </sink> - - <source> - <name>out</name> - <type>complex</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_file_descriptor_sink.block.yml b/gr-blocks/grc/blocks_file_descriptor_sink.block.yml new file mode 100644 index 0000000000..24d88f67f9 --- /dev/null +++ b/gr-blocks/grc/blocks_file_descriptor_sink.block.yml @@ -0,0 +1,34 @@ +id: blocks_file_descriptor_sink +label: File Descriptor Sink + +parameters: +- id: fd + label: File Descriptor + dtype: int +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.file_descriptor_sink(${type.size}*${vlen}, ${fd}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_descriptor_sink.xml b/gr-blocks/grc/blocks_file_descriptor_sink.xml deleted file mode 100644 index 211d86dfd3..0000000000 --- a/gr-blocks/grc/blocks_file_descriptor_sink.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Sink -################################################### - --> -<block> - <name>File Descriptor Sink</name> - <key>blocks_file_descriptor_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.file_descriptor_sink($type.size*$vlen, $fd)</make> - <param> - <name>File Descriptor</name> - <key>fd</key> - <type>int</type> - </param> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_file_descriptor_source.block.yml b/gr-blocks/grc/blocks_file_descriptor_source.block.yml new file mode 100644 index 0000000000..84926661e4 --- /dev/null +++ b/gr-blocks/grc/blocks_file_descriptor_source.block.yml @@ -0,0 +1,37 @@ +id: blocks_file_descriptor_source +label: File Descriptor Source + +parameters: +- id: fd + label: File Descriptor + dtype: int +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.file_descriptor_source(${type.size}*${vlen}, ${fd}, ${repeat}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_descriptor_source.xml b/gr-blocks/grc/blocks_file_descriptor_source.xml deleted file mode 100644 index b29335c3af..0000000000 --- a/gr-blocks/grc/blocks_file_descriptor_source.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Source -################################################### - --> -<block> - <name>File Descriptor Source</name> - <key>blocks_file_descriptor_source</key> - <import>from gnuradio import blocks</import> - <make>blocks.file_descriptor_source($type.size*$vlen, $fd, $repeat)</make> - <param> - <name>File Descriptor</name> - <key>fd</key> - <type>int</type> - </param> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_file_meta_sink.block.yml b/gr-blocks/grc/blocks_file_meta_sink.block.yml new file mode 100644 index 0000000000..7512f23aae --- /dev/null +++ b/gr-blocks/grc/blocks_file_meta_sink.block.yml @@ -0,0 +1,70 @@ +id: blocks_file_meta_sink +label: File Meta Sink + +parameters: +- id: file + label: File + dtype: file_save +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + cplx: ['True', 'False', 'False', 'False', 'False'] + dtype: [blocks.GR_FILE_FLOAT, blocks.GR_FILE_FLOAT, blocks.GR_FILE_INT, blocks.GR_FILE_SHORT, + blocks.GR_FILE_BYTE] + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: samp_rate + label: Sample Rate + dtype: real + default: samp_rate +- id: rel_rate + label: Relative Rate Change + dtype: real + default: '1' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: max_seg_size + label: Max Seg. Size + dtype: int + default: '1000000' +- id: extra_dict + label: Extra Dict. + dtype: string + default: '""' +- id: detached + label: Detached + dtype: bool + default: 'False' + options: ['False', 'True'] + option_labels: ['Off', 'On'] +- id: unbuffered + label: Unbuffered + dtype: bool + default: 'False' + options: ['False', 'True'] + option_labels: ['Off', 'On'] + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import gr, blocks + make: |- + blocks.file_meta_sink(${type.size}*${vlen}, ${file}, ${samp_rate}, ${rel_rate}, ${type.dtype}, ${type.cplx}, ${max_seg_size}, ${extra_dict}, ${detached}) + self.${id}.set_unbuffered(${unbuffered}) + callbacks: + - set_unbuffered(${unbuffered}) + - open(${file}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_meta_sink.xml b/gr-blocks/grc/blocks_file_meta_sink.xml deleted file mode 100644 index f6490d507d..0000000000 --- a/gr-blocks/grc/blocks_file_meta_sink.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Meta Sink -################################################### - --> -<block> - <name>File Meta Sink</name> - <key>blocks_file_meta_sink</key> - <import>from gnuradio import gr, blocks</import> - <make>blocks.file_meta_sink($type.size*$vlen, $file, $samp_rate, $rel_rate, $type.dtype, $type.cplx, $max_seg_size, $extra_dict, $detached) -self.$(id).set_unbuffered($unbuffered)</make> - <callback>set_unbuffered($unbuffered)</callback> - <callback>open($file)</callback> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_save</type> - </param> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - <opt>dtype:blocks.GR_FILE_FLOAT</opt> - <opt>cplx:True</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - <opt>dtype:blocks.GR_FILE_FLOAT</opt> - <opt>cplx:False</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - <opt>dtype:blocks.GR_FILE_INT</opt> - <opt>cplx:False</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - <opt>dtype:blocks.GR_FILE_SHORT</opt> - <opt>cplx:False</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - <opt>dtype:blocks.GR_FILE_BYTE</opt> - <opt>cplx:False</opt> - </option> - </param> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>Relative Rate Change</name> - <key>rel_rate</key> - <value>1</value> - <type>real</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Max Seg. Size</name> - <key>max_seg_size</key> - <value>1000000</value> - <type>int</type> - </param> - <param> - <name>Extra Dict.</name> - <key>extra_dict</key> - <value>""</value> - <type>string</type> - </param> - <param> - <name>Detached</name> - <key>detached</key> - <value>False</value> - <type>bool</type> - <option> - <name>Off</name> - <key>False</key> - </option> - <option> - <name>On</name> - <key>True</key> - </option> - </param> <param> - <name>Unbuffered</name> - <key>unbuffered</key> - <value>False</value> - <type>bool</type> - <option> - <name>Off</name> - <key>False</key> - </option> - <option> - <name>On</name> - <key>True</key> - </option> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_file_meta_source.block.yml b/gr-blocks/grc/blocks_file_meta_source.block.yml new file mode 100644 index 0000000000..016c2f62a5 --- /dev/null +++ b/gr-blocks/grc/blocks_file_meta_source.block.yml @@ -0,0 +1,48 @@ +id: blocks_file_meta_source +label: File Meta Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: file + label: File + dtype: file_open +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: detached + label: Detached Header + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: hdr_file + label: Header File + dtype: file_open +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import gr, blocks + make: blocks.file_meta_source(${file}, ${repeat}, ${detached}, ${hdr_file}) + callbacks: + - open(${file}, ${repeat}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_meta_source.xml b/gr-blocks/grc/blocks_file_meta_source.xml deleted file mode 100644 index aa7e349551..0000000000 --- a/gr-blocks/grc/blocks_file_meta_source.xml +++ /dev/null @@ -1,94 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Source -################################################### - --> -<block> - <name>File Meta Source</name> - <key>blocks_file_meta_source</key> - <import>from gnuradio import gr, blocks</import> - <make>blocks.file_meta_source($file, $repeat, $detached, $hdr_file)</make> - <callback>open($file, $repeat)</callback> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_open</type> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Detached Header</name> - <key>detached</key> - <value>False</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Header File</name> - <key>hdr_file</key> - <value></value> - <type>file_open</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_file_sink.block.yml b/gr-blocks/grc/blocks_file_sink.block.yml new file mode 100644 index 0000000000..cf9782340f --- /dev/null +++ b/gr-blocks/grc/blocks_file_sink.block.yml @@ -0,0 +1,51 @@ +id: blocks_file_sink +label: File Sink + +parameters: +- id: file + label: File + dtype: file_save +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: unbuffered + label: Unbuffered + dtype: bool + default: 'False' + options: ['False', 'True'] + option_labels: ['Off', 'On'] +- id: append + label: Append file + dtype: bool + default: 'False' + options: ['True', 'False'] + option_labels: [Append, Overwrite] + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: |- + blocks.file_sink(${type.size}*${vlen}, ${file}, ${append}) + self.${id}.set_unbuffered(${unbuffered}) + callbacks: + - set_unbuffered(${unbuffered}) + - open(${file}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_sink.xml b/gr-blocks/grc/blocks_file_sink.xml deleted file mode 100644 index ece21fd2ae..0000000000 --- a/gr-blocks/grc/blocks_file_sink.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Sink -################################################### - --> -<block> - <name>File Sink</name> - <key>blocks_file_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.file_sink($type.size*$vlen, $file, $append) -self.$(id).set_unbuffered($unbuffered)</make> - <callback>set_unbuffered($unbuffered)</callback> - <callback>open($file)</callback> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_save</type> - </param> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Unbuffered</name> - <key>unbuffered</key> - <value>False</value> - <type>bool</type> - <option> - <name>Off</name> - <key>False</key> - </option> - <option> - <name>On</name> - <key>True</key> - </option> - </param> - <param> - <name>Append file</name> - <key>append</key> - <value>False</value> - <type>bool</type> - <option> - <name>Append</name> - <key>True</key> - </option> - <option> - <name>Overwrite</name> - <key>False</key> - </option> - </param> - - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_file_source.block.yml b/gr-blocks/grc/blocks_file_source.block.yml new file mode 100644 index 0000000000..717ed387be --- /dev/null +++ b/gr-blocks/grc/blocks_file_source.block.yml @@ -0,0 +1,51 @@ +id: blocks_file_source +label: File Source + +parameters: +- id: file + label: File + dtype: file_open +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: begin_tag + label: Add begin tag + dtype: raw + default: pmt.PMT_NIL + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: |- + blocks.file_source(${type.size}*${vlen}, ${file}, ${repeat}) + self.${id}.set_begin_tag(${begin_tag}) + callbacks: + - open(${file}, ${repeat}) + - self.${id}.set_begin_tag(${begin_tag}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_file_source.xml b/gr-blocks/grc/blocks_file_source.xml deleted file mode 100644 index 1f09e95168..0000000000 --- a/gr-blocks/grc/blocks_file_source.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##File Source -################################################### - --> -<block> - <name>File Source</name> - <key>blocks_file_source</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.file_source($type.size*$vlen, $file, $repeat) -self.$(id).set_begin_tag($begin_tag)</make> - <callback>open($file, $repeat)</callback> - <callback>self.$(id).set_begin_tag($begin_tag)</callback> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_open</type> - </param> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - - <param> - <name>Add begin tag</name> - <key>begin_tag</key> - <value>pmt.PMT_NIL</value> - <type>raw</type> - </param> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_float_to_char.block.yml b/gr-blocks/grc/blocks_float_to_char.block.yml new file mode 100644 index 0000000000..4f6eeb7286 --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_char.block.yml @@ -0,0 +1,31 @@ +id: blocks_float_to_char +label: Float To Char + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: byte + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.float_to_char(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_float_to_char.xml b/gr-blocks/grc/blocks_float_to_char.xml deleted file mode 100644 index e3854fc4ec..0000000000 --- a/gr-blocks/grc/blocks_float_to_char.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Float to Char: -################################################### - --> -<block> - <name>Float To Char</name> - <key>blocks_float_to_char</key> - <import>from gnuradio import blocks</import> - <make>blocks.float_to_char($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>byte</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_float_to_complex.block.yml b/gr-blocks/grc/blocks_float_to_complex.block.yml new file mode 100644 index 0000000000..d592c4e461 --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_complex.block.yml @@ -0,0 +1,34 @@ +id: blocks_float_to_complex +label: Float To Complex + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- label: re + domain: stream + dtype: float + vlen: ${ vlen } +- label: im + domain: stream + dtype: float + vlen: ${ vlen } + optional: true + +outputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.float_to_complex(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_float_to_complex.xml b/gr-blocks/grc/blocks_float_to_complex.xml deleted file mode 100644 index 6120d58871..0000000000 --- a/gr-blocks/grc/blocks_float_to_complex.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Float to Complex: -## one or two input streams -################################################### - --> -<block> - <name>Float To Complex</name> - <key>blocks_float_to_complex</key> - <import>from gnuradio import blocks</import> - <make>blocks.float_to_complex($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>re</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <sink> - <name>im</name> - <type>float</type> - <vlen>$vlen</vlen> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>complex</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_float_to_int.block.yml b/gr-blocks/grc/blocks_float_to_int.block.yml new file mode 100644 index 0000000000..4ed0e08718 --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_int.block.yml @@ -0,0 +1,31 @@ +id: blocks_float_to_int +label: Float To Int + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: int + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.float_to_int(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_float_to_int.xml b/gr-blocks/grc/blocks_float_to_int.xml deleted file mode 100644 index 0ff5d9cdf1..0000000000 --- a/gr-blocks/grc/blocks_float_to_int.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Float to Int: -################################################### - --> -<block> - <name>Float To Int</name> - <key>blocks_float_to_int</key> - <import>from gnuradio import blocks</import> - <make>blocks.float_to_int($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>int</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_float_to_short.block.yml b/gr-blocks/grc/blocks_float_to_short.block.yml new file mode 100644 index 0000000000..8b1c4e58b5 --- /dev/null +++ b/gr-blocks/grc/blocks_float_to_short.block.yml @@ -0,0 +1,31 @@ +id: blocks_float_to_short +label: Float To Short + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: short + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.float_to_short(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_float_to_short.xml b/gr-blocks/grc/blocks_float_to_short.xml deleted file mode 100644 index 986e68ec41..0000000000 --- a/gr-blocks/grc/blocks_float_to_short.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Float to Short: -################################################### - --> -<block> - <name>Float To Short</name> - <key>blocks_float_to_short</key> - <import>from gnuradio import blocks</import> - <make>blocks.float_to_short($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>short</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_float_uchar.block.yml b/gr-blocks/grc/blocks_float_uchar.block.yml new file mode 100644 index 0000000000..33687978c2 --- /dev/null +++ b/gr-blocks/grc/blocks_float_uchar.block.yml @@ -0,0 +1,16 @@ +id: blocks_float_to_uchar +label: Float To UChar + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.float_to_uchar() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_float_uchar.xml b/gr-blocks/grc/blocks_float_uchar.xml deleted file mode 100644 index d190eafcf7..0000000000 --- a/gr-blocks/grc/blocks_float_uchar.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Float to Unsigned Char: -################################################### - --> -<block> - <name>Float To UChar</name> - <key>blocks_float_to_uchar</key> - <import>from gnuradio import blocks</import> - <make>blocks.float_to_uchar()</make> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_head.block.yml b/gr-blocks/grc/blocks_head.block.yml new file mode 100644 index 0000000000..c342e40067 --- /dev/null +++ b/gr-blocks/grc/blocks_head.block.yml @@ -0,0 +1,42 @@ +id: blocks_head +label: Head + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_items + label: Num Items + dtype: int + default: '1024' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.head(${type.size}*${vlen}, ${num_items}) + callbacks: + - set_length(${num_items}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_head.xml b/gr-blocks/grc/blocks_head.xml deleted file mode 100644 index dc8e826d54..0000000000 --- a/gr-blocks/grc/blocks_head.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Head -################################################### - --> -<block> - <name>Head</name> - <key>blocks_head</key> - <import>from gnuradio import blocks</import> - <make>blocks.head($type.size*$vlen, $num_items)</make> - <callback>set_length($num_items)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Items</name> - <key>num_items</key> - <value>1024</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_int_to_float.block.yml b/gr-blocks/grc/blocks_int_to_float.block.yml new file mode 100644 index 0000000000..a6f3b3b92c --- /dev/null +++ b/gr-blocks/grc/blocks_int_to_float.block.yml @@ -0,0 +1,31 @@ +id: blocks_int_to_float +label: Int To Float + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: int + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.int_to_float(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_int_to_float.xml b/gr-blocks/grc/blocks_int_to_float.xml deleted file mode 100644 index 2bb25d8bec..0000000000 --- a/gr-blocks/grc/blocks_int_to_float.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Int to Float: -################################################### - --> -<block> - <name>Int To Float</name> - <key>blocks_int_to_float</key> - <import>from gnuradio import blocks</import> - <make>blocks.int_to_float($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>int</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_integrate_xx.block.yml b/gr-blocks/grc/blocks_integrate_xx.block.yml new file mode 100644 index 0000000000..e8d3dd08cd --- /dev/null +++ b/gr-blocks/grc/blocks_integrate_xx.block.yml @@ -0,0 +1,35 @@ +id: blocks_integrate_xx +label: Integrate + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: decim + label: Decimation + dtype: int +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.integrate_${type.fcn}(${decim}, ${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_integrate_xx.xml b/gr-blocks/grc/blocks_integrate_xx.xml deleted file mode 100644 index 8f47b94997..0000000000 --- a/gr-blocks/grc/blocks_integrate_xx.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Integrate -################################################### - --> -<block> - <name>Integrate</name> - <key>blocks_integrate_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.integrate_$(type.fcn)($decim, $vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Decimation</name> - <key>decim</key> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_interleave.block.yml b/gr-blocks/grc/blocks_interleave.block.yml new file mode 100644 index 0000000000..e814e675b9 --- /dev/null +++ b/gr-blocks/grc/blocks_interleave.block.yml @@ -0,0 +1,48 @@ +id: blocks_interleave +label: Interleave + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: blocksize + label: Block Size + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.interleave(${type.size}*${vlen}, ${blocksize}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_interleave.xml b/gr-blocks/grc/blocks_interleave.xml deleted file mode 100644 index 69fb15e2cf..0000000000 --- a/gr-blocks/grc/blocks_interleave.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Interleave -################################################### - --> -<block> - <name>Interleave</name> - <key>blocks_interleave</key> - <import>from gnuradio import blocks</import> - <make>blocks.interleave($type.size*$vlen, $blocksize)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Block Size</name> - <key>blocksize</key> - <value>1</value> - <type>int</type> - <hide>part</hide> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_interleaved_char_to_complex.block.yml b/gr-blocks/grc/blocks_interleaved_char_to_complex.block.yml new file mode 100644 index 0000000000..049f67b246 --- /dev/null +++ b/gr-blocks/grc/blocks_interleaved_char_to_complex.block.yml @@ -0,0 +1,28 @@ +id: blocks_interleaved_char_to_complex +label: IChar To Complex + +parameters: +- id: vector_input + label: Vector Input + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + option_attributes: + vlen: ['1', '2'] + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: byte + vlen: ${ vector_input.vlen } + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.interleaved_char_to_complex(${vector_input}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_interleaved_char_to_complex.xml b/gr-blocks/grc/blocks_interleaved_char_to_complex.xml deleted file mode 100644 index 9c0cdef6f8..0000000000 --- a/gr-blocks/grc/blocks_interleaved_char_to_complex.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Interleaved Char to Complex: -################################################### - --> -<block> - <name>IChar To Complex</name> - <key>blocks_interleaved_char_to_complex</key> - <import>from gnuradio import blocks</import> - <make>blocks.interleaved_char_to_complex($vector_input)</make> - <param> - <name>Vector Input</name> - <key>vector_input</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - <opt>vlen:1</opt> - </option> - <option> - <name>Yes</name> - <key>True</key> - <opt>vlen:2</opt> - </option> - </param> - <sink> - <name>in</name> - <type>byte</type> - <vlen>$vector_input.vlen</vlen> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_interleaved_short_to_complex.block.yml b/gr-blocks/grc/blocks_interleaved_short_to_complex.block.yml new file mode 100644 index 0000000000..5c3ab76d4d --- /dev/null +++ b/gr-blocks/grc/blocks_interleaved_short_to_complex.block.yml @@ -0,0 +1,37 @@ +id: blocks_interleaved_short_to_complex +label: IShort To Complex + +parameters: +- id: vector_input + label: Vector Input + dtype: enum + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + option_attributes: + vlen: ['1', '2'] + hide: ${ 'part' if vlen == 1 else 'none' } +- id: swap + label: Swap + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: part + +inputs: +- domain: stream + dtype: short + vlen: ${ vector_input.vlen } + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.interleaved_short_to_complex(${vector_input}, ${swap}) + callbacks: + - set_swap(${swap}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_interleaved_short_to_complex.xml b/gr-blocks/grc/blocks_interleaved_short_to_complex.xml deleted file mode 100644 index 2c4e153854..0000000000 --- a/gr-blocks/grc/blocks_interleaved_short_to_complex.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Interleaved Short to Complex: -################################################### - --> -<block> - <name>IShort To Complex</name> - <key>blocks_interleaved_short_to_complex</key> - <import>from gnuradio import blocks</import> - <make>blocks.interleaved_short_to_complex($vector_input, $swap)</make> - <callback>set_swap($swap)</callback> - <param> - <name>Vector Input</name> - <key>vector_input</key> - <value>False</value> - <type>enum</type> - <option> - <name>No</name> - <key>False</key> - <opt>vlen:1</opt> - </option> - <option> - <name>Yes</name> - <key>True</key> - <opt>vlen:2</opt> - </option> - </param> - <param> - <name>Swap</name> - <key>swap</key> - <value>False</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <sink> - <name>in</name> - <type>short</type> - <vlen>$vector_input.vlen</vlen> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_keep_m_in_n.block.yml b/gr-blocks/grc/blocks_keep_m_in_n.block.yml new file mode 100644 index 0000000000..451899eae0 --- /dev/null +++ b/gr-blocks/grc/blocks_keep_m_in_n.block.yml @@ -0,0 +1,49 @@ +id: blocks_keep_m_in_n +label: Keep M in N + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: m + label: M + dtype: int + default: '1' +- id: n + label: N + dtype: int + default: '2' +- id: offset + label: initial offset + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: ${ type } + vlen: 1 + +outputs: +- domain: stream + dtype: ${ type } + vlen: 1 + +asserts: +- ${ n > 0 } +- ${ m > 0 } +- ${ m <= n } + +templates: + imports: from gnuradio import blocks + make: blocks.keep_m_in_n(${type.size}, ${m}, ${n}, ${offset}) + callbacks: + - set_offset(${offset}) + - set_m(${m}) + - set_n(${n}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_keep_m_in_n.xml b/gr-blocks/grc/blocks_keep_m_in_n.xml deleted file mode 100644 index 824955c412..0000000000 --- a/gr-blocks/grc/blocks_keep_m_in_n.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Keep M in N -################################################### - --> -<block> - <name>Keep M in N</name> - <key>blocks_keep_m_in_n</key> - <import>from gnuradio import blocks</import> - <make>blocks.keep_m_in_n($type.size, $m, $n, $offset)</make> - <callback>set_offset($offset)</callback> - <callback>set_m($m)</callback> - <callback>set_n($n)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>M</name> - <key>m</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>N</name> - <key>n</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>initial offset</name> - <key>offset</key> - <value>0</value> - <type>int</type> - </param> - <check>$n > 0</check> - <check>$m > 0</check> - <check>$m <= $n</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>1</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>1</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_keep_one_in_n.block.yml b/gr-blocks/grc/blocks_keep_one_in_n.block.yml new file mode 100644 index 0000000000..d790557834 --- /dev/null +++ b/gr-blocks/grc/blocks_keep_one_in_n.block.yml @@ -0,0 +1,44 @@ +id: blocks_keep_one_in_n +label: Keep 1 in N + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: n + label: N + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ n > 0 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.keep_one_in_n(${type.size}*${vlen}, ${n}) + callbacks: + - set_n(${n}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_keep_one_in_n.xml b/gr-blocks/grc/blocks_keep_one_in_n.xml deleted file mode 100644 index 4289a984f4..0000000000 --- a/gr-blocks/grc/blocks_keep_one_in_n.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Keep 1 in N -################################################### - --> -<block> - <name>Keep 1 in N</name> - <key>blocks_keep_one_in_n</key> - <import>from gnuradio import blocks</import> - <make>blocks.keep_one_in_n($type.size*$vlen, $n)</make> - <callback>set_n($n)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>N</name> - <key>n</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$n > 0</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_magphase_to_complex.block.yml b/gr-blocks/grc/blocks_magphase_to_complex.block.yml new file mode 100644 index 0000000000..56f939d816 --- /dev/null +++ b/gr-blocks/grc/blocks_magphase_to_complex.block.yml @@ -0,0 +1,34 @@ +id: blocks_magphase_to_complex +label: Magnitude and Phase To Complex + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- label: mag + domain: stream + dtype: float + vlen: ${ vlen } +- label: phase + domain: stream + dtype: float + vlen: ${ vlen } + optional: true + +outputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.magphase_to_complex(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_magphase_to_complex.xml b/gr-blocks/grc/blocks_magphase_to_complex.xml deleted file mode 100644 index 1292c7d8c7..0000000000 --- a/gr-blocks/grc/blocks_magphase_to_complex.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Magnitue and Phase to Complex: -## Two input streams -################################################### - --> -<block> - <name>Magnitude and Phase To Complex</name> - <key>blocks_magphase_to_complex</key> - <import>from gnuradio import blocks</import> - <make>blocks.magphase_to_complex($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>mag</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <sink> - <name>phase</name> - <type>float</type> - <vlen>$vlen</vlen> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>complex</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_max_xx.block.yml b/gr-blocks/grc/blocks_max_xx.block.yml new file mode 100644 index 0000000000..8b7516de8e --- /dev/null +++ b/gr-blocks/grc/blocks_max_xx.block.yml @@ -0,0 +1,47 @@ +id: blocks_max_xx +label: Max + +parameters: +- id: type + label: IO Type + dtype: enum + options: [float, int, short] + option_attributes: + fcn: [ff, ii, ss] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '1' + hide: part +- id: vlen + label: Input Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: vlen_out + label: Output Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen_out } + +asserts: +- ${ num_inputs >= 1 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.max_${type.fcn}(${vlen},${vlen_out}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_max_xx.xml b/gr-blocks/grc/blocks_max_xx.xml deleted file mode 100644 index 65c536a3d9..0000000000 --- a/gr-blocks/grc/blocks_max_xx.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Max: -## 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Max</name> - <key>blocks_max_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.max_$(type.fcn)($vlen,$vlen_out)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Input Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Output Vec Length</name> - <key>vlen_out</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs >= 1</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen_out</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_message_debug.block.yml b/gr-blocks/grc/blocks_message_debug.block.yml new file mode 100644 index 0000000000..301320e884 --- /dev/null +++ b/gr-blocks/grc/blocks_message_debug.block.yml @@ -0,0 +1,19 @@ +id: blocks_message_debug +label: Message Debug + +inputs: +- domain: message + id: print + optional: true +- domain: message + id: store + optional: true +- domain: message + id: print_pdu + optional: true + +templates: + imports: from gnuradio import blocks + make: blocks.message_debug() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_message_debug.xml b/gr-blocks/grc/blocks_message_debug.xml deleted file mode 100644 index c547c7542d..0000000000 --- a/gr-blocks/grc/blocks_message_debug.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Message Debug -################################################### - --> -<block> - <name>Message Debug</name> - <key>blocks_message_debug</key> - <import>from gnuradio import blocks</import> - <make>blocks.message_debug()</make> - <sink> - <name>print</name> - <type>message</type> - <optional>1</optional> - </sink> - <sink> - <name>store</name> - <type>message</type> - <optional>1</optional> - </sink> - <sink> - <name>print_pdu</name> - <type>message</type> - <optional>1</optional> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_message_strobe.block.yml b/gr-blocks/grc/blocks_message_strobe.block.yml new file mode 100644 index 0000000000..6adb2948ed --- /dev/null +++ b/gr-blocks/grc/blocks_message_strobe.block.yml @@ -0,0 +1,33 @@ +id: blocks_message_strobe +label: Message Strobe + +parameters: +- id: msg + label: Message PMT + dtype: raw + default: pmt.intern("TEST") +- id: period + label: Period (ms) + dtype: real + default: '1000' + +inputs: +- domain: message + id: set_msg + optional: true + +outputs: +- domain: message + id: strobe + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.message_strobe(${msg}, ${period}) + callbacks: + - set_msg(${msg}) + - set_period(${period}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_message_strobe.xml b/gr-blocks/grc/blocks_message_strobe.xml deleted file mode 100644 index 4a6091d8e0..0000000000 --- a/gr-blocks/grc/blocks_message_strobe.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Message Strobe -################################################### - --> -<block> - <name>Message Strobe</name> - <key>blocks_message_strobe</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.message_strobe($msg, $period)</make> - <callback>set_msg($msg)</callback> - <callback>set_period($period)</callback> - <param> - <name>Message PMT</name> - <key>msg</key> - <value>pmt.intern("TEST")</value> - <type>raw</type> - </param> - <param> - <name>Period (ms)</name> - <key>period</key> - <value>1000</value> - <type>real</type> - </param> - <sink> - <name>set_msg</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>strobe</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_message_strobe_random.block.yml b/gr-blocks/grc/blocks_message_strobe_random.block.yml new file mode 100644 index 0000000000..c0d6075892 --- /dev/null +++ b/gr-blocks/grc/blocks_message_strobe_random.block.yml @@ -0,0 +1,50 @@ +id: blocks_message_strobe_random +label: Message Strobe Random-Delay + +parameters: +- id: msg + label: Message PMT + dtype: raw + default: pmt.intern("TEST") +- id: dist + label: Distribution + dtype: enum + options: [blocks.STROBE_POISSON, blocks.STROBE_UNIFORM, blocks.STROBE_GAUSSIAN] + option_labels: [Poisson, Uniform, Gaussian] +- id: mean + label: Mean (ms) + dtype: real + default: '1000' +- id: std + label: Std (ms) + dtype: real + default: '100' + +inputs: +- domain: message + id: set_msg + optional: true + +outputs: +- domain: message + id: strobe + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.message_strobe_random(${msg}, ${dist}, ${mean}, ${std}) + callbacks: + - set_msg(${msg}) + - set_dist(${dist}) + - set_mean(${mean}) + - set_std(${std}) + +documentation: |- + Please note some peculiarities below: + - poisson does not care about your std + - gaussian operates as expected + - uniform is actually of the range (mean-std, mean+std) - thus we are lieing and it is not actually an std here + +file_format: 1 diff --git a/gr-blocks/grc/blocks_message_strobe_random.xml b/gr-blocks/grc/blocks_message_strobe_random.xml deleted file mode 100644 index 573db58aef..0000000000 --- a/gr-blocks/grc/blocks_message_strobe_random.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Message Strobe -################################################### - --> -<block> - <name>Message Strobe Random-Delay</name> - <key>blocks_message_strobe_random</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.message_strobe_random($msg, $dist, $mean, $std)</make> - <callback>set_msg($msg)</callback> - <callback>set_dist($dist)</callback> - <callback>set_mean($mean)</callback> - <callback>set_std($std)</callback> - <param> - <name>Message PMT</name> - <key>msg</key> - <value>pmt.intern("TEST")</value> - <type>raw</type> - </param> - <param> - <name>Distribution</name> - <key>dist</key> - <type>enum</type> - <option> - <name>Poisson</name> - <key>blocks.STROBE_POISSON</key> - </option> - <option> - <name>Uniform</name> - <key>blocks.STROBE_UNIFORM</key> - </option> - <option> - <name>Gaussian</name> - <key>blocks.STROBE_GAUSSIAN</key> - </option> - </param> - <param> - <name>Mean (ms)</name> - <key>mean</key> - <value>1000</value> - <type>real</type> - </param> - <param> - <name>Std (ms)</name> - <key>std</key> - <value>100</value> - <type>real</type> - </param> - <sink> - <name>set_msg</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>strobe</name> - <type>message</type> - <optional>1</optional> - </source> - - <doc> - Please note some peculiarities below: - - poisson does not care about your std - - gaussian operates as expected - - uniform is actually of the range (mean-std, mean+std) - thus we are lieing and it is not actually an std here - </doc> -</block> diff --git a/gr-blocks/grc/blocks_min_xx.block.yml b/gr-blocks/grc/blocks_min_xx.block.yml new file mode 100644 index 0000000000..511d67c145 --- /dev/null +++ b/gr-blocks/grc/blocks_min_xx.block.yml @@ -0,0 +1,47 @@ +id: blocks_min_xx +label: Min + +parameters: +- id: type + label: IO Type + dtype: enum + options: [float, int, short] + option_attributes: + fcn: [ff, ii, ss] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '1' + hide: part +- id: vlen + label: Input Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: vlen_out + label: Output Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen_out } + +asserts: +- ${ num_inputs >= 1 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.min_${type.fcn}(${vlen},${vlen_out}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_min_xx.xml b/gr-blocks/grc/blocks_min_xx.xml deleted file mode 100644 index 406f7a11e1..0000000000 --- a/gr-blocks/grc/blocks_min_xx.xml +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Min: -## 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Min</name> - <key>blocks_min_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.min_$(type.fcn)($vlen,$vlen_out)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Input Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Output Vec Length</name> - <key>vlen_out</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs >= 1</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen_out</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_moving_average_xx.block.yml b/gr-blocks/grc/blocks_moving_average_xx.block.yml new file mode 100644 index 0000000000..6b12355894 --- /dev/null +++ b/gr-blocks/grc/blocks_moving_average_xx.block.yml @@ -0,0 +1,49 @@ +id: blocks_moving_average_xx +label: Moving Average + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + scale: [complex, real, int, int] + hide: part +- id: length + label: Length + dtype: int + default: '1000' +- id: scale + label: Scale + dtype: ${ type.scale } + default: '1' +- id: max_iter + label: Max Iter + dtype: int + default: '4000' +- id: vlen + label: Length of Vectors + dtype: int + default: 1 + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.moving_average_${type.fcn}(${length}, ${scale}, ${max_iter}, ${vlen}) + callbacks: + - set_length_and_scale(${length}, ${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_moving_average_xx.xml b/gr-blocks/grc/blocks_moving_average_xx.xml deleted file mode 100644 index 00c5e1d486..0000000000 --- a/gr-blocks/grc/blocks_moving_average_xx.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Moving Average -################################################### - --> -<block> - <name>Moving Average</name> - <key>blocks_moving_average_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.moving_average_$(type.fcn)($length, $scale, $max_iter, $vlen)</make> - <callback>set_length_and_scale($length, $scale)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - <opt>scale:complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - <opt>scale:real</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - <opt>scale:int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - <opt>scale:int</opt> - </option> - </param> - <param> - <name>Length</name> - <key>length</key> - <value>1000</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>$type.scale</type> - </param> - <param> - <name>Max Iter</name> - <key>max_iter</key> - <value>4000</value> - <type>int</type> - </param> - <param> - <name>Length of Vectors</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_multiply_by_tag_value_cc.block.yml b/gr-blocks/grc/blocks_multiply_by_tag_value_cc.block.yml new file mode 100644 index 0000000000..f6b72edf36 --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_by_tag_value_cc.block.yml @@ -0,0 +1,25 @@ +id: blocks_multiply_by_tag_value_cc +label: Multiply by Tag Value + +parameters: +- id: tagname + label: Tag Name + dtype: string +- id: vlen + label: Vec Length + dtype: int + default: '1' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_by_tag_value_cc(${tagname}, ${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_by_tag_value_cc.xml b/gr-blocks/grc/blocks_multiply_by_tag_value_cc.xml deleted file mode 100644 index cedca12bd1..0000000000 --- a/gr-blocks/grc/blocks_multiply_by_tag_value_cc.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> - -<block> - <name>Multiply by Tag Value</name> - <key>blocks_multiply_by_tag_value_cc</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_by_tag_value_cc($tagname, $vlen)</make> - - <param> - <name>Tag Name</name> - <key>tagname</key> - <type>string</type> - </param> - - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - - <sink> - <name>in</name> - <type>complex</type> - </sink> - - <source> - <name>out</name> - <type>complex</type> - </source> - -</block> diff --git a/gr-blocks/grc/blocks_multiply_conjugate_cc.block.yml b/gr-blocks/grc/blocks_multiply_conjugate_cc.block.yml new file mode 100644 index 0000000000..aceabc643e --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_conjugate_cc.block.yml @@ -0,0 +1,33 @@ +id: blocks_multiply_conjugate_cc +label: Multiply Conjugate + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- label: in0 + domain: stream + dtype: complex + vlen: ${ vlen } +- label: in1 + domain: stream + dtype: complex + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: complex + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_conjugate_cc(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_conjugate_cc.xml b/gr-blocks/grc/blocks_multiply_conjugate_cc.xml deleted file mode 100644 index cf0acf4d81..0000000000 --- a/gr-blocks/grc/blocks_multiply_conjugate_cc.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Multiply Conjugate Block: -## 2 complex inputs, 1 complex output -################################################### - --> -<block> - <name>Multiply Conjugate</name> - <key>blocks_multiply_conjugate_cc</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_conjugate_cc($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in0</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <sink> - <name>in1</name> - <type>complex</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>complex</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_multiply_const_vxx.block.yml b/gr-blocks/grc/blocks_multiply_const_vxx.block.yml new file mode 100644 index 0000000000..fe7efa4647 --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_const_vxx.block.yml @@ -0,0 +1,43 @@ +id: blocks_multiply_const_vxx +label: Multiply Const + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + const_type: [complex_vector, real_vector, int_vector, int_vector] + fcn: [cc, ff, ii, ss] + hide: part +- id: const + label: Constant + dtype: ${ type.const_type } + default: '0' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ len(const) == vlen } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_const_v${type.fcn}(${const}) + callbacks: + - set_k(${const}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_const_vxx.xml b/gr-blocks/grc/blocks_multiply_const_vxx.xml deleted file mode 100644 index 6162621d33..0000000000 --- a/gr-blocks/grc/blocks_multiply_const_vxx.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Multiply Const Block: -## all types, 1 output, 1 input & const -################################################### - --> -<block> - <name>Multiply Const</name> - <key>blocks_multiply_const_vxx</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_const_v$(type.fcn)($const)</make> - <callback>set_k($const)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>const_type:complex_vector</opt> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>const_type:real_vector</opt> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>const_type:int_vector</opt> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>const_type:int_vector</opt> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Constant</name> - <key>const</key> - <value>0</value> - <type>$type.const_type</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>len($const) == $vlen</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_multiply_const_xx.block.yml b/gr-blocks/grc/blocks_multiply_const_xx.block.yml new file mode 100644 index 0000000000..168de84809 --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_const_xx.block.yml @@ -0,0 +1,41 @@ +id: blocks_multiply_const_xx +label: Fast Multiply Const + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: const + label: Constant + dtype: ${ type } + default: '0' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_const_${type.fcn}(${const}) + callbacks: + - set_k(${const}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_const_xx.xml b/gr-blocks/grc/blocks_multiply_const_xx.xml deleted file mode 100644 index db8b5211e6..0000000000 --- a/gr-blocks/grc/blocks_multiply_const_xx.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Fast Multiply Const Block: -## all types, 1 output, 1 input & const -################################################### - --> -<block> - <name>Fast Multiply Const</name> - <key>blocks_multiply_const_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_const_$(type.fcn)($const)</make> - <callback>set_k($const)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Constant</name> - <key>const</key> - <value>0</value> - <type>$type</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_multiply_matrix_xx.block.yml b/gr-blocks/grc/blocks_multiply_matrix_xx.block.yml new file mode 100644 index 0000000000..21a66b4f8e --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_matrix_xx.block.yml @@ -0,0 +1,47 @@ +id: blocks_multiply_matrix_xx +label: Multiply by Matrix + +parameters: +- id: type + label: IO Type + dtype: enum + options: [float, complex] + option_attributes: + fcn: [ff, cc] + hide: part +- id: A + label: Matrix A + dtype: raw + default: ((1, 0), (0, 1)) + hide: part +- id: tag_propagation_policy + label: TPP + dtype: enum + options: [gr.TPP_ALL_TO_ALL, gr.TPP_ONE_TO_ONE, gr.TPP_DONT, gr.TPP_CUSTOM] + option_labels: [All to All, One to One, No Propagation, Matrix-Defined] + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ len(A[0]) } +- domain: message + id: set_A + optional: true + +outputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ len(A) } + +asserts: +- ${ len(A) > 0 } +- ${ len(A[0]) > 0 } +- ${ tag_propagation_policy != gr.TPP_ONE_TO_ONE or (len(A) == len(A[0])) } + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_matrix_${type.fcn}(${A}, ${tag_propagation_policy}) + callbacks: + - set_A(${A}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_matrix_xx.xml b/gr-blocks/grc/blocks_multiply_matrix_xx.xml deleted file mode 100644 index bb1d77c0ba..0000000000 --- a/gr-blocks/grc/blocks_multiply_matrix_xx.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Multiply by Matrix</name> - <key>blocks_multiply_matrix_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_matrix_$(type.fcn)($A, $tag_propagation_policy)</make> - <callback>set_A($A)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - </param> - <param> - <name>Matrix A</name> - <key>A</key> - <value>((1, 0), (0, 1))</value> - <type>raw</type> - </param> - <param> - <name>TPP</name> - <key>tag_propagation_policy</key> - <type>enum</type> - <option> - <name>All to All</name> - <key>gr.TPP_ALL_TO_ALL</key> - </option> - <option> - <name>One to One</name> - <key>gr.TPP_ONE_TO_ONE</key> - </option> - <option> - <name>No Propagation</name> - <key>gr.TPP_DONT</key> - </option> - <option> - <name>Matrix-Defined</name> - <key>gr.TPP_CUSTOM</key> - </option> - </param> - <check>len($A) > 0</check> - <check>len(${A}[0]) > 0</check> - <check>$tag_propagation_policy != gr.TPP_ONE_TO_ONE or (len($A) == len(${A}[0]))</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>len(${A}[0])</nports> - </sink> - <sink> - <name>set_A</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>$type</type> - <nports>len($A)</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_multiply_xx.block.yml b/gr-blocks/grc/blocks_multiply_xx.block.yml new file mode 100644 index 0000000000..41c28458a8 --- /dev/null +++ b/gr-blocks/grc/blocks_multiply_xx.block.yml @@ -0,0 +1,42 @@ +id: blocks_multiply_xx +label: Multiply + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_inputs > 1 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.multiply_v${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_multiply_xx.xml b/gr-blocks/grc/blocks_multiply_xx.xml deleted file mode 100644 index 15f0241427..0000000000 --- a/gr-blocks/grc/blocks_multiply_xx.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Multiply Block: -## all types, 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Multiply</name> - <key>blocks_multiply_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.multiply_v$(type.fcn)($vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs > 1</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_mute_xx.block.yml b/gr-blocks/grc/blocks_mute_xx.block.yml new file mode 100644 index 0000000000..8e36c568d1 --- /dev/null +++ b/gr-blocks/grc/blocks_mute_xx.block.yml @@ -0,0 +1,35 @@ +id: blocks_mute_xx +label: Mute + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: mute + label: Mute + dtype: raw + default: 'False' + options: ['True', 'False'] + +inputs: +- domain: stream + dtype: ${ type } +- domain: message + id: set_mute + optional: true + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.mute_${type.fcn}(bool(${mute})) + callbacks: + - set_mute(bool(${mute})) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_mute_xx.xml b/gr-blocks/grc/blocks_mute_xx.xml deleted file mode 100644 index 74c22ec83a..0000000000 --- a/gr-blocks/grc/blocks_mute_xx.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Mute Block: -## Cast input to bool. -################################################### - --> -<block> - <name>Mute</name> - <key>blocks_mute_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.mute_$(type.fcn)(bool($mute))</make> - <callback>set_mute(bool($mute))</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Mute</name> - <key>mute</key> - <value>False</value> - <type>raw</type> - <option> - <name>True</name> - <key>True</key> - </option> - <option> - <name>False</name> - <key>False</key> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <sink> - <name>set_mute</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_nlog10_ff.block.yml b/gr-blocks/grc/blocks_nlog10_ff.block.yml new file mode 100644 index 0000000000..004e72b4ec --- /dev/null +++ b/gr-blocks/grc/blocks_nlog10_ff.block.yml @@ -0,0 +1,37 @@ +id: blocks_nlog10_ff +label: Log10 + +parameters: +- id: n + label: n + dtype: real + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: k + label: k + dtype: real + default: '0' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +asserts: +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.nlog10_ff(${n}, ${vlen}, ${k}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_nlog10_ff.xml b/gr-blocks/grc/blocks_nlog10_ff.xml deleted file mode 100644 index 884f4a444e..0000000000 --- a/gr-blocks/grc/blocks_nlog10_ff.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Log10 Block: -## float in/ float out -################################################### - --> -<block> - <name>Log10</name> - <key>blocks_nlog10_ff</key> - <import>from gnuradio import blocks</import> - <make>blocks.nlog10_ff($n, $vlen, $k)</make> - <param> - <name>n</name> - <key>n</key> - <value>1</value> - <type>real</type> - </param> - <param> - <name>k</name> - <key>k</key> - <value>0</value> - <type>real</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_nop.block.yml b/gr-blocks/grc/blocks_nop.block.yml new file mode 100644 index 0000000000..5e47e813ad --- /dev/null +++ b/gr-blocks/grc/blocks_nop.block.yml @@ -0,0 +1,44 @@ +id: blocks_nop +label: Nop + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_ports + label: Num Ports + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_ports } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_ports } + +asserts: +- ${ num_ports > 0 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.nop(${type.size}*${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_nop.xml b/gr-blocks/grc/blocks_nop.xml deleted file mode 100644 index d38c23839d..0000000000 --- a/gr-blocks/grc/blocks_nop.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Nop -################################################### - --> -<block> - <name>Nop</name> - <key>blocks_nop</key> - <import>from gnuradio import blocks</import> - <make>blocks.nop($type.size*$vlen)</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Ports</name> - <key>num_ports</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_ports > 0</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_ports</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_not_xx.block.yml b/gr-blocks/grc/blocks_not_xx.block.yml new file mode 100644 index 0000000000..63ec98a42a --- /dev/null +++ b/gr-blocks/grc/blocks_not_xx.block.yml @@ -0,0 +1,25 @@ +id: blocks_not_xx +label: Not + +parameters: +- id: type + label: IO Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.not_${type.fcn}() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_not_xx.xml b/gr-blocks/grc/blocks_not_xx.xml deleted file mode 100644 index fe8916d8b3..0000000000 --- a/gr-blocks/grc/blocks_not_xx.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Logical Not Block -################################################### - --> -<block> - <name>Not</name> - <key>blocks_not_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.not_$(type.fcn)()</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_null_sink.block.yml b/gr-blocks/grc/blocks_null_sink.block.yml new file mode 100644 index 0000000000..c9530f99de --- /dev/null +++ b/gr-blocks/grc/blocks_null_sink.block.yml @@ -0,0 +1,43 @@ +id: blocks_null_sink +label: Null Sink + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: num_inputs + label: Num Inputs + dtype: int + default: '1' + hide: part +- id: bus_conns + label: Bus Connections + dtype: raw + default: '[[0,],]' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +asserts: +- ${ num_inputs >= 1 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.null_sink(${type.size}*${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_null_sink.xml b/gr-blocks/grc/blocks_null_sink.xml deleted file mode 100644 index f2907d20bd..0000000000 --- a/gr-blocks/grc/blocks_null_sink.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Null Sink -################################################### - --> -<block> - <name>Null Sink</name> - <key>blocks_null_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.null_sink($type.size*$vlen)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Bus Connections</name> - <key>bus_conns</key> - <value>[[0,],]</value> - <type>raw</type> - <hide>part</hide> - </param> - <check>$num_inputs >= 1</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <bus_structure_sink>$bus_conns</bus_structure_sink> -</block> - diff --git a/gr-blocks/grc/blocks_null_source.block.yml b/gr-blocks/grc/blocks_null_source.block.yml new file mode 100644 index 0000000000..0678687a8d --- /dev/null +++ b/gr-blocks/grc/blocks_null_source.block.yml @@ -0,0 +1,39 @@ +id: blocks_null_source +label: Null Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: num_outputs + label: Num Outputs + dtype: int + default: '1' + hide: part +- id: bus_conns + label: Bus Connections + dtype: raw + default: '[[0,],]' + hide: part + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_outputs } + +templates: + imports: from gnuradio import blocks + make: blocks.null_source(${type.size}*${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_null_source.xml b/gr-blocks/grc/blocks_null_source.xml deleted file mode 100644 index 9c109e651f..0000000000 --- a/gr-blocks/grc/blocks_null_source.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Null Source -################################################### - --> -<block> - <name>Null Source</name> - <key>blocks_null_source</key> - <import>from gnuradio import blocks</import> - <make>blocks.null_source($type.size*$vlen)</make> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Num Outputs</name> - <key>num_outputs</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Bus Connections</name> - <key>bus_conns</key> - <value>[[0,],]</value> - <type>raw</type> - <hide>part</hide> - </param> - <check>$num_outputs >= 1</check> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_outputs</nports> - </source> - <bus_structure_source>$bus_conns</bus_structure_source> -</block> diff --git a/gr-blocks/grc/blocks_or_xx.block.yml b/gr-blocks/grc/blocks_or_xx.block.yml new file mode 100644 index 0000000000..a28a951712 --- /dev/null +++ b/gr-blocks/grc/blocks_or_xx.block.yml @@ -0,0 +1,34 @@ +id: blocks_or_xx +label: Or + +parameters: +- id: type + label: IO Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + +asserts: +- ${ num_inputs >= 2 } + +templates: + imports: from gnuradio import blocks + make: blocks.or_${type.fcn}() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_or_xx.xml b/gr-blocks/grc/blocks_or_xx.xml deleted file mode 100644 index 400c093892..0000000000 --- a/gr-blocks/grc/blocks_or_xx.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Logical Or Block -################################################### - --> -<block> - <name>Or</name> - <key>blocks_or_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.or_$(type.fcn)()</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <check>$num_inputs >= 2</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_pack_k_bits_bb.block.yml b/gr-blocks/grc/blocks_pack_k_bits_bb.block.yml new file mode 100644 index 0000000000..904f382f0f --- /dev/null +++ b/gr-blocks/grc/blocks_pack_k_bits_bb.block.yml @@ -0,0 +1,24 @@ +id: blocks_pack_k_bits_bb +label: Pack K Bits + +parameters: +- id: k + label: K + dtype: int + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.pack_k_bits_bb(${k}) + +documentation: |- + Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_pack_k_bits_bb.xml b/gr-blocks/grc/blocks_pack_k_bits_bb.xml deleted file mode 100644 index 5400eb4af9..0000000000 --- a/gr-blocks/grc/blocks_pack_k_bits_bb.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Pack K Bits -################################################### - --> -<block> - <name>Pack K Bits</name> - <key>blocks_pack_k_bits_bb</key> - <import>from gnuradio import blocks</import> - <make>blocks.pack_k_bits_bb($k)</make> - <param> - <name>K</name> - <key>k</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> - - <doc> - Pack K unpacked bits (one bit per byte) into a single packed byte containing k bits and 8 - k zeros. - </doc> - -</block> diff --git a/gr-blocks/grc/blocks_packed_to_unpacked_xx.block.yml b/gr-blocks/grc/blocks_packed_to_unpacked_xx.block.yml new file mode 100644 index 0000000000..5d49d1851c --- /dev/null +++ b/gr-blocks/grc/blocks_packed_to_unpacked_xx.block.yml @@ -0,0 +1,44 @@ +id: blocks_packed_to_unpacked_xx +label: Packed to Unpacked + +parameters: +- id: type + label: Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: bits_per_chunk + label: Bits per Chunk + dtype: int + default: '2' +- id: endianness + label: Endianness + dtype: int + options: [gr.GR_MSB_FIRST, gr.GR_LSB_FIRST] + option_labels: [MSB, LSB] +- id: num_ports + label: Num Ports + dtype: int + default: '1' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_ports } + +outputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_ports } + +asserts: +- ${ num_ports > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.packed_to_unpacked_${type.fcn}(${bits_per_chunk}, ${endianness}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_packed_to_unpacked_xx.xml b/gr-blocks/grc/blocks_packed_to_unpacked_xx.xml deleted file mode 100644 index b236a38dbc..0000000000 --- a/gr-blocks/grc/blocks_packed_to_unpacked_xx.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Packed to Unpacked -################################################### - --> -<block> - <name>Packed to Unpacked</name> - <key>blocks_packed_to_unpacked_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.packed_to_unpacked_$(type.fcn)($bits_per_chunk, $endianness)</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Bits per Chunk</name> - <key>bits_per_chunk</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Endianness</name> - <key>endianness</key> - <type>int</type> - <option> - <name>MSB</name> - <key>gr.GR_MSB_FIRST</key> - </option> - <option> - <name>LSB</name> - <key>gr.GR_LSB_FIRST</key> - </option> - </param> - <param> - <name>Num Ports</name> - <key>num_ports</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_ports > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>$num_ports</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <nports>$num_ports</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_patterned_interleaver.block.yml b/gr-blocks/grc/blocks_patterned_interleaver.block.yml new file mode 100644 index 0000000000..97f170f97e --- /dev/null +++ b/gr-blocks/grc/blocks_patterned_interleaver.block.yml @@ -0,0 +1,42 @@ +id: blocks_patterned_interleaver +label: Patterned Interleaver + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: pattern + label: Pattern + dtype: int_vector + default: '[0,0,1,2]' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ 1+max(pattern) } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.patterned_interleaver(${type.size}*${vlen}, ${pattern}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_patterned_interleaver.xml b/gr-blocks/grc/blocks_patterned_interleaver.xml deleted file mode 100644 index 8dd0fac41d..0000000000 --- a/gr-blocks/grc/blocks_patterned_interleaver.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector to Stream -################################################### - --> -<block> - <name>Patterned Interleaver</name> - <key>blocks_patterned_interleaver</key> - <import>from gnuradio import blocks</import> - <make>blocks.patterned_interleaver($type.size*$vlen, $pattern)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Pattern</name> - <key>pattern</key> - <value>[0,0,1,2]</value> - <type>int_vector</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>1+max($pattern)</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_pdu_filter.block.yml b/gr-blocks/grc/blocks_pdu_filter.block.yml new file mode 100644 index 0000000000..43d72b7480 --- /dev/null +++ b/gr-blocks/grc/blocks_pdu_filter.block.yml @@ -0,0 +1,40 @@ +id: blocks_pdu_filter +label: PDU Filter + +parameters: +- id: k + label: Key + dtype: raw + default: pmt.intern("key") +- id: v + label: Value + dtype: raw + default: pmt.intern("value") +- id: invert + label: Invert Filter + dtype: bool + default: 'False' + options: ['False', 'True'] + option_labels: ['No', 'Yes'] + +inputs: +- domain: message + id: pdus + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.pdu_filter(${k}, ${v}, ${invert}) + callbacks: + - set_key(${k}) + - set_val(${v}) + - set_inversion(${invert}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_pdu_filter.xml b/gr-blocks/grc/blocks_pdu_filter.xml deleted file mode 100644 index 0e848963de..0000000000 --- a/gr-blocks/grc/blocks_pdu_filter.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## PDU Filter -################################################### - --> -<block> - <name>PDU Filter</name> - <key>blocks_pdu_filter</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.pdu_filter($k, $v, $invert)</make> - <callback>set_key($k)</callback> - <callback>set_val($v)</callback> - <callback>set_inversion($invert)</callback> - <param> - <name>Key</name> - <key>k</key> - <value>pmt.intern("key")</value> - <type>raw</type> - </param> - <param> - <name>Value</name> - <key>v</key> - <value>pmt.intern("value")</value> - <type>raw</type> - </param> - <param> - <name>Invert Filter</name> - <key>invert</key> - <value>False</value> - <type>bool</type> - <option> - <name>No</name> - <key>False</key> - </option> - <option> - <name>Yes</name> - <key>True</key> - </option> - </param> - <sink> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_pdu_remove.block.yml b/gr-blocks/grc/blocks_pdu_remove.block.yml new file mode 100644 index 0000000000..4750ff22c4 --- /dev/null +++ b/gr-blocks/grc/blocks_pdu_remove.block.yml @@ -0,0 +1,28 @@ +id: blocks_pdu_remove +label: PDU Remove + +parameters: +- id: k + label: Key + dtype: raw + default: pmt.intern("key") + +inputs: +- domain: message + id: pdus + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.pdu_remove(${k}) + callbacks: + - set_key(${k}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_pdu_remove.xml b/gr-blocks/grc/blocks_pdu_remove.xml deleted file mode 100644 index c71da32fce..0000000000 --- a/gr-blocks/grc/blocks_pdu_remove.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## PDU Remove -################################################### - --> -<block> - <name>PDU Remove</name> - <key>blocks_pdu_remove</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.pdu_remove($k)</make> - <callback>set_key($k)</callback> - <param> - <name>Key</name> - <key>k</key> - <value>pmt.intern("key")</value> - <type>raw</type> - </param> - <sink> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_pdu_set.block.yml b/gr-blocks/grc/blocks_pdu_set.block.yml new file mode 100644 index 0000000000..44a06a2e09 --- /dev/null +++ b/gr-blocks/grc/blocks_pdu_set.block.yml @@ -0,0 +1,33 @@ +id: blocks_pdu_set +label: PDU Set + +parameters: +- id: k + label: Key + dtype: raw + default: pmt.intern("key") +- id: v + label: Value + dtype: raw + default: pmt.intern("value") + +inputs: +- domain: message + id: pdus + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.pdu_set(${k}, ${v}) + callbacks: + - set_key(${k}) + - set_val(${v}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_pdu_set.xml b/gr-blocks/grc/blocks_pdu_set.xml deleted file mode 100644 index b7a9030622..0000000000 --- a/gr-blocks/grc/blocks_pdu_set.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## PDU Set -################################################### - --> -<block> - <name>PDU Set</name> - <key>blocks_pdu_set</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.pdu_set($k, $v)</make> - <callback>set_key($k)</callback> - <callback>set_val($v)</callback> - <param> - <name>Key</name> - <key>k</key> - <value>pmt.intern("key")</value> - <type>raw</type> - </param> - <param> - <name>Value</name> - <key>v</key> - <value>pmt.intern("value")</value> - <type>raw</type> - </param> - <sink> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml b/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml new file mode 100644 index 0000000000..3b44badd4b --- /dev/null +++ b/gr-blocks/grc/blocks_pdu_to_tagged_stream.block.yml @@ -0,0 +1,29 @@ +id: blocks_pdu_to_tagged_stream +label: PDU to Tagged Stream + +parameters: +- id: type + label: Item Type + dtype: enum + options: [byte, complex, float] + option_attributes: + tv: [blocks.byte_t, blocks.complex_t, blocks.float_t] + hide: part +- id: tag + label: Length tag name + dtype: string + default: packet_len + +inputs: +- domain: message + id: pdus + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.pdu_to_tagged_stream(${type.tv}, ${tag}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_pdu_to_tagged_stream.xml b/gr-blocks/grc/blocks_pdu_to_tagged_stream.xml deleted file mode 100644 index 0835a2adee..0000000000 --- a/gr-blocks/grc/blocks_pdu_to_tagged_stream.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## PDU Message to Tagged Stream -################################################### - --> -<block> - <name>PDU to Tagged Stream</name> - <key>blocks_pdu_to_tagged_stream</key> - <import>from gnuradio import blocks</import> - <make>blocks.pdu_to_tagged_stream($type.tv, $tag)</make> - <param> - <name>Item Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>tv:blocks.byte_t</opt> - </option> - <option> - <name>Complex</name> - <key>complex</key> - <opt>tv:blocks.complex_t</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>tv:blocks.float_t</opt> - </option> - </param> - <param> - <name>Length tag name</name> - <key>tag</key> - <value>packet_len</value> - <type>string</type> - </param> - <sink> - <name>pdus</name> - <type>message</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_peak_detector2_fb.block.yml b/gr-blocks/grc/blocks_peak_detector2_fb.block.yml new file mode 100644 index 0000000000..0950640ae2 --- /dev/null +++ b/gr-blocks/grc/blocks_peak_detector2_fb.block.yml @@ -0,0 +1,38 @@ +id: blocks_peak_detector2_fb +label: Peak Detector2 + +parameters: +- id: threshold_factor_rise + label: TH Factor Rise + dtype: real + default: '7' +- id: look_ahead + label: Look Ahead + dtype: int + default: '1000' +- id: alpha + label: Alpha + dtype: real + default: '0.001' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte +- label: debug + domain: stream + dtype: float + optional: true + +templates: + imports: from gnuradio import blocks + make: blocks.peak_detector2_fb(${threshold_factor_rise}, ${look_ahead}, ${alpha}) + callbacks: + - set_threshold_factor_rise(${threshold_factor_rise}) + - set_look_ahead(${look_ahead}) + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_peak_detector2_fb.xml b/gr-blocks/grc/blocks_peak_detector2_fb.xml deleted file mode 100644 index 0b25e01680..0000000000 --- a/gr-blocks/grc/blocks_peak_detector2_fb.xml +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Peak Detector2 -################################################### - --> -<block> - <name>Peak Detector2</name> - <key>blocks_peak_detector2_fb</key> - <import>from gnuradio import blocks</import> - <make>blocks.peak_detector2_fb($threshold_factor_rise, $look_ahead, $alpha)</make> - <callback>set_threshold_factor_rise($threshold_factor_rise)</callback> - <callback>set_look_ahead($look_ahead)</callback> - <callback>set_alpha($alpha)</callback> - <param> - <name>TH Factor Rise</name> - <key>threshold_factor_rise</key> - <value>7</value> - <type>real</type> - </param> - <param> - <name>Look Ahead</name> - <key>look_ahead</key> - <value>1000</value> - <type>int</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0.001</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> - <source> - <name>debug</name> - <type>float</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_peak_detector_xb.block.yml b/gr-blocks/grc/blocks_peak_detector_xb.block.yml new file mode 100644 index 0000000000..be0f238391 --- /dev/null +++ b/gr-blocks/grc/blocks_peak_detector_xb.block.yml @@ -0,0 +1,47 @@ +id: blocks_peak_detector_xb +label: Peak Detector + +parameters: +- id: type + label: Input Type + dtype: enum + options: [float, int, short] + option_attributes: + fcn: [f, i, s] + hide: part +- id: threshold_factor_rise + label: TH Factor Rise + dtype: real + default: '0.25' +- id: threshold_factor_fall + label: TH Factor Fall + dtype: real + default: '0.40' +- id: look_ahead + label: Look Ahead + dtype: int + default: '10' +- id: alpha + label: Alpha + dtype: real + default: '0.001' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.peak_detector_${type.fcn}b(${threshold_factor_rise}, ${threshold_factor_fall}, + ${look_ahead}, ${alpha}) + callbacks: + - set_threshold_factor_rise(${threshold_factor_rise}) + - set_threshold_factor_fall(${threshold_factor_fall}) + - set_look_ahead(${look_ahead}) + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_peak_detector_xb.xml b/gr-blocks/grc/blocks_peak_detector_xb.xml deleted file mode 100644 index 1aabf89474..0000000000 --- a/gr-blocks/grc/blocks_peak_detector_xb.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Peak Detector -################################################### - --> -<block> - <name>Peak Detector</name> - <key>blocks_peak_detector_xb</key> - <import>from gnuradio import blocks</import> - <make>blocks.peak_detector_$(type.fcn)b($threshold_factor_rise, $threshold_factor_fall, $look_ahead, $alpha)</make> - <callback>set_threshold_factor_rise($threshold_factor_rise)</callback> - <callback>set_threshold_factor_fall($threshold_factor_fall)</callback> - <callback>set_look_ahead($look_ahead)</callback> - <callback>set_alpha($alpha)</callback> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - </param> - <param> - <name>TH Factor Rise</name> - <key>threshold_factor_rise</key> - <value>0.25</value> - <type>real</type> - </param> - <param> - <name>TH Factor Fall</name> - <key>threshold_factor_fall</key> - <value>0.40</value> - <type>real</type> - </param> - <param> - <name>Look Ahead</name> - <key>look_ahead</key> - <value>10</value> - <type>int</type> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0.001</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_plateau_detector_fb.block.yml b/gr-blocks/grc/blocks_plateau_detector_fb.block.yml new file mode 100644 index 0000000000..9af55a67f9 --- /dev/null +++ b/gr-blocks/grc/blocks_plateau_detector_fb.block.yml @@ -0,0 +1,25 @@ +id: blocks_plateau_detector_fb +label: Plateau Detector + +parameters: +- id: max_len + label: Max. plateau length + dtype: int +- id: threshold + label: Threshold + dtype: real + default: '0.9' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.plateau_detector_fb(${max_len}, ${threshold}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_plateau_detector_fb.xml b/gr-blocks/grc/blocks_plateau_detector_fb.xml deleted file mode 100644 index 90f67a4cf5..0000000000 --- a/gr-blocks/grc/blocks_plateau_detector_fb.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Plateau Detector</name> - <key>blocks_plateau_detector_fb</key> - <import>from gnuradio import blocks</import> - <make>blocks.plateau_detector_fb($max_len, $threshold)</make> - <param> - <name>Max. plateau length</name> - <key>max_len</key> - <type>int</type> - </param> - <param> - <name>Threshold</name> - <key>threshold</key> - <value>0.9</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/gr-blocks/grc/blocks_probe_rate.block.yml b/gr-blocks/grc/blocks_probe_rate.block.yml new file mode 100644 index 0000000000..1f9ed65b2b --- /dev/null +++ b/gr-blocks/grc/blocks_probe_rate.block.yml @@ -0,0 +1,44 @@ +id: blocks_probe_rate +label: Probe Rate + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: mintime + label: Min Update Time (ms) + dtype: real + default: '500.0' +- id: alpha + label: Update Alpha + dtype: real + default: '0.15' + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: message + id: rate + optional: true + +asserts: +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.probe_rate(${type.size}*${vlen}, ${mintime}, ${alpha}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_probe_rate.xml b/gr-blocks/grc/blocks_probe_rate.xml deleted file mode 100644 index f79444c137..0000000000 --- a/gr-blocks/grc/blocks_probe_rate.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe Rate -################################################### - --> -<block> - <name>Probe Rate</name> - <key>blocks_probe_rate</key> - <import>from gnuradio import blocks</import> - <make>blocks.probe_rate($type.size*$vlen, $mintime, $alpha)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Min Update Time (ms)</name> - <key>mintime</key> - <value>500.0</value> - <type>real</type> - </param> - <param> - <name>Update Alpha</name> - <key>alpha</key> - <value>0.15</value> - <type>real</type> - </param> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>rate</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_probe_signal_vx.block.yml b/gr-blocks/grc/blocks_probe_signal_vx.block.yml new file mode 100644 index 0000000000..2b486a55b2 --- /dev/null +++ b/gr-blocks/grc/blocks_probe_signal_vx.block.yml @@ -0,0 +1,35 @@ +id: blocks_probe_signal_vx +label: Probe Signal Vector + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + fcn: [c, f, i, s, b] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.probe_signal_v${type.fcn}(${vlen}) + +documentation: |- + Available functions to probe: level() + + Use with the function probe block. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_probe_signal_vx.xml b/gr-blocks/grc/blocks_probe_signal_vx.xml deleted file mode 100644 index 930a49643c..0000000000 --- a/gr-blocks/grc/blocks_probe_signal_vx.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe Signal -################################################### - --> -<block> - <name>Probe Signal Vector</name> - <key>blocks_probe_signal_vx</key> - <import>from gnuradio import blocks</import> - <make>blocks.probe_signal_v$(type.fcn)($vlen)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <doc> -Available functions to probe: level() - -Use with the function probe block. - </doc> -</block> diff --git a/gr-blocks/grc/blocks_probe_signal_x.block.yml b/gr-blocks/grc/blocks_probe_signal_x.block.yml new file mode 100644 index 0000000000..0991bde99f --- /dev/null +++ b/gr-blocks/grc/blocks_probe_signal_x.block.yml @@ -0,0 +1,26 @@ +id: blocks_probe_signal_x +label: Probe Signal + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + fcn: [c, f, i, s, b] + hide: part + +inputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.probe_signal_${type.fcn}() + +documentation: |- + Available functions to probe: level() + + Use with the function probe block. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_probe_signal_x.xml b/gr-blocks/grc/blocks_probe_signal_x.xml deleted file mode 100644 index 726f0fa747..0000000000 --- a/gr-blocks/grc/blocks_probe_signal_x.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Probe Signal -################################################### - --> -<block> - <name>Probe Signal</name> - <key>blocks_probe_signal_x</key> - <import>from gnuradio import blocks</import> - <make>blocks.probe_signal_$(type.fcn)()</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <doc> -Available functions to probe: level() - -Use with the function probe block. - </doc> -</block> diff --git a/gr-blocks/grc/blocks_random_pdu.block.yml b/gr-blocks/grc/blocks_random_pdu.block.yml new file mode 100644 index 0000000000..831b7eb4c2 --- /dev/null +++ b/gr-blocks/grc/blocks_random_pdu.block.yml @@ -0,0 +1,38 @@ +id: blocks_random_pdu +label: Random PDU Generator + +parameters: +- id: minsize + label: Min Bytes + dtype: int + default: '50' +- id: maxsize + label: Max Bytes + dtype: int + default: '2000' +- id: mask + label: Byte Mask + dtype: int + default: '0xFF' +- id: length_modulo + label: Length Modulo + dtype: int + default: '2' + +inputs: +- domain: message + id: generate + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.random_pdu(${minsize}, ${maxsize}, chr(${mask}), ${length_modulo}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_random_pdu.xml b/gr-blocks/grc/blocks_random_pdu.xml deleted file mode 100644 index a70fa7fbf7..0000000000 --- a/gr-blocks/grc/blocks_random_pdu.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Random PDU -################################################### - --> -<block> - <name>Random PDU Generator</name> - <key>blocks_random_pdu</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.random_pdu($minsize, $maxsize, chr($mask), $length_modulo)</make> - <param> - <name>Min Bytes</name> - <key>minsize</key> - <value>50</value> - <type>int</type> - </param> - <param> - <name>Max Bytes</name> - <key>maxsize</key> - <value>2000</value> - <type>int</type> - </param> - <param> - <name>Byte Mask</name> - <key>mask</key> - <value>0xFF</value> - <type>int</type> - </param> - <param> - <name>Length Modulo</name> - <key>length_modulo</key> - <value>2</value> - <type>int</type> - </param> - <sink> - <name>generate</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_regenerate_bb.block.yml b/gr-blocks/grc/blocks_regenerate_bb.block.yml new file mode 100644 index 0000000000..843e680a41 --- /dev/null +++ b/gr-blocks/grc/blocks_regenerate_bb.block.yml @@ -0,0 +1,25 @@ +id: blocks_regenerate_bb +label: Regenerate + +parameters: +- id: period + label: Period + dtype: int +- id: max_regen + label: Max Regen Count + dtype: int + default: '500' + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.regenerate_bb(${period}, ${max_regen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_regenerate_bb.xml b/gr-blocks/grc/blocks_regenerate_bb.xml deleted file mode 100644 index bbee53387f..0000000000 --- a/gr-blocks/grc/blocks_regenerate_bb.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Regenerate Block: -## char in/ char out -################################################### - --> -<block> - <name>Regenerate</name> - <key>blocks_regenerate_bb</key> - <import>from gnuradio import blocks</import> - <make>blocks.regenerate_bb($period, $max_regen)</make> - <param> - <name>Period</name> - <key>period</key> - <type>int</type> - </param> - <param> - <name>Max Regen Count</name> - <key>max_regen</key> - <value>500</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_repack_bits_bb.block.yml b/gr-blocks/grc/blocks_repack_bits_bb.block.yml new file mode 100644 index 0000000000..9d5a3ba9ca --- /dev/null +++ b/gr-blocks/grc/blocks_repack_bits_bb.block.yml @@ -0,0 +1,47 @@ +id: blocks_repack_bits_bb +label: Repack Bits + +parameters: +- id: k + label: Bits per input byte + dtype: int + default: '1' +- id: l + label: Bits per output byte + dtype: int + default: '8' +- id: len_tag_key + label: Length Tag Key + dtype: string + default: '""' + hide: part +- id: align_output + label: Packet Alignment + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: [Output, Input] + hide: part +- id: endianness + label: Endianness + dtype: int + default: gr.GR_LSB_FIRST + options: [gr.GR_MSB_FIRST, gr.GR_LSB_FIRST] + option_labels: [MSB, LSB] + hide: part + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.repack_bits_bb(${k}, ${l}, ${len_tag_key}, ${align_output}, ${endianness}) + callbacks: + - set_k_and_l(${k},${l}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_repack_bits_bb.xml b/gr-blocks/grc/blocks_repack_bits_bb.xml deleted file mode 100644 index 0c107d8439..0000000000 --- a/gr-blocks/grc/blocks_repack_bits_bb.xml +++ /dev/null @@ -1,70 +0,0 @@ -<block> - <name>Repack Bits</name> - <key>blocks_repack_bits_bb</key> - <import>from gnuradio import blocks</import> - <make>blocks.repack_bits_bb($k, $l, $len_tag_key, $align_output, $endianness)</make> - <callback>set_k_and_l($k,$l)</callback> - <param> - <name>Bits per input byte</name> - <key>k</key> - <value>1</value> - <type>int</type> - </param> - - <param> - <name>Bits per output byte</name> - <key>l</key> - <value>8</value> - <type>int</type> - </param> - - <param> - <name>Length Tag Key</name> - <key>len_tag_key</key> - <value>""</value> - <type>string</type> - <hide>part</hide> - </param> - - <param> - <name>Packet Alignment</name> - <key>align_output</key> - <value>False</value> - <type>enum</type> - <hide>part</hide> - <option> - <name>Output</name> - <key>True</key> - </option> - <option> - <name>Input</name> - <key>False</key> - </option> - </param> - - <param> - <name>Endianness</name> - <key>endianness</key> - <value>gr.GR_LSB_FIRST</value> - <type>int</type> - <hide>part</hide> - <option> - <name>MSB</name> - <key>gr.GR_MSB_FIRST</key> - </option> - <option> - <name>LSB</name> - <key>gr.GR_LSB_FIRST</key> - </option> - </param> - - <sink> - <name>in</name> - <type>byte</type> - </sink> - - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_repeat.block.yml b/gr-blocks/grc/blocks_repeat.block.yml new file mode 100644 index 0000000000..809231d293 --- /dev/null +++ b/gr-blocks/grc/blocks_repeat.block.yml @@ -0,0 +1,41 @@ +id: blocks_repeat +label: Repeat + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: interp + label: Interpolation + dtype: int +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.repeat(${type.size}*${vlen}, ${interp}) + callbacks: + - set_interpolation(${interp}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_repeat.xml b/gr-blocks/grc/blocks_repeat.xml deleted file mode 100644 index 793d0148b2..0000000000 --- a/gr-blocks/grc/blocks_repeat.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Repeat -################################################### - --> -<block> - <name>Repeat</name> - <key>blocks_repeat</key> - <import>from gnuradio import blocks</import> - <make>blocks.repeat($type.size*$vlen, $interp)</make> - <callback>set_interpolation($interp)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Interpolation</name> - <key>interp</key> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_rms_xx.block.yml b/gr-blocks/grc/blocks_rms_xx.block.yml new file mode 100644 index 0000000000..ca5e8df124 --- /dev/null +++ b/gr-blocks/grc/blocks_rms_xx.block.yml @@ -0,0 +1,31 @@ +id: blocks_rms_xx +label: RMS + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float] + option_attributes: + fcn: [c, f] + hide: part +- id: alpha + label: Alpha + dtype: real + default: '0.0001' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import blocks + make: blocks.rms_${type.fcn}f(${alpha}) + callbacks: + - set_alpha(${alpha}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_rms_xx.xml b/gr-blocks/grc/blocks_rms_xx.xml deleted file mode 100644 index 0ae09139a6..0000000000 --- a/gr-blocks/grc/blocks_rms_xx.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##RMS -################################################### - --> -<block> - <name>RMS</name> - <key>blocks_rms_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.rms_$(type.fcn)f($alpha)</make> - <callback>set_alpha($alpha)</callback> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - </param> - <param> - <name>Alpha</name> - <key>alpha</key> - <value>0.0001</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_rotator_cc.block.yml b/gr-blocks/grc/blocks_rotator_cc.block.yml new file mode 100644 index 0000000000..d65fbd5997 --- /dev/null +++ b/gr-blocks/grc/blocks_rotator_cc.block.yml @@ -0,0 +1,24 @@ +id: blocks_rotator_cc +label: Rotator + +parameters: +- id: phase_inc + label: Phase Increment + dtype: real + default: '0.0' + +inputs: +- domain: stream + dtype: complex + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.rotator_cc(${phase_inc}) + callbacks: + - set_phase_inc(${phase_inc}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_rotator_cc.xml b/gr-blocks/grc/blocks_rotator_cc.xml deleted file mode 100644 index aa011b80e0..0000000000 --- a/gr-blocks/grc/blocks_rotator_cc.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Complex rotator -################################################### - --> -<block> - <name>Rotator</name> - <key>blocks_rotator_cc</key> - <import>from gnuradio import blocks</import> - <make>blocks.rotator_cc($phase_inc)</make> - <callback>set_phase_inc($phase_inc)</callback> - <param> - <name>Phase Increment</name> - <key>phase_inc</key> - <value>0.0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_sample_and_hold_xx.block.yml b/gr-blocks/grc/blocks_sample_and_hold_xx.block.yml new file mode 100644 index 0000000000..893e7862b2 --- /dev/null +++ b/gr-blocks/grc/blocks_sample_and_hold_xx.block.yml @@ -0,0 +1,28 @@ +id: blocks_sample_and_hold_xx +label: Sample and Hold + +parameters: +- id: type + label: Type + dtype: enum + options: [float, int, short, byte] + option_attributes: + fcn: [ff, ii, ss, bb] + hide: part + +inputs: +- domain: stream + dtype: ${ type } +- label: ctrl + domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.sample_and_hold_${type.fcn}() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_sample_and_hold_xx.xml b/gr-blocks/grc/blocks_sample_and_hold_xx.xml deleted file mode 100644 index 1583204c02..0000000000 --- a/gr-blocks/grc/blocks_sample_and_hold_xx.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Sample and Hold -################################################### - --> -<block> - <name>Sample and Hold</name> - <key>blocks_sample_and_hold_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.sample_and_hold_$(type.fcn)()</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <sink> - <name>ctrl</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_short_to_char.block.yml b/gr-blocks/grc/blocks_short_to_char.block.yml new file mode 100644 index 0000000000..d24df725da --- /dev/null +++ b/gr-blocks/grc/blocks_short_to_char.block.yml @@ -0,0 +1,25 @@ +id: blocks_short_to_char +label: Short To Char + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: short + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: byte + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.short_to_char(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_short_to_char.xml b/gr-blocks/grc/blocks_short_to_char.xml deleted file mode 100644 index 1951333d1a..0000000000 --- a/gr-blocks/grc/blocks_short_to_char.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Short to char: -################################################### - --> -<block> - <name>Short To Char</name> - <key>blocks_short_to_char</key> - <import>from gnuradio import blocks</import> - <make>blocks.short_to_char($vlen)</make> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>short</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>byte</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_short_to_float.block.yml b/gr-blocks/grc/blocks_short_to_float.block.yml new file mode 100644 index 0000000000..8ad5f7ed13 --- /dev/null +++ b/gr-blocks/grc/blocks_short_to_float.block.yml @@ -0,0 +1,31 @@ +id: blocks_short_to_float +label: Short To Float + +parameters: +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: scale + label: Scale + dtype: real + default: '1' + +inputs: +- domain: stream + dtype: short + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.short_to_float(${vlen}, ${scale}) + callbacks: + - set_scale(${scale}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_short_to_float.xml b/gr-blocks/grc/blocks_short_to_float.xml deleted file mode 100644 index 23ea019bc2..0000000000 --- a/gr-blocks/grc/blocks_short_to_float.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Short to Float: -################################################### - --> -<block> - <name>Short To Float</name> - <key>blocks_short_to_float</key> - <import>from gnuradio import blocks</import> - <make>blocks.short_to_float($vlen, $scale)</make> - <callback>set_scale($scale)</callback> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Scale</name> - <key>scale</key> - <value>1</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>short</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_skiphead.block.yml b/gr-blocks/grc/blocks_skiphead.block.yml new file mode 100644 index 0000000000..c0f10eb2d1 --- /dev/null +++ b/gr-blocks/grc/blocks_skiphead.block.yml @@ -0,0 +1,40 @@ +id: blocks_skiphead +label: Skip Head + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_items + label: Num Items + dtype: int + default: '1024' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.skiphead(${type.size}*${vlen}, ${num_items}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_skiphead.xml b/gr-blocks/grc/blocks_skiphead.xml deleted file mode 100644 index 7d90862830..0000000000 --- a/gr-blocks/grc/blocks_skiphead.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Skip Head -################################################### - --> -<block> - <name>Skip Head</name> - <key>blocks_skiphead</key> - <import>from gnuradio import blocks</import> - <make>blocks.skiphead($type.size*$vlen, $num_items)</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Items</name> - <key>num_items</key> - <value>1024</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_socket_pdu.block.yml b/gr-blocks/grc/blocks_socket_pdu.block.yml new file mode 100644 index 0000000000..9869219047 --- /dev/null +++ b/gr-blocks/grc/blocks_socket_pdu.block.yml @@ -0,0 +1,63 @@ +id: blocks_socket_pdu +label: Socket PDU + +parameters: +- id: type + label: Type + dtype: enum + default: TCP_SERVER + options: ['"TCP_SERVER"', '"TCP_CLIENT"', '"UDP_SERVER"', '"UDP_CLIENT"'] + option_labels: [TCP Server, TCP Client, UDP Server, UDP Client] +- id: host + label: Host + dtype: string +- id: port + label: Port + dtype: string + default: '52001' +- id: mtu + label: MTU + dtype: int + default: '10000' +- id: tcp_no_delay + label: TCP No Delay + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: [Enabled, Disabled] + hide: '${ #if ((type == ''"TCP_CLIENT"'') or (type == ''"TCP_SERVER"'')) + + #if (str(tcp_no_delay) == ''False'') + + part + + #else + + none + + #end if + + #else + + all + + #end if }' + +inputs: +- domain: message + id: pdus + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: from gnuradio import blocks + make: blocks.socket_pdu(${type}, ${host}, ${port}, ${mtu}, ${tcp_no_delay}) + +documentation: |- + For server modes, leave Host blank to bind to all interfaces (equivalent to 0.0.0.0). + +file_format: 1 diff --git a/gr-blocks/grc/blocks_socket_pdu.xml b/gr-blocks/grc/blocks_socket_pdu.xml deleted file mode 100644 index 72dc38134c..0000000000 --- a/gr-blocks/grc/blocks_socket_pdu.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Socket PDU Message source/sink -################################################### - --> -<block> - <name>Socket PDU</name> - <key>blocks_socket_pdu</key> - <import>from gnuradio import blocks</import> - <make>blocks.socket_pdu($type, $host, $port, $mtu, $tcp_no_delay)</make> - <param> - <name>Type</name> - <key>type</key> - <value>TCP_SERVER</value> - <type>enum</type> - <option> - <name>TCP Server</name> - <key>"TCP_SERVER"</key> - </option> - <option> - <name>TCP Client</name> - <key>"TCP_CLIENT"</key> - </option> - <option> - <name>UDP Server</name> - <key>"UDP_SERVER"</key> - </option> - <option> - <name>UDP Client</name> - <key>"UDP_CLIENT"</key> - </option> - </param> - <param> - <name>Host</name> - <key>host</key> - <value></value> - <type>string</type> - </param> - <param> - <name>Port</name> - <key>port</key> - <value>52001</value> - <type>string</type> - </param> - <param> - <name>MTU</name> - <key>mtu</key> - <value>10000</value> - <type>int</type> - </param> - <param> - <name>TCP No Delay</name> - <key>tcp_no_delay</key> - <value>False</value> - <type>enum</type> - <hide> -#if (($type() == '"TCP_CLIENT"') or ($type() == '"TCP_SERVER"')) -#if (str($tcp_no_delay()) == 'False') -part -#else -none -#end if -#else -all -#end if -</hide> - <option> - <name>Enabled</name> - <key>True</key> - </option> - <option> - <name>Disabled</name> - <key>False</key> - </option> - </param> - <sink> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> - <doc>For server modes, leave Host blank to bind to all interfaces (equivalent to 0.0.0.0).</doc> -</block> diff --git a/gr-blocks/grc/blocks_stream_mux.block.yml b/gr-blocks/grc/blocks_stream_mux.block.yml new file mode 100644 index 0000000000..27d3baf89f --- /dev/null +++ b/gr-blocks/grc/blocks_stream_mux.block.yml @@ -0,0 +1,48 @@ +id: blocks_stream_mux +label: Stream Mux + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: lengths + label: Lengths + dtype: int_vector + default: 1, 1 +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_inputs > 0 } +- ${ num_inputs == len(lengths) } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.stream_mux(${type.size}*${vlen}, ${lengths}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stream_mux.xml b/gr-blocks/grc/blocks_stream_mux.xml deleted file mode 100644 index 5e56a65d91..0000000000 --- a/gr-blocks/grc/blocks_stream_mux.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Stream Mux: -## all types, many inputs, only one output -################################################### - --> -<block> - <name>Stream Mux</name> - <key>blocks_stream_mux</key> - <import>from gnuradio import blocks</import> - <make>blocks.stream_mux($type.size*$vlen, $lengths)</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Lengths</name> - <key>lengths</key> - <value>1, 1</value> - <type>int_vector</type> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_inputs > 0</check> - <check>$num_inputs == len($lengths)</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_stream_to_streams.block.yml b/gr-blocks/grc/blocks_stream_to_streams.block.yml new file mode 100644 index 0000000000..16adb159a3 --- /dev/null +++ b/gr-blocks/grc/blocks_stream_to_streams.block.yml @@ -0,0 +1,43 @@ +id: blocks_stream_to_streams +label: Stream to Streams + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.stream_to_streams(${type.size}*${vlen}, ${num_streams}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stream_to_streams.xml b/gr-blocks/grc/blocks_stream_to_streams.xml deleted file mode 100644 index c164e477b7..0000000000 --- a/gr-blocks/grc/blocks_stream_to_streams.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Stream to Streams -################################################### - --> -<block> - <name>Stream to Streams</name> - <key>blocks_stream_to_streams</key> - <import>from gnuradio import blocks</import> - <make>blocks.stream_to_streams($type.size*$vlen, $num_streams)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_stream_to_tagged_stream.block.yml b/gr-blocks/grc/blocks_stream_to_tagged_stream.block.yml new file mode 100644 index 0000000000..db75c20dd7 --- /dev/null +++ b/gr-blocks/grc/blocks_stream_to_tagged_stream.block.yml @@ -0,0 +1,43 @@ +id: blocks_stream_to_tagged_stream +label: Stream to Tagged Stream + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vector Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: packet_len + label: Packet Length + dtype: int +- id: len_tag_key + label: Length Tag Key + dtype: string + default: '"packet_len"' + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.stream_to_tagged_stream(${type.size}, ${vlen}, ${packet_len}, ${len_tag_key}) + callbacks: + - set_packet_len(${packet_len}) + - set_packet_len_pmt(${packet_len}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stream_to_tagged_stream.xml b/gr-blocks/grc/blocks_stream_to_tagged_stream.xml deleted file mode 100644 index c2af70c2af..0000000000 --- a/gr-blocks/grc/blocks_stream_to_tagged_stream.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Stream to Tagged Stream</name> - <key>blocks_stream_to_tagged_stream</key> - <import>from gnuradio import blocks</import> - <make>blocks.stream_to_tagged_stream($type.size, $vlen, $packet_len, $len_tag_key)</make> - <callback>set_packet_len($packet_len)</callback> - <callback>set_packet_len_pmt($packet_len)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vector Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Packet Length</name> - <key>packet_len</key> - <type>int</type> - </param> - <param> - <name>Length Tag Key</name> - <key>len_tag_key</key> - <value>"packet_len"</value> - <type>string</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_stream_to_vector.block.yml b/gr-blocks/grc/blocks_stream_to_vector.block.yml new file mode 100644 index 0000000000..73e177d0c7 --- /dev/null +++ b/gr-blocks/grc/blocks_stream_to_vector.block.yml @@ -0,0 +1,42 @@ +id: blocks_stream_to_vector +label: Stream to Vector + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_items + label: Num Items + dtype: int + default: '2' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen*num_items } + +asserts: +- ${ num_items > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.stream_to_vector(${type.size}*${vlen}, ${num_items}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stream_to_vector.xml b/gr-blocks/grc/blocks_stream_to_vector.xml deleted file mode 100644 index 8965dfbfe8..0000000000 --- a/gr-blocks/grc/blocks_stream_to_vector.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Stream to Vector -################################################### - --> -<block> - <name>Stream to Vector</name> - <key>blocks_stream_to_vector</key> - <import>from gnuradio import blocks</import> - <make>blocks.stream_to_vector($type.size*$vlen, $num_items)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Items</name> - <key>num_items</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_items > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen*$num_items</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_stream_to_vector_decimator.block.yml b/gr-blocks/grc/blocks_stream_to_vector_decimator.block.yml new file mode 100644 index 0000000000..7c48016de3 --- /dev/null +++ b/gr-blocks/grc/blocks_stream_to_vector_decimator.block.yml @@ -0,0 +1,47 @@ +id: blocks_stream_to_vector_decimator +label: Stream to Vec Decim + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: sample_rate + label: Sample Rate + dtype: real + default: samp_rate +- id: vec_rate + label: Vec Rate + dtype: real + default: '30' +- id: vlen + label: Vec Length + dtype: int + default: '1024' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: "blocks.stream_to_vector_decimator(\n\titem_size=${type.size},\n\tsample_rate=${sample_rate},\n\ + \tvec_rate=${vec_rate},\n\tvec_len=${vlen},\n)" + callbacks: + - set_sample_rate(${sample_rate}) + - set_vec_rate(${vec_rate}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stream_to_vector_decimator.xml b/gr-blocks/grc/blocks_stream_to_vector_decimator.xml deleted file mode 100644 index ca71cf17ff..0000000000 --- a/gr-blocks/grc/blocks_stream_to_vector_decimator.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Stream to Vector Decimator -################################################### - --> -<block> - <name>Stream to Vec Decim</name> - <key>blocks_stream_to_vector_decimator</key> - <import>from gnuradio import blocks</import> - <make>blocks.stream_to_vector_decimator( - item_size=$type.size, - sample_rate=$sample_rate, - vec_rate=$vec_rate, - vec_len=$vlen, -)</make> - <callback>set_sample_rate($sample_rate)</callback> - <callback>set_vec_rate($vec_rate)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Sample Rate</name> - <key>sample_rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>Vec Rate</name> - <key>vec_rate</key> - <value>30</value> - <type>real</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1024</value> - <type>int</type> - </param> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_streams_to_stream.block.yml b/gr-blocks/grc/blocks_streams_to_stream.block.yml new file mode 100644 index 0000000000..404fcb0125 --- /dev/null +++ b/gr-blocks/grc/blocks_streams_to_stream.block.yml @@ -0,0 +1,43 @@ +id: blocks_streams_to_stream +label: Streams to Stream + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.streams_to_stream(${type.size}*${vlen}, ${num_streams}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_streams_to_stream.xml b/gr-blocks/grc/blocks_streams_to_stream.xml deleted file mode 100644 index 2aa17dbe23..0000000000 --- a/gr-blocks/grc/blocks_streams_to_stream.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Streams to Stream -################################################### - --> -<block> - <name>Streams to Stream</name> - <key>blocks_streams_to_stream</key> - <import>from gnuradio import blocks</import> - <make>blocks.streams_to_stream($type.size*$vlen, $num_streams)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_streams_to_vector.block.yml b/gr-blocks/grc/blocks_streams_to_vector.block.yml new file mode 100644 index 0000000000..d16d1e9384 --- /dev/null +++ b/gr-blocks/grc/blocks_streams_to_vector.block.yml @@ -0,0 +1,43 @@ +id: blocks_streams_to_vector +label: Streams to Vector + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen*num_streams } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.streams_to_vector(${type.size}*${vlen}, ${num_streams}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_streams_to_vector.xml b/gr-blocks/grc/blocks_streams_to_vector.xml deleted file mode 100644 index dc371f0215..0000000000 --- a/gr-blocks/grc/blocks_streams_to_vector.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Streams to Vector -################################################### - --> -<block> - <name>Streams to Vector</name> - <key>blocks_streams_to_vector</key> - <import>from gnuradio import blocks</import> - <make>blocks.streams_to_vector($type.size*$vlen, $num_streams)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen*$num_streams</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_stretch_ff.block.yml b/gr-blocks/grc/blocks_stretch_ff.block.yml new file mode 100644 index 0000000000..95921538c0 --- /dev/null +++ b/gr-blocks/grc/blocks_stretch_ff.block.yml @@ -0,0 +1,28 @@ +id: blocks_stretch_ff +label: Stretch + +parameters: +- id: lo + label: Low + dtype: real +- id: vlen + label: Vec. Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: float + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.stretch_ff(${lo}, ${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_stretch_ff.xml b/gr-blocks/grc/blocks_stretch_ff.xml deleted file mode 100644 index 00a67602b2..0000000000 --- a/gr-blocks/grc/blocks_stretch_ff.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Stretch Block: -## float in / float out -################################################### - --> -<block> - <name>Stretch</name> - <key>blocks_stretch_ff</key> - <import>from gnuradio import blocks</import> - <make>blocks.stretch_ff($lo, $vlen)</make> - <param> - <name>Low</name> - <key>lo</key> - <type>real</type> - </param> - <param> - <name>Vec. Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>float</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>float</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_sub_xx.block.yml b/gr-blocks/grc/blocks_sub_xx.block.yml new file mode 100644 index 0000000000..0cfab09407 --- /dev/null +++ b/gr-blocks/grc/blocks_sub_xx.block.yml @@ -0,0 +1,42 @@ +id: blocks_sub_xx +label: Subtract + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short] + option_attributes: + fcn: [cc, ff, ii, ss] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } +- ${ num_inputs >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.sub_${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_sub_xx.xml b/gr-blocks/grc/blocks_sub_xx.xml deleted file mode 100644 index 88b5ccbb57..0000000000 --- a/gr-blocks/grc/blocks_sub_xx.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Subtract Block: -## all types, 1 output, 2 to inf inputs -################################################### - --> -<block> - <name>Subtract</name> - <key>blocks_sub_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.sub_$(type.fcn)($vlen)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:cc</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:ff</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <check>$num_inputs >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tag_debug.block.yml b/gr-blocks/grc/blocks_tag_debug.block.yml new file mode 100644 index 0000000000..f6fe4eff66 --- /dev/null +++ b/gr-blocks/grc/blocks_tag_debug.block.yml @@ -0,0 +1,53 @@ +id: blocks_tag_debug +label: Tag Debug + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: name + label: Name + dtype: string +- id: filter + label: Key Filter + dtype: string + default: '""' +- id: num_inputs + label: Num Inputs + dtype: int + default: '1' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: display + label: Display + dtype: bool + default: 'True' + options: ['True', 'False'] + option_labels: ['On', 'Off'] + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_inputs } + +asserts: +- ${ num_inputs >= 1 } +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.tag_debug(${type.size}*${vlen}, ${name}, ${filter}); self.${id}.set_display(${display}) + callbacks: + - set_display(${display}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tag_debug.xml b/gr-blocks/grc/blocks_tag_debug.xml deleted file mode 100644 index 03dd147cbe..0000000000 --- a/gr-blocks/grc/blocks_tag_debug.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Tag Debug -################################################### - --> -<block> - <name>Tag Debug</name> - <key>blocks_tag_debug</key> - <import>from gnuradio import blocks</import> - <make>blocks.tag_debug($type.size*$vlen, $name, $filter); self.$(id).set_display($display)</make> - <callback>set_display($display)</callback> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Name</name> - <key>name</key> - <type>string</type> - </param> - <param> - <name>Key Filter</name> - <key>filter</key> - <value>""</value> - <type>string</type> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Display</name> - <key>display</key> - <value>True</value> - <type>bool</type> - <option> - <name>On</name> - <key>True</key> - </option> - <option> - <name>Off</name> - <key>False</key> - </option> - </param> - <check>$num_inputs >= 1</check> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_inputs</nports> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_tag_gate.block.yml b/gr-blocks/grc/blocks_tag_gate.block.yml new file mode 100644 index 0000000000..a05ee3c276 --- /dev/null +++ b/gr-blocks/grc/blocks_tag_gate.block.yml @@ -0,0 +1,50 @@ +id: blocks_tag_gate +label: Tag Gate + +parameters: +- id: type + label: Item Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: propagate_tags + label: Propagate Tags + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: single_key + label: Single Key + dtype: string + default: '""' + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: |- + blocks.tag_gate(${type.size} * ${vlen}, ${propagate_tags}) + self.${id}.set_single_key(${single_key}) + callbacks: + - self.${id}.set_single_key(${single_key}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tag_gate.xml b/gr-blocks/grc/blocks_tag_gate.xml deleted file mode 100644 index 0cf6dc42ed..0000000000 --- a/gr-blocks/grc/blocks_tag_gate.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Tag Gate</name> - <key>blocks_tag_gate</key> - <import>from gnuradio import blocks</import> - <make>blocks.tag_gate($type.size * $vlen, $propagate_tags) -self.$(id).set_single_key($single_key)</make> - <callback>self.$(id).set_single_key($single_key)</callback> - - <param> - <name>Item Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Propagate Tags</name> - <key>propagate_tags</key> - <value>False</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - - <param> - <name>Single Key</name> - <key>single_key</key> - <value>""</value> - <type>string</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tag_object.block.yml b/gr-blocks/grc/blocks_tag_object.block.yml new file mode 100644 index 0000000000..cf0f996470 --- /dev/null +++ b/gr-blocks/grc/blocks_tag_object.block.yml @@ -0,0 +1,44 @@ +id: variable_tag_object +label: Tag Object + +parameters: +- id: offset + label: Offset + dtype: int + default: '0' +- id: key + label: Key + dtype: raw + default: pmt.intern("key") +- id: value + label: Value + dtype: raw + default: pmt.intern("value") +- id: src + label: Source ID + dtype: raw + default: pmt.intern("src") +value: ${ value } + +templates: + imports: import pmt + var_make: self.${id} = ${id} = gr.tag_utils.python_to_tag((${offset}, ${key}, + ${value}, ${src})) + callbacks: + - self.set_${id}(gr.tag_utils.python_to_tag((${offset}, ${key}, ${value}, ${src}))) + +documentation: |- + This block creates a tag object. While tags are based on an + absolute offset, this is based on a relative offset that must be + appropriately translated by the block using it. For example, this + is used by the vector_source blocks, which will treat a 0 offset + in the tag as the first item in the stream when the vector starts + or repeats. + + The tag objects are created using the python_to_tag Python + function to make it easy to generate a tag_t in Python. The call + looks like: + + gr.tag_utils.python_to_tag(($offset, $key, $value, $src)) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tag_object.xml b/gr-blocks/grc/blocks_tag_object.xml deleted file mode 100644 index 7352d801a0..0000000000 --- a/gr-blocks/grc/blocks_tag_object.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Tag Object: creates a tag -################################################### - --> -<block> - <name>Tag Object</name> - <key>variable_tag_object</key> - <import>import pmt</import> - <var_make>self.$(id) = $(id) = gr.tag_utils.python_to_tag(($offset, $key, $value, $src))</var_make> - <make></make> - <callback>self.set_$(id)(gr.tag_utils.python_to_tag(($offset, $key, $value, $src)))</callback> - <param> - <name>Offset</name> - <key>offset</key> - <value>0</value> - <type>int</type> - </param> - <param> - <name>Key</name> - <key>key</key> - <value>pmt.intern("key")</value> - <type>raw</type> - </param> - <param> - <name>Value</name> - <key>value</key> - <value>pmt.intern("value")</value> - <type>raw</type> - </param> - <param> - <name>Source ID</name> - <key>src</key> - <value>pmt.intern("src")</value> - <type>raw</type> - </param> - <doc> - This block creates a tag object. While tags are based on an - absolute offset, this is based on a relative offset that must be - appropriately translated by the block using it. For example, this - is used by the vector_source blocks, which will treat a 0 offset - in the tag as the first item in the stream when the vector starts - or repeats. - - The tag objects are created using the python_to_tag Python - function to make it easy to generate a tag_t in Python. The call - looks like: - - gr.tag_utils.python_to_tag(($offset, $key, $value, $src)) - </doc> -</block> diff --git a/gr-blocks/grc/blocks_tag_share.block.yml b/gr-blocks/grc/blocks_tag_share.block.yml new file mode 100644 index 0000000000..96096ef58c --- /dev/null +++ b/gr-blocks/grc/blocks_tag_share.block.yml @@ -0,0 +1,48 @@ +id: blocks_tag_share +label: Tag Share + +parameters: +- id: io_type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: share_type + label: Share Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: part + +inputs: +- domain: stream + dtype: ${ io_type } + vlen: ${ vlen } +- label: share + domain: stream + dtype: ${ share_type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ io_type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.tag_share(${io_type.size}, ${share_type.size}, ${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tag_share.xml b/gr-blocks/grc/blocks_tag_share.xml deleted file mode 100644 index 21827d0591..0000000000 --- a/gr-blocks/grc/blocks_tag_share.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Tag Share</name> - <key>blocks_tag_share</key> - <import>from gnuradio import blocks</import> - <make>blocks.tag_share($io_type.size, $share_type.size, $vlen)</make> - - <param> - <name>IO Type</name> - <key>io_type</key> - <type>enum</type> - <hide>part</hide> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Share Type</name> - <key>share_type</key> - <type>enum</type> - <hide>part</hide> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - <hide>part</hide> - </param> - - <check>$vlen > 0</check> - - <sink> - <name>in</name> - <type>$io_type</type> - <vlen>$vlen</vlen> - </sink> - <sink> - <name>share</name> - <type>$share_type</type> - <vlen>$vlen</vlen> - </sink> - - <source> - <name>out</name> - <type>$io_type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tagged_file_sink.block.yml b/gr-blocks/grc/blocks_tagged_file_sink.block.yml new file mode 100644 index 0000000000..f70c78154b --- /dev/null +++ b/gr-blocks/grc/blocks_tagged_file_sink.block.yml @@ -0,0 +1,35 @@ +id: blocks_tagged_file_sink +label: Tagged File Sink + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: samp_rate + label: Sample Rate + dtype: int + default: samp_rate +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.tagged_file_sink(${type.size}*${vlen}, ${samp_rate}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_file_sink.xml b/gr-blocks/grc/blocks_tagged_file_sink.xml deleted file mode 100644 index a849c48c9a..0000000000 --- a/gr-blocks/grc/blocks_tagged_file_sink.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Tagged File Sink -################################################### - --> -<block> - <name>Tagged File Sink</name> - <key>blocks_tagged_file_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.tagged_file_sink($type.size*$vlen, $samp_rate)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_tagged_stream_align.block.yml b/gr-blocks/grc/blocks_tagged_stream_align.block.yml new file mode 100644 index 0000000000..cfc5a7717a --- /dev/null +++ b/gr-blocks/grc/blocks_tagged_stream_align.block.yml @@ -0,0 +1,37 @@ +id: blocks_tagged_stream_align +label: Tagged Stream Align + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: lengthtagname + label: Length tag names + dtype: string + default: packet_len +- id: vlen + label: Vector Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.tagged_stream_align(${type.size}*${vlen}, ${lengthtagname}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_stream_align.xml b/gr-blocks/grc/blocks_tagged_stream_align.xml deleted file mode 100644 index be0238d52b..0000000000 --- a/gr-blocks/grc/blocks_tagged_stream_align.xml +++ /dev/null @@ -1,59 +0,0 @@ -<block> - <name>Tagged Stream Align</name> - <key>blocks_tagged_stream_align</key> - <import>from gnuradio import blocks</import> - <make>blocks.tagged_stream_align($type.size*$vlen, $lengthtagname)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Length tag names</name> - <key>lengthtagname</key> - <value>packet_len</value> - <type>string</type> - </param> - <param> - <name>Vector Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> - diff --git a/gr-blocks/grc/blocks_tagged_stream_multiply_length.block.yml b/gr-blocks/grc/blocks_tagged_stream_multiply_length.block.yml new file mode 100644 index 0000000000..90fbcf0c21 --- /dev/null +++ b/gr-blocks/grc/blocks_tagged_stream_multiply_length.block.yml @@ -0,0 +1,46 @@ +id: blocks_tagged_stream_multiply_length +label: Tagged Stream Multiply Length Tag + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: lengthtagname + label: Length tag names + dtype: string +- id: vlen + label: Vector Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: c + label: Length Scalar + dtype: real + default: '1.0' + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } +- domain: message + id: set_scalar + optional: true + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.tagged_stream_multiply_length(${type.size}*${vlen}, ${lengthtagname}, + ${c}) + callbacks: + - set_scalar(${c}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_stream_multiply_length.xml b/gr-blocks/grc/blocks_tagged_stream_multiply_length.xml deleted file mode 100644 index f4abb92903..0000000000 --- a/gr-blocks/grc/blocks_tagged_stream_multiply_length.xml +++ /dev/null @@ -1,70 +0,0 @@ -<block> - <name>Tagged Stream Multiply Length Tag</name> - <key>blocks_tagged_stream_multiply_length</key> - <import>from gnuradio import blocks</import> - <make>blocks.tagged_stream_multiply_length($type.size*$vlen, $lengthtagname, $c)</make> - <callback>set_scalar($c)</callback> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Length tag names</name> - <key>lengthtagname</key> - <type>string</type> - </param> - <param> - <name>Vector Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Length Scalar</name> - <key>c</key> - <value>1.0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <sink> - <name>set_scalar</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> - diff --git a/gr-blocks/grc/blocks_tagged_stream_mux.block.yml b/gr-blocks/grc/blocks_tagged_stream_mux.block.yml new file mode 100644 index 0000000000..4807e95d2b --- /dev/null +++ b/gr-blocks/grc/blocks_tagged_stream_mux.block.yml @@ -0,0 +1,46 @@ +id: blocks_tagged_stream_mux +label: Tagged Stream Mux + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: ninputs + label: Number of inputs + dtype: int + hide: part +- id: lengthtagname + label: Length tag names + dtype: string +- id: vlen + label: Vector Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: tag_preserve_head_pos + label: 'Tags: Preserve head position on input' + dtype: int + default: '0' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ ninputs } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +templates: + imports: from gnuradio import blocks + make: blocks.tagged_stream_mux(${type.size}*${vlen}, ${lengthtagname}, ${tag_preserve_head_pos}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_stream_mux.xml b/gr-blocks/grc/blocks_tagged_stream_mux.xml deleted file mode 100644 index 221a2ed7f9..0000000000 --- a/gr-blocks/grc/blocks_tagged_stream_mux.xml +++ /dev/null @@ -1,71 +0,0 @@ -<block> - <name>Tagged Stream Mux</name> - <key>blocks_tagged_stream_mux</key> - <import>from gnuradio import blocks</import> - <make>blocks.tagged_stream_mux($type.size*$vlen, $lengthtagname, $tag_preserve_head_pos)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Number of inputs</name> - <key>ninputs</key> - <type>int</type> - </param> - <param> - <name>Length tag names</name> - <key>lengthtagname</key> - <type>string</type> - </param> - <param> - <name>Vector Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Tags: Preserve head position on input</name> - <key>tag_preserve_head_pos</key> - <value>0</value> - <type>int</type> - <hide>part</hide> - </param> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$ninputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> - diff --git a/gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml b/gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml new file mode 100644 index 0000000000..e2292adb25 --- /dev/null +++ b/gr-blocks/grc/blocks_tagged_stream_to_pdu.block.yml @@ -0,0 +1,30 @@ +id: blocks_tagged_stream_to_pdu +label: Tagged Stream to PDU + +parameters: +- id: type + label: Item Type + dtype: enum + options: [byte, complex, float] + option_attributes: + tv: [blocks.byte_t, blocks.complex_t, blocks.float_t] + hide: part +- id: tag + label: Length tag name + dtype: string + default: packet_len + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: from gnuradio import blocks + make: blocks.tagged_stream_to_pdu(${type.tv}, ${tag}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tagged_stream_to_pdu.xml b/gr-blocks/grc/blocks_tagged_stream_to_pdu.xml deleted file mode 100644 index ae8ad3b6c5..0000000000 --- a/gr-blocks/grc/blocks_tagged_stream_to_pdu.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Tagged Stream to PDU Message -################################################### - --> -<block> - <name>Tagged Stream to PDU</name> - <key>blocks_tagged_stream_to_pdu</key> - <import>from gnuradio import blocks</import> - <make>blocks.tagged_stream_to_pdu($type.tv, $tag)</make> - <param> - <name>Item Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>tv:blocks.byte_t</opt> - </option> - <option> - <name>Complex</name> - <key>complex</key> - <opt>tv:blocks.complex_t</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>tv:blocks.float_t</opt> - </option> - </param> - <param> - <name>Length tag name</name> - <key>tag</key> - <value>packet_len</value> - <type>string</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tags_strobe.block.yml b/gr-blocks/grc/blocks_tags_strobe.block.yml new file mode 100644 index 0000000000..344fb9bde8 --- /dev/null +++ b/gr-blocks/grc/blocks_tags_strobe.block.yml @@ -0,0 +1,49 @@ +id: blocks_tags_strobe +label: Tags Strobe + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: value + label: Value (PMT) + dtype: raw + default: pmt.intern("TEST") +- id: key + label: Key (PMT) + dtype: raw + default: pmt.intern("strobe") +- id: nsamps + label: Num. Samples + dtype: int + default: '1000' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: |- + from gnuradio import blocks + import pmt + make: blocks.tags_strobe(${type.size}*${vlen}, ${value}, ${nsamps}, ${key}) + callbacks: + - set_value(${value}) + - set_key(${key}) + - set_nsamps(${nsamps}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tags_strobe.xml b/gr-blocks/grc/blocks_tags_strobe.xml deleted file mode 100644 index ed14929329..0000000000 --- a/gr-blocks/grc/blocks_tags_strobe.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Tags Strobe -################################################### - --> -<block> - <name>Tags Strobe</name> - <key>blocks_tags_strobe</key> - <import>from gnuradio import blocks</import> - <import>import pmt</import> - <make>blocks.tags_strobe($type.size*$vlen, $value, $nsamps, $key)</make> - <callback>set_value($value)</callback> - <callback>set_key($key)</callback> - <callback>set_nsamps($nsamps)</callback> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Value (PMT)</name> - <key>value</key> - <value>pmt.intern("TEST")</value> - <type>raw</type> - </param> - <param> - <name>Key (PMT)</name> - <key>key</key> - <value>pmt.intern("strobe")</value> - <type>raw</type> - </param> - <param> - <name>Num. Samples</name> - <key>nsamps</key> - <value>1000</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tcp_server_sink.block.yml b/gr-blocks/grc/blocks_tcp_server_sink.block.yml new file mode 100644 index 0000000000..fc8eae056b --- /dev/null +++ b/gr-blocks/grc/blocks_tcp_server_sink.block.yml @@ -0,0 +1,42 @@ +id: blocks_tcp_server_sink +label: TCP Server Sink + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: ipaddr + label: Destination IP Address + dtype: string +- id: port + label: Destination Port + dtype: int +- id: noblock + label: Nonblocking Mode + dtype: enum + options: ['True', 'False'] + option_labels: ['On', 'Off'] +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.tcp_server_sink(${type.size}*${vlen}, ${ipaddr}, ${port}, ${noblock}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tcp_server_sink.xml b/gr-blocks/grc/blocks_tcp_server_sink.xml deleted file mode 100644 index 644027da65..0000000000 --- a/gr-blocks/grc/blocks_tcp_server_sink.xml +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##TCP Server Sink -################################################### - --> -<block> - <name>TCP Server Sink</name> - <key>blocks_tcp_server_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.tcp_server_sink($type.size*$vlen, $ipaddr, $port, $noblock)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Destination IP Address</name> - <key>ipaddr</key> - <type>string</type> - </param> - <param> - <name>Destination Port</name> - <key>port</key> - <type>int</type> - </param> - <param> - <name>Nonblocking Mode</name> - <key>noblock</key> - <type>enum</type> - <option> - <name>On</name> - <key>True</key> - </option> - <option> - <name>Off</name> - <key>False</key> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_test_tag_variable_rate_ff.block.yml b/gr-blocks/grc/blocks_test_tag_variable_rate_ff.block.yml new file mode 100644 index 0000000000..1a873cc19c --- /dev/null +++ b/gr-blocks/grc/blocks_test_tag_variable_rate_ff.block.yml @@ -0,0 +1,29 @@ +id: blocks_test_tag_variable_rate_ff +label: Test Tag Variable Rate + +parameters: +- id: once + label: Update Once + dtype: enum + default: 'False' + options: ['True', 'False'] +- id: step + label: Update Step + dtype: float + default: '0.001' + +inputs: +- domain: stream + dtype: float + multiplicity: '1' + +outputs: +- domain: stream + dtype: float + multiplicity: '1' + +templates: + imports: from gnuradio import blocks + make: blocks.test_tag_variable_rate_ff(${once}, ${step}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_test_tag_variable_rate_ff.xml b/gr-blocks/grc/blocks_test_tag_variable_rate_ff.xml deleted file mode 100644 index 2a6c4b52e8..0000000000 --- a/gr-blocks/grc/blocks_test_tag_variable_rate_ff.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## Test tag variable rate -################################################### ---> - -<block> - <name>Test Tag Variable Rate</name> - <key>blocks_test_tag_variable_rate_ff</key> - <import>from gnuradio import blocks</import> - <make>blocks.test_tag_variable_rate_ff($once, $step)</make> - - <param> - <name>Update Once</name> - <key>once</key> - <value>False</value> - <type>enum</type> - <option> - <name>True</name> - <key>True</key> - </option> - <option> - <name>False</name> - <key>False</key> - </option> - </param> - - <param> - <name>Update Step</name> - <key>step</key> - <value>0.001</value> - <type>float</type> - </param> - - <sink> - <name>in</name> - <type>float</type> - <nports>1</nports> - </sink> - - <source> - <name>out</name> - <type>float</type> - <nports>1</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_threshold_ff.block.yml b/gr-blocks/grc/blocks_threshold_ff.block.yml new file mode 100644 index 0000000000..52a6f10059 --- /dev/null +++ b/gr-blocks/grc/blocks_threshold_ff.block.yml @@ -0,0 +1,33 @@ +id: blocks_threshold_ff +label: Threshold + +parameters: +- id: low + label: Low + dtype: real + default: '-100' +- id: high + label: High + dtype: real + default: '100' +- id: init + label: Initial State + dtype: real + default: '0' + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import blocks + make: blocks.threshold_ff(${low}, ${high}, ${init}) + callbacks: + - set_hi(${high}) + - set_lo(${low}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_threshold_ff.xml b/gr-blocks/grc/blocks_threshold_ff.xml deleted file mode 100644 index 0da4157fc8..0000000000 --- a/gr-blocks/grc/blocks_threshold_ff.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Threshold -################################################### - --> -<block> - <name>Threshold</name> - <key>blocks_threshold_ff</key> - <import>from gnuradio import blocks</import> - <make>blocks.threshold_ff($low, $high, $init)</make> - <callback>set_hi($high)</callback> - <callback>set_lo($low)</callback> - <param> - <name>Low</name> - <key>low</key> - <value>-100</value> - <type>real</type> - </param> - <param> - <name>High</name> - <key>high</key> - <value>100</value> - <type>real</type> - </param> - <param> - <name>Initial State</name> - <key>init</key> - <value>0</value> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_throttle.block.yml b/gr-blocks/grc/blocks_throttle.block.yml new file mode 100644 index 0000000000..8b497b60c4 --- /dev/null +++ b/gr-blocks/grc/blocks_throttle.block.yml @@ -0,0 +1,48 @@ +id: blocks_throttle +label: Throttle +flags: throttle + +parameters: +- id: type + label: Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: samples_per_second + label: Sample Rate + dtype: real + default: samp_rate +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: ignoretag + label: Ignore rx_rate tag + dtype: bool + default: 'True' + hide: ${ ('part' if str(ignoretag) == 'True' else 'none') } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.throttle(${type.size}*${vlen}, ${samples_per_second},${ignoretag}) + callbacks: + - set_sample_rate(${samples_per_second}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_throttle.xml b/gr-blocks/grc/blocks_throttle.xml deleted file mode 100644 index 26f4aa768b..0000000000 --- a/gr-blocks/grc/blocks_throttle.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Throttle -################################################### - --> -<block> - <name>Throttle</name> - <key>blocks_throttle</key> - <flags>throttle</flags> - <import>from gnuradio import blocks</import> - <make>blocks.throttle($type.size*$vlen, $samples_per_second,$ignoretag)</make> - <callback>set_sample_rate($samples_per_second)</callback> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Sample Rate</name> - <key>samples_per_second</key> - <value>samp_rate</value> - <type>real</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Ignore rx_rate tag</name> - <key>ignoretag</key> - <value>True</value> - <type>bool</type> - <hide>#if str($ignoretag()) == 'True' then 'part' else 'none'#</hide> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_transcendental.block.yml b/gr-blocks/grc/blocks_transcendental.block.yml new file mode 100644 index 0000000000..768bc73018 --- /dev/null +++ b/gr-blocks/grc/blocks_transcendental.block.yml @@ -0,0 +1,30 @@ +id: blocks_transcendental +label: Transcendental + +parameters: +- id: type + label: Type + dtype: enum + options: [complex_double, float] + option_labels: [Complex, Float] + option_attributes: + type: [complex, float] + hide: part +- id: name + label: Function Name + dtype: string + default: cos + +inputs: +- domain: stream + dtype: ${ type.type } + +outputs: +- domain: stream + dtype: ${ type.type } + +templates: + imports: from gnuradio import blocks + make: blocks.transcendental(${name}, "$type") + +file_format: 1 diff --git a/gr-blocks/grc/blocks_transcendental.xml b/gr-blocks/grc/blocks_transcendental.xml deleted file mode 100644 index a883a2eefc..0000000000 --- a/gr-blocks/grc/blocks_transcendental.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##transcendental functions -################################################### - --> -<block> - <name>Transcendental</name> - <key>blocks_transcendental</key> - <import>from gnuradio import blocks</import> - <make>blocks.transcendental($name, "$type")</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex_double</key> - <opt>type:complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>type:float</opt> - </option> - </param> - <param> - <name>Function Name</name> - <key>name</key> - <value>cos</value> - <type>string</type> - </param> - <sink> - <name>in</name> - <type>$type.type</type> - </sink> - <source> - <name>out</name> - <type>$type.type</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_tuntap_pdu.block.yml b/gr-blocks/grc/blocks_tuntap_pdu.block.yml new file mode 100644 index 0000000000..0fd183cbfe --- /dev/null +++ b/gr-blocks/grc/blocks_tuntap_pdu.block.yml @@ -0,0 +1,34 @@ +id: blocks_tuntap_pdu +label: TUNTAP PDU + +parameters: +- id: ifn + label: Interface Name + dtype: string + default: tap0 +- id: mtu + label: MTU + dtype: int + default: '10000' +- id: istunflag + label: Flag + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: [TUN(IP Packet), TAP(Ethernet Frame)] + +inputs: +- domain: message + id: pdus + optional: true + +outputs: +- domain: message + id: pdus + optional: true + +templates: + imports: from gnuradio import blocks + make: blocks.tuntap_pdu(${ifn}, ${mtu}, ${istunflag}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_tuntap_pdu.xml b/gr-blocks/grc/blocks_tuntap_pdu.xml deleted file mode 100644 index 16e5871b93..0000000000 --- a/gr-blocks/grc/blocks_tuntap_pdu.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -## TUNTAP PDU async message source/sink -################################################### - --> -<block> - <name>TUNTAP PDU</name> - <key>blocks_tuntap_pdu</key> - <import>from gnuradio import blocks</import> - <make>blocks.tuntap_pdu($ifn, $mtu, $istunflag)</make> - <param> - <name>Interface Name</name> - <key>ifn</key> - <value>tap0</value> - <type>string</type> - </param> - <param> - <name>MTU</name> - <key>mtu</key> - <value>10000</value> - <type>int</type> - </param> - <param> - <name>Flag</name> - <key>istunflag</key> - <value>False</value> - <type>enum</type> - <option> - <name>TUN(IP Packet)</name> - <key>True</key> - </option> - <option> - <name>TAP(Ethernet Frame)</name> - <key>False</key> - </option> - </param> - <sink> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </sink> - <source> - <name>pdus</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/gr-blocks/grc/blocks_uchar_to_float.block.yml b/gr-blocks/grc/blocks_uchar_to_float.block.yml new file mode 100644 index 0000000000..984cbd3928 --- /dev/null +++ b/gr-blocks/grc/blocks_uchar_to_float.block.yml @@ -0,0 +1,16 @@ +id: blocks_uchar_to_float +label: UChar To Float + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import blocks + make: blocks.uchar_to_float() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_uchar_to_float.xml b/gr-blocks/grc/blocks_uchar_to_float.xml deleted file mode 100644 index eb2b5505ef..0000000000 --- a/gr-blocks/grc/blocks_uchar_to_float.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Unsigned Char to Float: -################################################### - --> -<block> - <name>UChar To Float</name> - <key>blocks_uchar_to_float</key> - <import>from gnuradio import blocks</import> - <make>blocks.uchar_to_float()</make> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_udp_sink.block.yml b/gr-blocks/grc/blocks_udp_sink.block.yml new file mode 100644 index 0000000000..1ffa83c033 --- /dev/null +++ b/gr-blocks/grc/blocks_udp_sink.block.yml @@ -0,0 +1,45 @@ +id: blocks_udp_sink +label: UDP Sink + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: ipaddr + label: Destination IP Address + dtype: string +- id: port + label: Destination Port + dtype: int +- id: psize + label: Payload Size + dtype: int + default: '1472' +- id: eof + label: Send Null Pkt as EOF + dtype: bool + default: 'True' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.udp_sink(${type.size}*${vlen}, ${ipaddr}, ${port}, ${psize}, ${eof}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_udp_sink.xml b/gr-blocks/grc/blocks_udp_sink.xml deleted file mode 100644 index 0b67532c72..0000000000 --- a/gr-blocks/grc/blocks_udp_sink.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##UDP Sink -################################################### - --> -<block> - <name>UDP Sink</name> - <key>blocks_udp_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.udp_sink($type.size*$vlen, $ipaddr, $port, $psize, $eof)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Destination IP Address</name> - <key>ipaddr</key> - <type>string</type> - </param> - <param> - <name>Destination Port</name> - <key>port</key> - <type>int</type> - </param> - <param> - <name>Payload Size</name> - <key>psize</key> - <value>1472</value> - <type>int</type> - </param> - <param> - <name>Send Null Pkt as EOF</name> - <key>eof</key> - <value>True</value> - <type>bool</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_udp_source.block.yml b/gr-blocks/grc/blocks_udp_source.block.yml new file mode 100644 index 0000000000..1e15678158 --- /dev/null +++ b/gr-blocks/grc/blocks_udp_source.block.yml @@ -0,0 +1,48 @@ +id: blocks_udp_source +label: UDP Source +flags: throttle + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: ipaddr + label: IP Address + dtype: string + default: 127.0.0.1 +- id: port + label: Port + dtype: int + default: '1234' +- id: psize + label: Payload Size + dtype: int + default: '1472' +- id: eof + label: Null Pkt is EOF + dtype: bool + default: 'True' +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.udp_source(${type.size}*${vlen}, ${ipaddr}, ${port}, ${psize}, ${eof}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_udp_source.xml b/gr-blocks/grc/blocks_udp_source.xml deleted file mode 100644 index c84816f785..0000000000 --- a/gr-blocks/grc/blocks_udp_source.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##UDP Source -################################################### - --> -<block> - <name>UDP Source</name> - <key>blocks_udp_source</key> - <flags>throttle</flags> - <import>from gnuradio import blocks</import> - <make>blocks.udp_source($type.size*$vlen, $ipaddr, $port, $psize, $eof)</make> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>IP Address</name> - <key>ipaddr</key> - <value>127.0.0.1</value> - <type>string</type> - </param> - <param> - <name>Port</name> - <key>port</key> - <value>1234</value> - <type>int</type> - </param> - <param> - <name>Payload Size</name> - <key>psize</key> - <value>1472</value> - <type>int</type> - </param> - <param> - <name>Null Pkt is EOF</name> - <key>eof</key> - <value>True</value> - <type>bool</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_unpack_k_bits_bb.block.yml b/gr-blocks/grc/blocks_unpack_k_bits_bb.block.yml new file mode 100644 index 0000000000..065fc45ebf --- /dev/null +++ b/gr-blocks/grc/blocks_unpack_k_bits_bb.block.yml @@ -0,0 +1,21 @@ +id: blocks_unpack_k_bits_bb +label: Unpack K Bits + +parameters: +- id: k + label: K + dtype: int + +inputs: +- domain: stream + dtype: byte + +outputs: +- domain: stream + dtype: byte + +templates: + imports: from gnuradio import blocks + make: blocks.unpack_k_bits_bb(${k}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_unpack_k_bits_bb.xml b/gr-blocks/grc/blocks_unpack_k_bits_bb.xml deleted file mode 100644 index 90d7493af0..0000000000 --- a/gr-blocks/grc/blocks_unpack_k_bits_bb.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Unpack K Bits -################################################### - --> -<block> - <name>Unpack K Bits</name> - <key>blocks_unpack_k_bits_bb</key> - <import>from gnuradio import blocks</import> - <make>blocks.unpack_k_bits_bb($k)</make> - <param> - <name>K</name> - <key>k</key> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>byte</type> - </sink> - <source> - <name>out</name> - <type>byte</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_unpacked_to_packed_xx.block.yml b/gr-blocks/grc/blocks_unpacked_to_packed_xx.block.yml new file mode 100644 index 0000000000..97c7af9e28 --- /dev/null +++ b/gr-blocks/grc/blocks_unpacked_to_packed_xx.block.yml @@ -0,0 +1,44 @@ +id: blocks_unpacked_to_packed_xx +label: Unpacked to Packed + +parameters: +- id: type + label: Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: bits_per_chunk + label: Bits per Chunk + dtype: int + default: '2' +- id: endianness + label: Endianness + dtype: int + options: [gr.GR_MSB_FIRST, gr.GR_LSB_FIRST] + option_labels: [MSB, LSB] +- id: num_ports + label: Num Ports + dtype: int + default: '1' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_ports } + +outputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_ports } + +asserts: +- ${ num_ports > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.unpacked_to_packed_${type.fcn}(${bits_per_chunk}, ${endianness}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_unpacked_to_packed_xx.xml b/gr-blocks/grc/blocks_unpacked_to_packed_xx.xml deleted file mode 100644 index d27dc9bfc4..0000000000 --- a/gr-blocks/grc/blocks_unpacked_to_packed_xx.xml +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Unpacked to Packed -################################################### - --> -<block> - <name>Unpacked to Packed</name> - <key>blocks_unpacked_to_packed_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.unpacked_to_packed_$(type.fcn)($bits_per_chunk, $endianness)</make> - <param> - <name>Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Bits per Chunk</name> - <key>bits_per_chunk</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Endianness</name> - <key>endianness</key> - <type>int</type> - <option> - <name>MSB</name> - <key>gr.GR_MSB_FIRST</key> - </option> - <option> - <name>LSB</name> - <key>gr.GR_LSB_FIRST</key> - </option> - </param> - <param> - <name>Num Ports</name> - <key>num_ports</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_ports > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>$num_ports</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - <nports>$num_ports</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_vco_c.block.yml b/gr-blocks/grc/blocks_vco_c.block.yml new file mode 100644 index 0000000000..b14b96bc54 --- /dev/null +++ b/gr-blocks/grc/blocks_vco_c.block.yml @@ -0,0 +1,27 @@ +id: blocks_vco_c +label: VCO (complex) + +parameters: +- id: samp_rate + label: Sample Rate + dtype: real +- id: sensitivity + label: Sensitivity + dtype: real +- id: amplitude + label: Amplitude + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: complex + +templates: + imports: from gnuradio import blocks + make: blocks.vco_c(${samp_rate}, ${sensitivity}, ${amplitude}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vco_c.xml b/gr-blocks/grc/blocks_vco_c.xml deleted file mode 100644 index f6246441b9..0000000000 --- a/gr-blocks/grc/blocks_vco_c.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##VCO -################################################### - --> -<block> - <name>VCO (complex)</name> - <key>blocks_vco_c</key> - <import>from gnuradio import blocks</import> - <make>blocks.vco_c($samp_rate, $sensitivity, $amplitude)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <type>real</type> - </param> - <param> - <name>Sensitivity</name> - <key>sensitivity</key> - <type>real</type> - </param> - <param> - <name>Amplitude</name> - <key>amplitude</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>complex</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_vco_f.block.yml b/gr-blocks/grc/blocks_vco_f.block.yml new file mode 100644 index 0000000000..79ade4d0af --- /dev/null +++ b/gr-blocks/grc/blocks_vco_f.block.yml @@ -0,0 +1,27 @@ +id: blocks_vco_f +label: VCO + +parameters: +- id: samp_rate + label: Sample Rate + dtype: real +- id: sensitivity + label: Sensitivity + dtype: real +- id: amplitude + label: Amplitude + dtype: real + +inputs: +- domain: stream + dtype: float + +outputs: +- domain: stream + dtype: float + +templates: + imports: from gnuradio import blocks + make: blocks.vco_f(${samp_rate}, ${sensitivity}, ${amplitude}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vco_f.xml b/gr-blocks/grc/blocks_vco_f.xml deleted file mode 100644 index 77a3ba0bd4..0000000000 --- a/gr-blocks/grc/blocks_vco_f.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##VCO -################################################### - --> -<block> - <name>VCO</name> - <key>blocks_vco_f</key> - <import>from gnuradio import blocks</import> - <make>blocks.vco_f($samp_rate, $sensitivity, $amplitude)</make> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <type>real</type> - </param> - <param> - <name>Sensitivity</name> - <key>sensitivity</key> - <type>real</type> - </param> - <param> - <name>Amplitude</name> - <key>amplitude</key> - <type>real</type> - </param> - <sink> - <name>in</name> - <type>float</type> - </sink> - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/gr-blocks/grc/blocks_vector_insert_x.block.yml b/gr-blocks/grc/blocks_vector_insert_x.block.yml new file mode 100644 index 0000000000..d3b833865d --- /dev/null +++ b/gr-blocks/grc/blocks_vector_insert_x.block.yml @@ -0,0 +1,44 @@ +id: blocks_vector_insert_x +label: Vector Insert + +parameters: +- id: type + label: Output Type + dtype: enum + options: [byte, complex, float, int, short] + option_attributes: + fcn: [b, c, f, i, s] + vec_type: [int_vector, complex_vector, real_vector, int_vector, int_vector] + hide: part +- id: vector + label: Vector + dtype: ${ type.vec_type } + default: 0, 0, 0 +- id: period + label: Periodicity + dtype: int + default: '100' +- id: offset + label: Offset + dtype: int + default: '0' + +inputs: +- domain: stream + dtype: ${ type } + +outputs: +- domain: stream + dtype: ${ type } + +templates: + imports: from gnuradio import blocks + make: blocks.vector_insert_${type.fcn}(${vector}, ${period}, ${offset}) + +documentation: |- + Periodicity, the length of the periodicity at which the vector should be inserted at the output. + (i.e. one vector for every N output items) + + Offset sepcifies where in the cycle period we should begin at. + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vector_insert_x.xml b/gr-blocks/grc/blocks_vector_insert_x.xml deleted file mode 100644 index 2bc7ada2e6..0000000000 --- a/gr-blocks/grc/blocks_vector_insert_x.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector Source -################################################### - --> -<block> - <name>Vector Insert</name> - <key>blocks_vector_insert_x</key> - <import>from gnuradio import blocks</import> - <make>blocks.vector_insert_$(type.fcn)($vector, $period, $offset)</make> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - <opt>vec_type:int_vector</opt> - </option> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - <opt>vec_type:complex_vector</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - <opt>vec_type:real_vector</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - <opt>vec_type:int_vector</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - <opt>vec_type:int_vector</opt> - </option> - </param> - <param> - <name>Vector</name> - <key>vector</key> - <value>0, 0, 0</value> - <type>$type.vec_type</type> - </param> - <param> - <name>Periodicity</name> - <key>period</key> - <value>100</value> - <type>int</type> - </param> - <param> - <name>Offset</name> - <key>offset</key> - <value>0</value> - <type>int</type> - </param> - <sink> - <name>in</name> - <type>$type</type> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> - - <doc> - Periodicity, the length of the periodicity at which the vector should be inserted at the output. - (i.e. one vector for every N output items) - - Offset sepcifies where in the cycle period we should begin at. - </doc> -</block> diff --git a/gr-blocks/grc/blocks_vector_sink_x.block.yml b/gr-blocks/grc/blocks_vector_sink_x.block.yml new file mode 100644 index 0000000000..9be64eae2d --- /dev/null +++ b/gr-blocks/grc/blocks_vector_sink_x.block.yml @@ -0,0 +1,30 @@ +id: blocks_vector_sink_x +label: Vector Sink + +parameters: +- id: type + label: Input Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + fcn: [c, f, i, s, b] + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.vector_sink_${type.fcn}(${vlen}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vector_sink_x.xml b/gr-blocks/grc/blocks_vector_sink_x.xml deleted file mode 100644 index 7f51731975..0000000000 --- a/gr-blocks/grc/blocks_vector_sink_x.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector sink -################################################### - --> -<block> - <name>Vector Sink</name> - <key>blocks_vector_sink_x</key> - <import>from gnuradio import blocks</import> - <make>blocks.vector_sink_$(type.fcn)($vlen)</make> - <param> - <name>Input Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen</vlen> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_vector_source_x.block.yml b/gr-blocks/grc/blocks_vector_source_x.block.yml new file mode 100644 index 0000000000..5cdb6d6d51 --- /dev/null +++ b/gr-blocks/grc/blocks_vector_source_x.block.yml @@ -0,0 +1,47 @@ +id: blocks_vector_source_x +label: Vector Source + +parameters: +- id: type + label: Output Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + fcn: [c, f, i, s, b] + vec_type: [complex_vector, real_vector, int_vector, int_vector, int_vector] + hide: part +- id: vector + label: Vector + dtype: raw + default: (0, 0, 0) +- id: tags + label: Tags + dtype: raw + default: '[]' +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ vlen > 0 } + +templates: + imports: from gnuradio import blocks + make: blocks.vector_source_${type.fcn}(${vector}, ${repeat}, ${vlen}, ${tags}) + callbacks: + - set_data(${vector}, ${tags}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vector_source_x.xml b/gr-blocks/grc/blocks_vector_source_x.xml deleted file mode 100644 index 0417baa34a..0000000000 --- a/gr-blocks/grc/blocks_vector_source_x.xml +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector Source -################################################### - --> -<block> - <name>Vector Source</name> - <key>blocks_vector_source_x</key> - <import>from gnuradio import blocks</import> - <make>blocks.vector_source_$(type.fcn)($vector, $repeat, $vlen, $tags)</make> - <callback>set_data($vector, $tags)</callback> - <param> - <name>Output Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>fcn:c</opt> - <opt>vec_type:complex_vector</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>fcn:f</opt> - <opt>vec_type:real_vector</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:i</opt> - <opt>vec_type:int_vector</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:s</opt> - <opt>vec_type:int_vector</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:b</opt> - <opt>vec_type:int_vector</opt> - </option> - </param> - <param> - <name>Vector</name> - <key>vector</key> - <value>(0, 0, 0)</value> - <type>raw</type> - </param> - <param> - <name>Tags</name> - <key>tags</key> - <value>[]</value> - <type>raw</type> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$vlen > 0</check> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_vector_to_stream.block.yml b/gr-blocks/grc/blocks_vector_to_stream.block.yml new file mode 100644 index 0000000000..77b42ab68d --- /dev/null +++ b/gr-blocks/grc/blocks_vector_to_stream.block.yml @@ -0,0 +1,42 @@ +id: blocks_vector_to_stream +label: Vector to Stream + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_items + label: Num Items + dtype: int + default: '2' + hide: ${ 'part' if vlen == 1 else 'none' } +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen*num_items } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + +asserts: +- ${ num_items > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.vector_to_stream(${type.size}*${vlen}, ${num_items}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vector_to_stream.xml b/gr-blocks/grc/blocks_vector_to_stream.xml deleted file mode 100644 index a4a77bef88..0000000000 --- a/gr-blocks/grc/blocks_vector_to_stream.xml +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector to Stream -################################################### - --> -<block> - <name>Vector to Stream</name> - <key>blocks_vector_to_stream</key> - <import>from gnuradio import blocks</import> - <make>blocks.vector_to_stream($type.size*$vlen, $num_items)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Items</name> - <key>num_items</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_items > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen*$num_items</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - </source> -</block> diff --git a/gr-blocks/grc/blocks_vector_to_streams.block.yml b/gr-blocks/grc/blocks_vector_to_streams.block.yml new file mode 100644 index 0000000000..e64df38534 --- /dev/null +++ b/gr-blocks/grc/blocks_vector_to_streams.block.yml @@ -0,0 +1,43 @@ +id: blocks_vector_to_streams +label: Vector to Streams + +parameters: +- id: type + label: IO Type + dtype: enum + options: [complex, float, int, short, byte] + option_attributes: + size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short, + gr.sizeof_char] + hide: part +- id: num_streams + label: Num Streams + dtype: int + default: '2' + hide: part +- id: vlen + label: Vec Length + dtype: int + default: '1' + hide: ${ 'part' if vlen == 1 else 'none' } + +inputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen*num_streams } + +outputs: +- domain: stream + dtype: ${ type } + vlen: ${ vlen } + multiplicity: ${ num_streams } + +asserts: +- ${ num_streams > 0 } +- ${ vlen >= 1 } + +templates: + imports: from gnuradio import blocks + make: blocks.vector_to_streams(${type.size}*${vlen}, ${num_streams}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_vector_to_streams.xml b/gr-blocks/grc/blocks_vector_to_streams.xml deleted file mode 100644 index 6a246b98df..0000000000 --- a/gr-blocks/grc/blocks_vector_to_streams.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Vector to Streams -################################################### - --> -<block> - <name>Vector to Streams</name> - <key>blocks_vector_to_streams</key> - <import>from gnuradio import blocks</import> - <make>blocks.vector_to_streams($type.size*$vlen, $num_streams)</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Complex</name> - <key>complex</key> - <opt>size:gr.sizeof_gr_complex</opt> - </option> - <option> - <name>Float</name> - <key>float</key> - <opt>size:gr.sizeof_float</opt> - </option> - <option> - <name>Int</name> - <key>int</key> - <opt>size:gr.sizeof_int</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>size:gr.sizeof_short</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>size:gr.sizeof_char</opt> - </option> - </param> - <param> - <name>Num Streams</name> - <key>num_streams</key> - <value>2</value> - <type>int</type> - </param> - <param> - <name>Vec Length</name> - <key>vlen</key> - <value>1</value> - <type>int</type> - </param> - <check>$num_streams > 0</check> - <check>$vlen >= 1</check> - <sink> - <name>in</name> - <type>$type</type> - <vlen>$vlen*$num_streams</vlen> - </sink> - <source> - <name>out</name> - <type>$type</type> - <vlen>$vlen</vlen> - <nports>$num_streams</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_wavfile_sink.block.yml b/gr-blocks/grc/blocks_wavfile_sink.block.yml new file mode 100644 index 0000000000..6bce90d0ec --- /dev/null +++ b/gr-blocks/grc/blocks_wavfile_sink.block.yml @@ -0,0 +1,36 @@ +id: blocks_wavfile_sink +label: Wav File Sink + +parameters: +- id: file + label: File + dtype: file_save +- id: nchan + label: N Channels + dtype: int + default: '1' + hide: part +- id: samp_rate + label: Sample Rate + dtype: int + default: samp_rate +- id: bits_per_sample + label: Bits per Sample + dtype: int + default: '8' + +inputs: +- domain: stream + dtype: float + multiplicity: ${ nchan } + +asserts: +- ${ 1 <= nchan } + +templates: + imports: from gnuradio import blocks + make: blocks.wavfile_sink(${file}, ${nchan}, ${samp_rate}, ${bits_per_sample}) + callbacks: + - open(${file}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_wavfile_sink.xml b/gr-blocks/grc/blocks_wavfile_sink.xml deleted file mode 100644 index 8e81d8d202..0000000000 --- a/gr-blocks/grc/blocks_wavfile_sink.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Wav File Sink -################################################### - --> -<block> - <name>Wav File Sink</name> - <key>blocks_wavfile_sink</key> - <import>from gnuradio import blocks</import> - <make>blocks.wavfile_sink($file, $nchan, $samp_rate, $bits_per_sample)</make> - <callback>open($file)</callback> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_save</type> - </param> - <param> - <name>N Channels</name> - <key>nchan</key> - <value>1</value> - <type>int</type> - </param> - <param> - <name>Sample Rate</name> - <key>samp_rate</key> - <value>samp_rate</value> - <type>int</type> - </param> - <param> - <name>Bits per Sample</name> - <key>bits_per_sample</key> - <value>8</value> - <type>int</type> - </param> - <check>1 <= $nchan</check> - <sink> - <name>in</name> - <type>float</type> - <nports>$nchan</nports> - </sink> -</block> diff --git a/gr-blocks/grc/blocks_wavfile_source.block.yml b/gr-blocks/grc/blocks_wavfile_source.block.yml new file mode 100644 index 0000000000..6a84ebbb83 --- /dev/null +++ b/gr-blocks/grc/blocks_wavfile_source.block.yml @@ -0,0 +1,32 @@ +id: blocks_wavfile_source +label: Wav File Source + +parameters: +- id: file + label: File + dtype: file_open +- id: repeat + label: Repeat + dtype: enum + default: 'True' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] +- id: nchan + label: N Channels + dtype: int + default: '1' + hide: part + +outputs: +- domain: stream + dtype: float + multiplicity: ${ nchan } + +asserts: +- ${ 1 <= nchan } + +templates: + imports: from gnuradio import blocks + make: blocks.wavfile_source(${file}, ${repeat}) + +file_format: 1 diff --git a/gr-blocks/grc/blocks_wavfile_source.xml b/gr-blocks/grc/blocks_wavfile_source.xml deleted file mode 100644 index deb48472a4..0000000000 --- a/gr-blocks/grc/blocks_wavfile_source.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Wav File Source -################################################### - --> -<block> - <name>Wav File Source</name> - <key>blocks_wavfile_source</key> - <import>from gnuradio import blocks</import> - <make>blocks.wavfile_source($file, $repeat)</make> - <param> - <name>File</name> - <key>file</key> - <value></value> - <type>file_open</type> - </param> - <param> - <name>Repeat</name> - <key>repeat</key> - <value>True</value> - <type>enum</type> - <option> - <name>Yes</name> - <key>True</key> - </option> - <option> - <name>No</name> - <key>False</key> - </option> - </param> - <param> - <name>N Channels</name> - <key>nchan</key> - <value>1</value> - <type>int</type> - </param> - <check>1 <= $nchan</check> - <source> - <name>out</name> - <type>float</type> - <nports>$nchan</nports> - </source> -</block> diff --git a/gr-blocks/grc/blocks_xor_xx.block.yml b/gr-blocks/grc/blocks_xor_xx.block.yml new file mode 100644 index 0000000000..493afef0c2 --- /dev/null +++ b/gr-blocks/grc/blocks_xor_xx.block.yml @@ -0,0 +1,34 @@ +id: blocks_xor_xx +label: Xor + +parameters: +- id: type + label: IO Type + dtype: enum + options: [int, short, byte] + option_attributes: + fcn: [ii, ss, bb] + hide: part +- id: num_inputs + label: Num Inputs + dtype: int + default: '2' + hide: part + +inputs: +- domain: stream + dtype: ${ type } + multiplicity: ${ num_inputs } + +outputs: +- domain: stream + dtype: ${ type } + +asserts: +- ${ num_inputs >= 2 } + +templates: + imports: from gnuradio import blocks + make: blocks.xor_${type.fcn}() + +file_format: 1 diff --git a/gr-blocks/grc/blocks_xor_xx.xml b/gr-blocks/grc/blocks_xor_xx.xml deleted file mode 100644 index 87cb8864ca..0000000000 --- a/gr-blocks/grc/blocks_xor_xx.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Logical Xor Block -################################################### - --> -<block> - <name>Xor</name> - <key>blocks_xor_xx</key> - <import>from gnuradio import blocks</import> - <make>blocks.xor_$(type.fcn)()</make> - <param> - <name>IO Type</name> - <key>type</key> - <type>enum</type> - <option> - <name>Int</name> - <key>int</key> - <opt>fcn:ii</opt> - </option> - <option> - <name>Short</name> - <key>short</key> - <opt>fcn:ss</opt> - </option> - <option> - <name>Byte</name> - <key>byte</key> - <opt>fcn:bb</opt> - </option> - </param> - <param> - <name>Num Inputs</name> - <key>num_inputs</key> - <value>2</value> - <type>int</type> - </param> - <check>$num_inputs >= 2</check> - <sink> - <name>in</name> - <type>$type</type> - <nports>$num_inputs</nports> - </sink> - <source> - <name>out</name> - <type>$type</type> - </source> -</block> diff --git a/gr-blocks/grc/xmlrpc_client.block.yml b/gr-blocks/grc/xmlrpc_client.block.yml new file mode 100644 index 0000000000..fd9057b1b8 --- /dev/null +++ b/gr-blocks/grc/xmlrpc_client.block.yml @@ -0,0 +1,30 @@ +id: xmlrpc_client +label: XMLRPC Client + +parameters: +- id: addr + label: Address + dtype: string + default: localhost +- id: port + label: Port + dtype: int + default: '8080' +- id: callback + label: Callback + dtype: string + default: set_ +- id: variable + label: Variable + dtype: raw + +templates: + imports: import xmlrpclib + make: xmlrpclib.Server('http://$(addr):$(port)') + callbacks: + - ${callback}(${variable}) + +documentation: |- + This block will create an XMLRPC client. The client will execute the callback on the server when the variable is changed. The callback should be a the name of a function registered on the server. The variable should be an expression containing a the name of a variable in flow graph. + +file_format: 1 diff --git a/gr-blocks/grc/xmlrpc_client.xml b/gr-blocks/grc/xmlrpc_client.xml deleted file mode 100644 index dc4d154d14..0000000000 --- a/gr-blocks/grc/xmlrpc_client.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Simple XMLRPC Client -################################################### - --> -<block> - <name>XMLRPC Client</name> - <key>xmlrpc_client</key> - <import>import xmlrpclib</import> - <make>xmlrpclib.Server('http://$(addr()):$(port)')</make> - <callback>$(callback())($variable)</callback> - <param> - <name>Address</name> - <key>addr</key> - <value>localhost</value> - <type>string</type> - </param> - <param> - <name>Port</name> - <key>port</key> - <value>8080</value> - <type>int</type> - </param> - <param> - <name>Callback</name> - <key>callback</key> - <value>set_</value> - <type>string</type> - </param> - <param> - <name>Variable</name> - <key>variable</key> - <type>raw</type> - </param> - <doc> -This block will create an XMLRPC client. \ -The client will execute the callback on the server when the variable is changed. \ -The callback should be a the name of a function registered on the server. \ -The variable should be an expression containing a the name of a variable in flow graph. - </doc> -</block> diff --git a/gr-blocks/grc/xmlrpc_server.block.yml b/gr-blocks/grc/xmlrpc_server.block.yml new file mode 100644 index 0000000000..fb33fa79a8 --- /dev/null +++ b/gr-blocks/grc/xmlrpc_server.block.yml @@ -0,0 +1,34 @@ +id: xmlrpc_server +label: XMLRPC Server + +parameters: +- id: addr + label: Address + dtype: string + default: localhost +- id: port + label: Port + dtype: int + default: '8080' + +templates: + imports: |- + import SimpleXMLRPCServer + import threading + make: |- + SimpleXMLRPCServer.SimpleXMLRPCServer((${addr}, ${port}), allow_none=True) + self.${id}.register_instance(self) + self.${id}_thread = threading.Thread(target=self.${id}.serve_forever) + self.${id}_thread.daemon = True + self.${id}_thread.start() + +documentation: |- + This block will start an XMLRPC server. The server provides access to the run, start, stop, wait functions of the flow graph. The server also provides access to the variable callbacks in the flow graph. Ex: If the variable is called freq, the function provided by the server will be called set_freq(new_freq). + + Example client in python: + + import xmlrpclib + s = xmlrpclib.Server('http://localhost:8080') + s.set_freq(5000) + +file_format: 1 diff --git a/gr-blocks/grc/xmlrpc_server.xml b/gr-blocks/grc/xmlrpc_server.xml deleted file mode 100644 index 602d444161..0000000000 --- a/gr-blocks/grc/xmlrpc_server.xml +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0"?> -<!-- -################################################### -##Simple XMLRPC Server -################################################### - --> -<block> - <name>XMLRPC Server</name> - <key>xmlrpc_server</key> - <import>import SimpleXMLRPCServer</import> - <import>import threading</import> - <make>SimpleXMLRPCServer.SimpleXMLRPCServer(($addr, $port), allow_none=True) -self.$(id).register_instance(self) -self.$(id)_thread = threading.Thread(target=self.$(id).serve_forever) -self.$(id)_thread.daemon = True -self.$(id)_thread.start()</make> - <param> - <name>Address</name> - <key>addr</key> - <value>localhost</value> - <type>string</type> - </param> - <param> - <name>Port</name> - <key>port</key> - <value>8080</value> - <type>int</type> - </param> - <doc> -This block will start an XMLRPC server. \ -The server provides access to the run, start, stop, wait functions of the flow graph. \ -The server also provides access to the variable callbacks in the flow graph. \ -Ex: If the variable is called freq, the function provided by the server will be called set_freq(new_freq). - -Example client in python: - -import xmlrpclib -s = xmlrpclib.Server('http://localhost:8080') -s.set_freq(5000) - </doc> -</block> |