Migrate grc blocks from xml to yaml

Convert the blocks using cmdline_converter.py script from
https://gist.githubusercontent.com/haakov/4228ff6a14486641add538483093e86b/raw/c861a840e31182ace2e74f5425e356cb4f8b183a/cmdline_converter.py

Change-Id: Iee5c611a2e100bd2fdf487611a867dc937d8c292
diff --git a/grc/demapping/CMakeLists.txt b/grc/demapping/CMakeLists.txt
index 4aacfff..2572235 100644
--- a/grc/demapping/CMakeLists.txt
+++ b/grc/demapping/CMakeLists.txt
@@ -18,11 +18,11 @@
 # Boston, MA 02110-1301, USA.
 
 install(FILES
-    gsm_universal_ctrl_chans_demapper.xml
-    gsm_bcch_ccch_demapper.xml
-    gsm_bcch_ccch_sdcch4_demapper.xml
-    gsm_sdcch8_demapper.xml
-    gsm_tch_f_chans_demapper.xml
-    gsm_tch_h_chans_demapper.xml
+    gsm_universal_ctrl_chans_demapper.block.yml
+    gsm_bcch_ccch_demapper.block.yml
+    gsm_bcch_ccch_sdcch4_demapper.block.yml
+    gsm_sdcch8_demapper.block.yml
+    gsm_tch_f_chans_demapper.block.yml
+    gsm_tch_h_chans_demapper.block.yml
     DESTINATION share/gnuradio/grc/blocks
 )
