diff options
author | Nao Pross <np@0hm.ch> | 2021-11-21 10:40:53 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2021-11-21 10:40:53 +0100 |
commit | 2a3b0ef715d83c97ccb0c2b1eb63707a62ffe7a5 (patch) | |
tree | f45e5b6f5ec5a88456d94abc0a63173f355d2571 /src/gr-fadingui/grc | |
parent | Change chapter title (diff) | |
parent | Merge branch 'master' of github.com:NaoPross/Fading (diff) | |
download | Fading-2a3b0ef715d83c97ccb0c2b1eb63707a62ffe7a5.tar.gz Fading-2a3b0ef715d83c97ccb0c2b1eb63707a62ffe7a5.zip |
Merge branch 'master' of github.com:NaoPross/Fading
Diffstat (limited to 'src/gr-fadingui/grc')
-rw-r--r-- | src/gr-fadingui/grc/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/gr-fadingui/grc/fadingui_datasource.block.yml | 28 | ||||
-rw-r--r-- | src/gr-fadingui/grc/fadingui_deframer.block.yml | 39 | ||||
-rw-r--r-- | src/gr-fadingui/grc/fadingui_frame_obj.block.yml | 31 | ||||
-rw-r--r-- | src/gr-fadingui/grc/fadingui_xor_frame_sync.block.yml | 33 |
5 files changed, 95 insertions, 40 deletions
diff --git a/src/gr-fadingui/grc/CMakeLists.txt b/src/gr-fadingui/grc/CMakeLists.txt index 1fe2b9c..92b6add 100644 --- a/src/gr-fadingui/grc/CMakeLists.txt +++ b/src/gr-fadingui/grc/CMakeLists.txt @@ -20,5 +20,7 @@ install(FILES fadingui_datasource.block.yml fadingui_dearpygui_sink.block.yml - fadingui_xor_frame_sync.block.yml DESTINATION share/gnuradio/grc/blocks + fadingui_xor_frame_sync.block.yml + fadingui_deframer.block.yml + fadingui_frame_obj.block.yml DESTINATION share/gnuradio/grc/blocks ) diff --git a/src/gr-fadingui/grc/fadingui_datasource.block.yml b/src/gr-fadingui/grc/fadingui_datasource.block.yml index 5f34591..6c31995 100644 --- a/src/gr-fadingui/grc/fadingui_datasource.block.yml +++ b/src/gr-fadingui/grc/fadingui_datasource.block.yml @@ -1,10 +1,10 @@ id: fadingui_datasource -label: UI Framed Data Source +label: Framed Data Source category: '[fadingui]' templates: imports: import fadingui - make: fadingui.datasource(vec_len=${vec_len}, header_len=${header_len}, sock_addr=${sock_addr}, file_list=${file_list}) + make: fadingui.datasource(frame_obj=${frame_obj}, filename=${fname}) # Make one 'parameters' list entry for every parameter you want settable from the GUI. # Keys include: @@ -12,25 +12,12 @@ templates: # * label (label shown in the GUI) # * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...) parameters: -- id: vec_len - label: Vector length - dtype: int - default: 501 - -- id: header_len - label: Header length - dtype: int - default: 11 - -- id: sock_addr - label: Socket Address - dtype: string - default: "udp://" - -- id: file_list +- id: frame_obj + label: Frame Object + type: raw +- id: fname label: List of files - dtype: raw - default: "[]" + dtype: file_open # Make one 'inputs' list entry per input and one 'outputs' list entry per output. # Keys include: @@ -45,7 +32,6 @@ outputs: - label: out domain: stream dtype: byte - vlen: ${ vec_len + header_len } # 'file_format' specifies the version of the GRC yml format used in the file # and should usually not be changed. diff --git a/src/gr-fadingui/grc/fadingui_deframer.block.yml b/src/gr-fadingui/grc/fadingui_deframer.block.yml new file mode 100644 index 0000000..02db246 --- /dev/null +++ b/src/gr-fadingui/grc/fadingui_deframer.block.yml @@ -0,0 +1,39 @@ +id: fadingui_deframer +label: Deframer +category: '[fadingui]' +labels: [ python ] + +templates: + imports: import fadingui + make: fadingui.deframer(frame_obj=${frame_obj}) + +# Make one 'parameters' list entry for every parameter you want settable from the GUI. +# Keys include: +# * id (makes the value accessible as \$keyname, e.g. in the make entry) +# * label (label shown in the GUI) +# * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...) +parameters: +- id: frame_obj + label: Frame Object + dtype: raw + +# Make one 'inputs' list entry per input and one 'outputs' list entry per output. +# Keys include: +# * label (an identifier for the GUI) +# * domain (optional - stream or message. Default is stream) +# * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...) +# * vlen (optional - data stream vector length. Default is 1) +# * optional (optional - set to 1 for optional inputs. Default is 0) +inputs: +- label: in + domain: stream + dtype: byte + +outputs: +- label: out + domain: stream + dtype: byte + +# 'file_format' specifies the version of the GRC yml format used in the file +# and should usually not be changed. +file_format: 1 diff --git a/src/gr-fadingui/grc/fadingui_frame_obj.block.yml b/src/gr-fadingui/grc/fadingui_frame_obj.block.yml new file mode 100644 index 0000000..c655306 --- /dev/null +++ b/src/gr-fadingui/grc/fadingui_frame_obj.block.yml @@ -0,0 +1,31 @@ +id: fadingui_frame_obj +label: Frame Object +category: '[fadingui]' +flags: [ show_id, python ] + +# Make one 'parameters' list entry for every parameter you want settable from the GUI. +# Keys include: +# * id (makes the value accessible as \$keyname, e.g. in the make entry) +# * label (label shown in the GUI) +# * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...) +parameters: +- id: preamble + label: Preamble + dtype: int_vector + default: '[0xbe, 0xef]' +- id: payload_len + label: Payload length + dtype: int + default: 4096 + +value: ${ fadingui.frame_obj } + + +templates: + imports: import fadingui + var_make: |- + self.${id} = ${id} = fadingui.frame_obj(preamble=${preamble}, payload_len=${payload_len}) + +# 'file_format' specifies the version of the GRC yml format used in the file +# and should usually not be changed. +file_format: 1 diff --git a/src/gr-fadingui/grc/fadingui_xor_frame_sync.block.yml b/src/gr-fadingui/grc/fadingui_xor_frame_sync.block.yml index 92be2a8..1a8640d 100644 --- a/src/gr-fadingui/grc/fadingui_xor_frame_sync.block.yml +++ b/src/gr-fadingui/grc/fadingui_xor_frame_sync.block.yml @@ -1,10 +1,11 @@ id: fadingui_xor_frame_sync -label: xor_frame_sync +label: XOR Correlation Synchronizer category: '[fadingui]' +flags: [ python ] templates: imports: import fadingui - make: fadingui.xor_frame_sync() + make: fadingui.xor_frame_sync(sync_pattern=${pattern}, buffer_size=${buffer_size}) # Make one 'parameters' list entry for every parameter you want settable from the GUI. # Keys include: @@ -12,12 +13,12 @@ templates: # * label (label shown in the GUI) # * dtype (e.g. int, float, complex, byte, short, xxx_vector, ...) parameters: -- id: ... - label: ... - dtype: ... -- id: ... - label: ... - dtype: ... +- id: pattern + label: Bit pattern + dtype: raw +- id: buffer_size + label: Delay buffer size + dtype: raw # Make one 'inputs' list entry per input and one 'outputs' list entry per output. # Keys include: @@ -27,18 +28,14 @@ parameters: # * vlen (optional - data stream vector length. Default is 1) # * optional (optional - set to 1 for optional inputs. Default is 0) inputs: -- label: ... - domain: ... - dtype: ... - vlen: ... - optional: ... +- label: in + domain: stream + dtype: byte outputs: -- label: ... - domain: ... - dtype: ... - vlen: ... - optional: ... +- label: out + domain: stream + dtype: byte # 'file_format' specifies the version of the GRC yml format used in the file # and should usually not be changed. |