aboutsummaryrefslogtreecommitdiffstats
path: root/grc
diff options
context:
space:
mode:
authorRoman Khassraf <roman@khassraf.at>2015-07-27 15:52:02 +0200
committerRoman Khassraf <roman@khassraf.at>2015-07-27 15:52:02 +0200
commitadea86fec54ace049addd35166345ad4abcaa3f2 (patch)
tree633aa4b1680795e4e054d54cf988ac29805d9db8 /grc
parent2bf49e4dd58d1c0833bde8f6af3fe0d71b2b694b (diff)
Implemented message source block for unit testing
Diffstat (limited to 'grc')
-rw-r--r--grc/CMakeLists.txt3
-rw-r--r--grc/gsm_block_tree.xml1
-rw-r--r--grc/misc_utils/CMakeLists.txt3
-rw-r--r--grc/misc_utils/gsm_message_source.xml32
4 files changed, 36 insertions, 3 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index caf2660..d42bff8 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -23,6 +23,5 @@ add_subdirectory(demapping)
add_subdirectory(receiver)
add_subdirectory(misc_utils)
install(FILES
- gsm_block_tree.xml
- DESTINATION share/gnuradio/grc/blocks
+ gsm_block_tree.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/gsm_block_tree.xml b/grc/gsm_block_tree.xml
index 2503710..5837ce2 100644
--- a/grc/gsm_block_tree.xml
+++ b/grc/gsm_block_tree.xml
@@ -51,6 +51,7 @@
<block>gsm_message_printer</block>
<block>gsm_clock_offset_corrector</block>
<block>gsm_tmsi_dumper</block>
+ <block>gsm_message_source</block>
</cat>
</cat>
</cat>
diff --git a/grc/misc_utils/CMakeLists.txt b/grc/misc_utils/CMakeLists.txt
index 5a3f874..403a321 100644
--- a/grc/misc_utils/CMakeLists.txt
+++ b/grc/misc_utils/CMakeLists.txt
@@ -29,5 +29,6 @@ install(FILES
gsm_burst_sink.xml
gsm_burst_source.xml
gsm_burst_source_qa.xml
- gsm_burst_sink_qa.xml DESTINATION share/gnuradio/grc/blocks
+ gsm_burst_sink_qa.xml
+ gsm_message_source.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/misc_utils/gsm_message_source.xml b/grc/misc_utils/gsm_message_source.xml
new file mode 100644
index 0000000..ab06f65
--- /dev/null
+++ b/grc/misc_utils/gsm_message_source.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<block>
+ <name>Message Source</name>
+ <key>gsm_message_source</key>
+ <import>import grgsm</import>
+ <make>grgsm.message_source($messages)</make>
+
+ <param>
+ <name>Messages</name>
+ <key>messages</key>
+ <value>["02 04 01 00 00 00 c9 00 00 1d 3c e5 02 00 01 00 15 06 21 00 01 f0 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b",
+"02 04 01 00 00 00 ca 00 00 1d 3c e9 02 00 02 00 15 06 21 00 01 f0 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b",
+"02 04 01 00 00 00 cb 00 00 1d 3d 0e 01 00 00 00 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff e5 04 00",
+"02 04 01 00 00 00 cb 00 00 1d 3d 12 02 00 00 00 15 06 21 00 01 f0 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b"]</value>
+ <type>raw</type>
+ <hide>true</hide>
+ </param>
+
+ <source>
+ <name>msgs</name>
+ <type>message</type>
+ </source>
+
+ <doc>
+This block is a basic message source for testing purposes.
+
+It takes a list of strings as input, where each string
+is a whitespace-separated list of hexadecimal values representing the data bytes of a message including the gsmtap header.
+
+Such strings can be obtained using the message printer with option "Print GSMTap header"
+ </doc>
+</block>