diff --git a/grc/demapping/gsm_bcch_ccch_demapper.block.yml b/grc/demapping/gsm_bcch_ccch_demapper.block.yml
new file mode 100644
index 0000000..21e87d8
--- /dev/null
+++ b/grc/demapping/gsm_bcch_ccch_demapper.block.yml
@@ -0,0 +1,35 @@
+# auto-generated by grc.converter
+
+id: gsm_bcch_ccch_demapper
+label: BCCH + CCCH Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: timeslot_nr
+    dtype: raw
+    default: '0'
+
+inputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+outputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+templates:
+    imports: import grgsm
+    make: |-
+        grgsm.gsm_bcch_ccch_demapper(
+            timeslot_nr=${timeslot_nr},
+        )
+    callbacks:
+    - set_timeslot_nr(${timeslot_nr})
+
+documentation: |-
+    Piotr Krysik
+    Demapper for BCCH + CCCH control channels. This corresponds to channel combination iv specified in GSM 05.02, section 6.4
+
+file_format: 1
diff --git a/grc/demapping/gsm_bcch_ccch_demapper.xml b/grc/demapping/gsm_bcch_ccch_demapper.xml
deleted file mode 100644
index 239dcc9..0000000
--- a/grc/demapping/gsm_bcch_ccch_demapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<block>
-  <name>BCCH + CCCH Demapper</name>
-  <key>gsm_bcch_ccch_demapper</key>
-  <category></category>
-  <import>import grgsm</import>
-  <make>grgsm.gsm_bcch_ccch_demapper(
-    timeslot_nr=$timeslot_nr,
-)</make>
-  <callback>set_timeslot_nr($timeslot_nr)</callback>
-  <param>
-    <name>timeslot_nr</name>
-    <key>timeslot_nr</key>
-    <value>0</value>
-    <type>raw</type>
-  </param>
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </sink>
-  <source>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-  <doc>Piotr Krysik
-Demapper for BCCH + CCCH control channels. This corresponds to channel combination iv specified in GSM 05.02, section 6.4
-</doc>
-  <grc_source>gr-gsm/hier_blocks/demapping/gsm_bcch_ccch_demapper.grc</grc_source>
-</block>
diff --git a/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.block.yml b/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.block.yml
new file mode 100644
index 0000000..d40a4e1
--- /dev/null
+++ b/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.block.yml
@@ -0,0 +1,35 @@
+# auto-generated by grc.converter
+
+id: gsm_bcch_ccch_sdcch4_demapper
+label: BCCH + CCCH + SDCCH/4 Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: timeslot_nr
+    dtype: raw
+    default: '0'
+
+inputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+outputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+templates:
+    imports: import grgsm
+    make: |-
+        grgsm.gsm_bcch_ccch_sdcch4_demapper(
+            timeslot_nr=${timeslot_nr},
+        )
+    callbacks:
+    - set_timeslot_nr(${timeslot_nr})
+
+documentation: |-
+    Piotr Krysik
+    Demapper for BCCH + CCCH + SDCCH/4 + SACCH/C4 control channels. This corresponds to channel combination v specified in GSM 05.02, section 6.4
+
+file_format: 1
diff --git a/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.xml b/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.xml
deleted file mode 100644
index 6c6845a..0000000
--- a/grc/demapping/gsm_bcch_ccch_sdcch4_demapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<block>
-  <name>BCCH + CCCH + SDCCH/4 Demapper</name>
-  <key>gsm_bcch_ccch_sdcch4_demapper</key>
-  <category></category>
-  <import>import grgsm</import>
-  <make>grgsm.gsm_bcch_ccch_sdcch4_demapper(
-    timeslot_nr=$timeslot_nr,
-)</make>
-  <callback>set_timeslot_nr($timeslot_nr)</callback>
-  <param>
-    <name>timeslot_nr</name>
-    <key>timeslot_nr</key>
-    <value>0</value>
-    <type>raw</type>
-  </param>
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </sink>
-  <source>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-  <doc>Piotr Krysik
-Demapper for BCCH + CCCH + SDCCH/4 + SACCH/C4 control channels. This corresponds to channel combination v specified in GSM 05.02, section 6.4
-</doc>
-  <grc_source>gr-gsm/hier_blocks/demapping/gsm_bcch_ccch_sdcch4_demapper.grc</grc_source>
-</block>
diff --git a/grc/demapping/gsm_sdcch8_demapper.block.yml b/grc/demapping/gsm_sdcch8_demapper.block.yml
new file mode 100644
index 0000000..66a50c0
--- /dev/null
+++ b/grc/demapping/gsm_sdcch8_demapper.block.yml
@@ -0,0 +1,35 @@
+# auto-generated by grc.converter
+
+id: gsm_sdcch8_demapper
+label: SDCCH/8 Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: timeslot_nr
+    dtype: raw
+    default: '1'
+
+inputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+outputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+templates:
+    imports: import grgsm
+    make: |-
+        grgsm.gsm_sdcch8_demapper(
+            timeslot_nr=${timeslot_nr},
+        )
+    callbacks:
+    - set_timeslot_nr(${timeslot_nr})
+
+documentation: |-
+    Piotr Krysik
+    Demapper for SDCCH/8 + SACCH/C8 control channels. This corresponds to channel combination vii specified in GSM 05.02, section 6.4
+
+file_format: 1
diff --git a/grc/demapping/gsm_sdcch8_demapper.xml b/grc/demapping/gsm_sdcch8_demapper.xml
deleted file mode 100644
index 0c62a46..0000000
--- a/grc/demapping/gsm_sdcch8_demapper.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<block>
-  <name>SDCCH/8 Demapper</name>
-  <key>gsm_sdcch8_demapper</key>
-  <category></category>
-  <import>import grgsm</import>
-  <make>grgsm.gsm_sdcch8_demapper(
-    timeslot_nr=$timeslot_nr,
-)</make>
-  <callback>set_timeslot_nr($timeslot_nr)</callback>
-  <param>
-    <name>timeslot_nr</name>
-    <key>timeslot_nr</key>
-    <value>1</value>
-    <type>raw</type>
-  </param>
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </sink>
-  <source>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-  <doc>Piotr Krysik
-Demapper for SDCCH/8 + SACCH/C8 control channels. This corresponds to channel combination vii specified in GSM 05.02, section 6.4
-</doc>
-  <grc_source>gr-gsm/hier_blocks/demapping/gsm_sdcch8_demapper.grc</grc_source>
-</block>
diff --git a/grc/demapping/gsm_tch_f_chans_demapper.block.yml b/grc/demapping/gsm_tch_f_chans_demapper.block.yml
new file mode 100644
index 0000000..8d10c1d
--- /dev/null
+++ b/grc/demapping/gsm_tch_f_chans_demapper.block.yml
@@ -0,0 +1,30 @@
+# auto-generated by grc.converter
+
+id: gsm_tch_f_chans_demapper
+label: TCH/F Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: Timeslot
+    dtype: int
+    default: '2'
+    hide: part
+
+inputs:
+-   domain: message
+    id: bursts
+    optional: true
+
+outputs:
+-   domain: message
+    id: tch_bursts
+    optional: true
+-   domain: message
+    id: acch_bursts
+    optional: true
+
+templates:
+    imports: import grgsm
+    make: grgsm.tch_f_chans_demapper(${timeslot_nr})
+
+file_format: 1
diff --git a/grc/demapping/gsm_tch_f_chans_demapper.xml b/grc/demapping/gsm_tch_f_chans_demapper.xml
deleted file mode 100644
index 33b4153..0000000
--- a/grc/demapping/gsm_tch_f_chans_demapper.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<block>
-  <name>TCH/F Demapper</name>
-  <key>gsm_tch_f_chans_demapper</key>
-  <import>import grgsm</import>
-  <make>grgsm.tch_f_chans_demapper($timeslot_nr)</make>
-
-  <param>
-    <name>Timeslot</name>
-    <key>timeslot_nr</key>
-    <value>2</value>
-    <type>int</type>
-    <hide>part</hide>
-  </param>
-
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </sink>
-  <source>
-    <name>tch_bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-  <source>
-    <name>acch_bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-</block>
diff --git a/grc/demapping/gsm_tch_h_chans_demapper.block.yml b/grc/demapping/gsm_tch_h_chans_demapper.block.yml
new file mode 100644
index 0000000..4c8610e
--- /dev/null
+++ b/grc/demapping/gsm_tch_h_chans_demapper.block.yml
@@ -0,0 +1,37 @@
+# auto-generated by grc.converter
+
+id: gsm_tch_h_chans_demapper
+label: TCH/H Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: Timeslot
+    dtype: int
+    default: '2'
+    hide: none
+-   id: tch_h_channel
+    label: Sub-channel number
+    dtype: int
+    default: '0'
+    options: ['0', '1']
+    hide: none
+
+inputs:
+-   domain: message
+    id: bursts
+
+outputs:
+-   domain: message
+    id: tch_bursts
+    optional: true
+-   domain: message
+    id: acch_bursts
+    optional: true
+asserts:
+- ${ tch_h_channel > -1 and tch_h_channel < 2 }
+
+templates:
+    imports: import grgsm
+    make: grgsm.tch_h_chans_demapper(${timeslot_nr}, ${tch_h_channel})
+
+file_format: 1
diff --git a/grc/demapping/gsm_tch_h_chans_demapper.xml b/grc/demapping/gsm_tch_h_chans_demapper.xml
deleted file mode 100644
index 52148f5..0000000
--- a/grc/demapping/gsm_tch_h_chans_demapper.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<block>
-  <name>TCH/H Demapper</name>
-  <key>gsm_tch_h_chans_demapper</key>
-  <import>import grgsm</import>
-  <make>grgsm.tch_h_chans_demapper($timeslot_nr, $tch_h_channel)</make>
-
-  <param>
-    <name>Timeslot</name>
-    <key>timeslot_nr</key>
-    <value>2</value>
-    <type>int</type>
-    <hide>none</hide>
-  </param>
-
-  <param>
-    <name>Sub-channel number</name>
-    <key>tch_h_channel</key>
-    <value>0</value>
-    <type>int</type>
-    <hide>none</hide>
-    <option>
-      <name>0</name>
-      <key>0</key>
-    </option>
-    <option>
-      <name>1</name>
-      <key>1</key>
-    </option>
-  </param>
-  <check>$tch_h_channel() &gt; -1 and $tch_h_channel() &lt; 2</check>
-
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-  </sink>
-  <source>
-    <name>tch_bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-  <source>
-    <name>acch_bursts</name>
-    <type>message</type>
-    <optional>1</optional>
-  </source>
-</block>
diff --git a/grc/demapping/gsm_universal_ctrl_chans_demapper.block.yml b/grc/demapping/gsm_universal_ctrl_chans_demapper.block.yml
new file mode 100644
index 0000000..469384e
--- /dev/null
+++ b/grc/demapping/gsm_universal_ctrl_chans_demapper.block.yml
@@ -0,0 +1,61 @@
+# auto-generated by grc.converter
+
+id: gsm_universal_ctrl_chans_demapper
+label: Universal Control Channels Demapper
+
+parameters:
+-   id: timeslot_nr
+    label: timeslot_nr
+    dtype: int
+    default: '0'
+    hide: part
+-   id: downlink_starts_fn_mod51
+    label: downlink_starts_fn_mod51
+    dtype: int_vector
+    default: '[0,0,2,2,2,2,6,6,6,6,0,0,12,12,12,12,16,16,16,16,0,0,22,22,22,22,26,26,26,26,0,0,32,32,32,32,36,36,36,36,0,0,42,42,42,42,46,46,46,46,0,]'
+    hide: part
+-   id: downlink_channel_types
+    label: downlink_channel_types
+    dtype: int_vector
+    default: '[0,0,1,1,1,1,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,]'
+    hide: part
+-   id: downlink_subslots
+    label: downlink_subslots
+    dtype: int_vector
+    default: '[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]'
+    hide: part
+-   id: uplink_starts_fn_mod51
+    label: uplink_starts_fn_mod51
+    dtype: int_vector
+    default: '[0,0,0,0,0,0,6,6,6,6,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,41,41,41,41,0,0,47,47,47,47]'
+    hide: part
+-   id: uplink_channel_types
+    label: uplink_channel_types
+    dtype: int_vector
+    default: '[2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,]'
+    hide: part
+-   id: uplink_subslots
+    label: uplink_subslots
+    dtype: int_vector
+    default: '[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]'
+    hide: part
+
+inputs:
+-   domain: message
+    id: bursts
+
+outputs:
+-   domain: message
+    id: bursts
+
+templates:
+    imports: import grgsm
+    make: grgsm.universal_ctrl_chans_demapper(${timeslot_nr}, ${downlink_starts_fn_mod51},
+        ${downlink_channel_types}, ${downlink_subslots}, ${uplink_starts_fn_mod51},
+        ${uplink_channel_types}, ${uplink_subslots})
+
+documentation: |-
+    Universal demapper for control channels.
+          Author: Piotr Krysik
+
+file_format: 1
diff --git a/grc/demapping/gsm_universal_ctrl_chans_demapper.xml b/grc/demapping/gsm_universal_ctrl_chans_demapper.xml
deleted file mode 100644
index dcad1ae..0000000
--- a/grc/demapping/gsm_universal_ctrl_chans_demapper.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0"?>
-<block>
-  <name>Universal Control Channels Demapper</name>
-  <key>gsm_universal_ctrl_chans_demapper</key>
-  <import>import grgsm</import>
-  <make>grgsm.universal_ctrl_chans_demapper($timeslot_nr, $downlink_starts_fn_mod51, $downlink_channel_types, $downlink_subslots, $uplink_starts_fn_mod51, $uplink_channel_types, $uplink_subslots)</make>
-
-  <param>
-    <name>timeslot_nr</name>
-    <key>timeslot_nr</key>
-    <value>0</value>
-    <type>int</type>
-    <hide>part</hide>
-  </param>
-
-  <param>
-    <name>downlink_starts_fn_mod51</name>
-    <key>downlink_starts_fn_mod51</key>
-    <value>[0,0,2,2,2,2,6,6,6,6,0,0,12,12,12,12,16,16,16,16,0,0,22,22,22,22,26,26,26,26,0,0,32,32,32,32,36,36,36,36,0,0,42,42,42,42,46,46,46,46,0,]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>
-
-  <param>
-    <name>downlink_channel_types</name>
-    <key>downlink_channel_types</key>
-    <value>[0,0,1,1,1,1,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>
-
-  <param>
-    <name>downlink_subslots</name>
-    <key>downlink_subslots</key>
-    <value>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>
-
-  <param>
-    <name>uplink_starts_fn_mod51</name>
-    <key>uplink_starts_fn_mod51</key>
-    <value>[0,0,0,0,0,0,6,6,6,6,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,37,37,37,41,41,41,41,0,0,47,47,47,47]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>
-
-  <param>
-    <name>uplink_channel_types</name>
-    <key>uplink_channel_types</key>
-    <value>[2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,0,0,2,2,2,2,]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>
-  
-  <param>
-    <name>uplink_subslots</name>
-    <key>uplink_subslots</key>
-    <value>[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,]</value>
-    <type>int_vector</type>
-    <hide>part</hide>
-  </param>  
-
-  <sink>
-    <name>bursts</name>
-    <type>message</type>
-  </sink>
-  <source>
-    <name>bursts</name>
-    <type>message</type>
-  </source>
-  <doc>
-      Universal demapper for control channels.
-      Author: Piotr Krysik      
-  </doc>
-</block>