aboutsummaryrefslogtreecommitdiffstats
path: root/grc/decoding
diff options
context:
space:
mode:
authorVasil Velichkov <vvvelichkov@gmail.com>2019-08-28 18:46:34 +0000
committerPiotr Krysik <ptrkrysik@gmail.com>2021-05-03 07:14:00 +0200
commit14ea82d227f5fe76ba048fd7dc6cbcfd97d07afc (patch)
tree2c9a65f9a96f3c2b215b42e690b465150c09f7ef /grc/decoding
parent1789ae28ee94f5438729e6f15fa1a0937a4acf87 (diff)
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
Diffstat (limited to 'grc/decoding')
-rw-r--r--grc/decoding/CMakeLists.txt6
-rw-r--r--grc/decoding/gsm_control_channels_decoder.block.yml19
-rw-r--r--grc/decoding/gsm_control_channels_decoder.xml16
-rw-r--r--grc/decoding/gsm_tch_f_decoder.block.yml41
-rw-r--r--grc/decoding/gsm_tch_f_decoder.xml90
-rw-r--r--grc/decoding/gsm_tch_h_decoder.block.yml51
-rw-r--r--grc/decoding/gsm_tch_h_decoder.xml70
7 files changed, 114 insertions, 179 deletions
diff --git a/grc/decoding/CMakeLists.txt b/grc/decoding/CMakeLists.txt
index d488f21..63a2ee6 100644
--- a/grc/decoding/CMakeLists.txt
+++ b/grc/decoding/CMakeLists.txt
@@ -18,8 +18,8 @@
# Boston, MA 02110-1301, USA.
install(FILES
- gsm_control_channels_decoder.xml
- gsm_tch_f_decoder.xml
- gsm_tch_h_decoder.xml
+ gsm_control_channels_decoder.block.yml
+ gsm_tch_f_decoder.block.yml
+ gsm_tch_h_decoder.block.yml
DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/decoding/gsm_control_channels_decoder.block.yml b/grc/decoding/gsm_control_channels_decoder.block.yml
new file mode 100644
index 0000000..df287a3
--- /dev/null
+++ b/grc/decoding/gsm_control_channels_decoder.block.yml
@@ -0,0 +1,19 @@
+# auto-generated by grc.converter
+
+id: gsm_control_channels_decoder
+label: Control channels decoder
+
+inputs:
+- domain: message
+ id: bursts
+
+outputs:
+- domain: message
+ id: msgs
+ optional: true
+
+templates:
+ imports: import grgsm
+ make: grgsm.control_channels_decoder()
+
+file_format: 1
diff --git a/grc/decoding/gsm_control_channels_decoder.xml b/grc/decoding/gsm_control_channels_decoder.xml
deleted file mode 100644
index 5884393..0000000
--- a/grc/decoding/gsm_control_channels_decoder.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<block>
- <name>Control channels decoder</name>
- <key>gsm_control_channels_decoder</key>
- <import>import grgsm</import>
- <make>grgsm.control_channels_decoder()</make>
- <sink>
- <name>bursts</name>
- <type>message</type>
- </sink>
- <source>
- <name>msgs</name>
- <type>message</type>
- <optional>1</optional>
- </source>
-</block>
diff --git a/grc/decoding/gsm_tch_f_decoder.block.yml b/grc/decoding/gsm_tch_f_decoder.block.yml
new file mode 100644
index 0000000..1205448
--- /dev/null
+++ b/grc/decoding/gsm_tch_f_decoder.block.yml
@@ -0,0 +1,41 @@
+# auto-generated by grc.converter
+
+id: gsm_tch_f_decoder
+label: TCH/F decoder
+
+parameters:
+- id: mode
+ label: TCH coding mode
+ dtype: enum
+ options: [grgsm.TCH_FS, grgsm.TCH_EFR, grgsm.TCH_AFS12_2, grgsm.TCH_AFS10_2, grgsm.TCH_AFS7_95,
+ grgsm.TCH_AFS7_4, grgsm.TCH_AFS6_7, grgsm.TCH_AFS5_9, grgsm.TCH_AFS5_15, grgsm.TCH_AFS4_75]
+ option_labels: [GSM-FR, GSM-EFR, GSM-AMR 12.2, GSM-AMR 10.2, GSM-AMR 7.95, GSM-AMR
+ 7.4, GSM-AMR 6.7, GSM-AMR 5.9, GSM-AMR 5.15, GSM-AMR 4.75]
+- id: boundary_check
+ label: Voice boundary detection
+ dtype: bool
+ default: 'False'
+ options: ['False', 'True']
+
+inputs:
+- domain: message
+ id: bursts
+
+outputs:
+- domain: message
+ id: msgs
+ optional: true
+- domain: message
+ id: voice
+ optional: true
+
+templates:
+ imports: import grgsm
+ make: grgsm.tch_f_decoder(${mode}, ${boundary_check})
+
+documentation: "If \"Voice boundary detection\" is enabled, then only bursts are decoded\
+ \ as voice where\n\n- the framenumber is greater then the framenumber of a received\
+ \ \"Connect\" or \"Connect Acknowlegde\" message, and \n- the framenumber is less\
+ \ then the framenumber of a \"Release\" message"
+
+file_format: 1
diff --git a/grc/decoding/gsm_tch_f_decoder.xml b/grc/decoding/gsm_tch_f_decoder.xml
deleted file mode 100644
index 3d1152e..0000000
--- a/grc/decoding/gsm_tch_f_decoder.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0"?>
-<block>
- <name>TCH/F decoder</name>
- <key>gsm_tch_f_decoder</key>
- <import>import grgsm</import>
- <make>grgsm.tch_f_decoder($mode, $boundary_check)</make>
-
- <param>
- <name>TCH coding mode</name>
- <key>mode</key>
- <type>enum</type>
- <option>
- <name>GSM-FR</name>
- <key>grgsm.TCH_FS</key>
- </option>
- <option>
- <name>GSM-EFR</name>
- <key>grgsm.TCH_EFR</key>
- </option>
- <option>
- <name>GSM-AMR 12.2</name>
- <key>grgsm.TCH_AFS12_2</key>
- </option>
- <option>
- <name>GSM-AMR 10.2</name>
- <key>grgsm.TCH_AFS10_2</key>
- </option>
- <option>
- <name>GSM-AMR 7.95</name>
- <key>grgsm.TCH_AFS7_95</key>
- </option>
- <option>
- <name>GSM-AMR 7.4</name>
- <key>grgsm.TCH_AFS7_4</key>
- </option>
- <option>
- <name>GSM-AMR 6.7</name>
- <key>grgsm.TCH_AFS6_7</key>
- </option>
- <option>
- <name>GSM-AMR 5.9</name>
- <key>grgsm.TCH_AFS5_9</key>
- </option>
- <option>
- <name>GSM-AMR 5.15</name>
- <key>grgsm.TCH_AFS5_15</key>
- </option>
- <option>
- <name>GSM-AMR 4.75</name>
- <key>grgsm.TCH_AFS4_75</key>
- </option>
- </param>
- <param>
- <name>Voice boundary detection</name>
- <key>boundary_check</key>
- <value>False</value>
- <type>bool</type>
- <option>
- <name>False</name>
- <key>False</key>
- </option>
- <option>
- <name>True</name>
- <key>True</key>
- </option>
- </param>
-
- <sink>
- <name>bursts</name>
- <type>message</type>
- </sink>
- <source>
- <name>msgs</name>
- <type>message</type>
- <optional>1</optional>
- </source>
- <source>
- <name>voice</name>
- <type>message</type>
- <optional>1</optional>
- </source>
-
- <doc>
-If "Voice boundary detection" is enabled, then only bursts are decoded as voice where
-
-- the framenumber is greater then the framenumber of a received "Connect" or "Connect Acknowlegde" message, and
-- the framenumber is less then the framenumber of a "Release" message
- </doc>
-
-</block>
diff --git a/grc/decoding/gsm_tch_h_decoder.block.yml b/grc/decoding/gsm_tch_h_decoder.block.yml
new file mode 100644
index 0000000..8d26a0b
--- /dev/null
+++ b/grc/decoding/gsm_tch_h_decoder.block.yml
@@ -0,0 +1,51 @@
+# auto-generated by grc.converter
+
+id: gsm_tch_h_decoder
+label: TCH/H decoder
+
+parameters:
+- id: sub_channel
+ label: Sub-channel number
+ dtype: int
+ default: '0'
+ options: ['0', '1']
+ hide: none
+- id: multi_rate
+ label: MultiRate configuration
+ dtype: string
+- id: boundary_check
+ label: Voice boundary detection
+ dtype: bool
+ default: 'False'
+ options: ['False', 'True']
+
+inputs:
+- domain: message
+ id: bursts
+
+outputs:
+- domain: message
+ id: msgs
+ optional: true
+- domain: message
+ id: voice
+ optional: true
+asserts:
+- ${ sub_channel > -1 and sub_channel < 2 }
+
+templates:
+ imports: import grgsm
+ make: grgsm.tch_h_decoder(${sub_channel}, ${multi_rate}, ${boundary_check})
+
+documentation: |-
+ The MultiRate configuration string should contains the hex string from the
+ MultiRate configuration element from the Assignment Command message.
+ Example: 28111a40.
+ See 3GPP TS 44.018 - 10.5.2.21aa MultiRate configuratio
+
+ If "Voice boundary detection" is enabled, then only bursts are decoded as voice where
+
+ - the framenumber is greater then the framenumber of a received "Connect" or "Connect Acknowlegde" message, and
+ - the framenumber is less then the framenumber of a "Release" message
+
+file_format: 1
diff --git a/grc/decoding/gsm_tch_h_decoder.xml b/grc/decoding/gsm_tch_h_decoder.xml
deleted file mode 100644
index 3936336..0000000
--- a/grc/decoding/gsm_tch_h_decoder.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0"?>
-<block>
- <name>TCH/H decoder</name>
- <key>gsm_tch_h_decoder</key>
- <import>import grgsm</import>
- <make>grgsm.tch_h_decoder($sub_channel, $multi_rate, $boundary_check)</make>
-
- <param>
- <name>Sub-channel number</name>
- <key>sub_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>
- <param>
- <name>MultiRate configuration</name>
- <key>multi_rate</key>
- <type>string</type>
- </param>
- <param>
- <name>Voice boundary detection</name>
- <key>boundary_check</key>
- <value>False</value>
- <type>bool</type>
- <option>
- <name>False</name>
- <key>False</key>
- </option>
- <option>
- <name>True</name>
- <key>True</key>
- </option>
- </param>
- <check>$sub_channel() &gt; -1 and $sub_channel() &lt; 2</check>
- <sink>
- <name>bursts</name>
- <type>message</type>
- </sink>
- <source>
- <name>msgs</name>
- <type>message</type>
- <optional>1</optional>
- </source>
- <source>
- <name>voice</name>
- <type>message</type>
- <optional>1</optional>
- </source>
-
- <doc>
-The MultiRate configuration string should contains the hex string from the
-MultiRate configuration element from the Assignment Command message.
-Example: 28111a40.
-See 3GPP TS 44.018 - 10.5.2.21aa MultiRate configuratio
-
-If "Voice boundary detection" is enabled, then only bursts are decoded as voice where
-
-- the framenumber is greater then the framenumber of a received "Connect" or "Connect Acknowlegde" message, and
-- the framenumber is less then the framenumber of a "Release" message
- </doc>
-
-</block>