gr38: Convert blocks from xml to yml

Added minor fixes compared to the original patch

From: A. Maitland Bottoms <bottoms@debian.org>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
gr3.8
A. Maitland Bottoms 3 years ago committed by Sylvain Munaut
parent fc67c92f0a
commit c3ae8fb9ef
  1. 5
      grc/CMakeLists.txt
  2. 4
      grc/iqbalance.tree.yml
  3. 43
      grc/iqbalance_fix_cc.block.yml
  4. 33
      grc/iqbalance_fix_cc.xml
  5. 33
      grc/iqbalance_optimize_c.block.yml
  6. 23
      grc/iqbalance_optimize_c.xml

@ -17,7 +17,8 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
install(FILES
iqbalance_fix_cc.xml
iqbalance_optimize_c.xml
iqbalance_fix_cc.block.yml
iqbalance_optimize_c.block.yml
iqbalance.tree.yml
DESTINATION share/gnuradio/grc/blocks
)

@ -0,0 +1,4 @@
'[Core]':
- IQ Balance:
- iqbalance_fix_cc
- iqbalance_optimize_c

@ -0,0 +1,43 @@
id: iqbalance_fix_cc
label: IQ Bal Fix
flags: [ python, cpp ]
parameters:
- id: mag
label: Magnitude
dtype: real
default: 0
- id: phase
label: Phase
dtype: real
default: 0
inputs:
- domain: stream
dtype: complex
- domain: message
id: iqbal_corr
dtype: complex
optional: true
outputs:
- domain: stream
dtype: complex
templates:
imports: from gnuradio import iqbalance
make: iqbalance.fix_cc(${mag}, ${phase})
callbacks:
- set_mag(${mag})
- set_phase(${phase})
cpp_templates:
includes: ['#include <gnuradio/iqbalance.h>']
declarations: 'iqbalance::fix_cc::sptr ${id};'
make: 'this->${id} = iqbalance::fix_cc::make(${mag}, ${phase});'
callbacks:
- set_mag(${mag})
- set_phase(${phase})
link: ['gnuradio-iqbalance']
file_format: 1

@ -1,33 +0,0 @@
<?xml version="1.0"?>
<block>
<name>IQ Bal Fix</name>
<key>iqbalance_fix_cc</key>
<category>IQ Balance</category>
<import>from gnuradio import iqbalance</import>
<make>iqbalance.fix_cc($mag, $phase)</make>
<callback>set_mag($mag)</callback>
<callback>set_phase($phase)</callback>
<param>
<name>Magnitude</name>
<key>mag</key>
<type>real</type>
</param>
<param>
<name>Phase</name>
<key>phase</key>
<type>real</type>
</param>
<sink>
<name>in</name>
<type>complex</type>
</sink>
<sink>
<name>iqbal_corr</name>
<type>message</type>
<optional>1</optional>
</sink>
<source>
<name>out</name>
<type>complex</type>
</source>
</block>

@ -0,0 +1,33 @@
id: iqbalance_optimize_c
label: IQ Bal Optimize
flags: [ python, cpp ]
parameters:
- id: period
label: Period
dtype: int
inputs:
- domain: stream
dtype: complex
outputs:
- domain: message
id: iqbal_corr
dtype: complex
optional: true
templates:
imports: from gnuradio import iqbalance
make: iqbalance.optimize_c(${period})
callbacks:
- set_period(${period})
cpp_templates:
includes: ['#include <gnuradio/iqbalance.h>']
declarations: 'iqbalance::optimize_c::sptr ${id};'
make: 'this->${id} = iqbalance::optimize_c::make(${period});'
callbacks:
- set_period(${period})
link: ['gnuradio-iqbalance']
file_format: 1

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<block>
<name>IQ Bal Optimize</name>
<key>iqbalance_optimize_c</key>
<category>IQ Balance</category>
<import>from gnuradio import iqbalance</import>
<make>iqbalance.optimize_c($period)</make>
<callback>set_period($period)</callback>
<param>
<name>Period</name>
<key>period</key>
<type>int</type>
</param>
<sink>
<name>in</name>
<type>complex</type>
</sink>
<source>
<name>iqbal_corr</name>
<type>message</type>
<optional>1</optional>
</source>
</block>
Loading…
Cancel
Save