diff options
author | Roman Khassraf <roman@khassraf.at> | 2015-07-27 15:52:02 +0200 |
---|---|---|
committer | Roman Khassraf <roman@khassraf.at> | 2015-07-27 15:52:02 +0200 |
commit | adea86fec54ace049addd35166345ad4abcaa3f2 (patch) | |
tree | 633aa4b1680795e4e054d54cf988ac29805d9db8 /grc/misc_utils | |
parent | 2bf49e4dd58d1c0833bde8f6af3fe0d71b2b694b (diff) |
Implemented message source block for unit testing
Diffstat (limited to 'grc/misc_utils')
-rw-r--r-- | grc/misc_utils/CMakeLists.txt | 3 | ||||
-rw-r--r-- | grc/misc_utils/gsm_message_source.xml | 32 |
2 files changed, 34 insertions, 1 deletions
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> |