Debug flag tested as functional on GNU Radio 3.8

3.8
jmfriedt 2023-02-22 08:07:14 +01:00
parent 65772bd48d
commit cb3e8b529b
6 changed files with 112 additions and 11 deletions

View File

@ -70,9 +70,9 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [464, 80.0]
coordinate: [464, 88.0]
rotation: 180
state: true
state: enabled
- name: blocks_throttle_0
id: blocks_throttle
parameters:
@ -89,7 +89,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [352, 180.0]
coordinate: [352, 188.0]
rotation: 0
state: enabled
- name: blocks_vector_source_x_0_2
@ -110,7 +110,7 @@ blocks:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [128, 164.0]
coordinate: [128, 172.0]
rotation: 0
state: true
- name: m17_m17_coder_0
@ -119,6 +119,7 @@ blocks:
affinity: ''
alias: ''
comment: ''
debug: 'False'
dst_ip: 255.255.255.255
maxoutbuf: '0'
meta: META
@ -139,15 +140,16 @@ blocks:
affinity: ''
alias: ''
comment: ''
debug: 'True'
maxoutbuf: '0'
minoutbuf: '0'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [608, 80.0]
coordinate: [608, 84.0]
rotation: 180
state: true
state: enabled
- name: note_0_2
id: note
parameters:
@ -161,11 +163,92 @@ blocks:
coordinate: [40, 180.0]
rotation: 0
state: true
- name: qtgui_freq_sink_x_0
id: qtgui_freq_sink_x
parameters:
affinity: ''
alias: ''
alpha1: '1.0'
alpha10: '1.0'
alpha2: '1.0'
alpha3: '1.0'
alpha4: '1.0'
alpha5: '1.0'
alpha6: '1.0'
alpha7: '1.0'
alpha8: '1.0'
alpha9: '1.0'
autoscale: 'False'
average: '1.0'
axislabels: 'True'
bw: samp_rate
color1: '"blue"'
color10: '"dark blue"'
color2: '"red"'
color3: '"green"'
color4: '"black"'
color5: '"cyan"'
color6: '"magenta"'
color7: '"yellow"'
color8: '"dark red"'
color9: '"dark green"'
comment: ''
ctrlpanel: 'False'
fc: '0'
fftsize: '1024'
freqhalf: 'True'
grid: 'False'
gui_hint: ''
label: Relative Gain
label1: ''
label10: ''''''
label2: ''''''
label3: ''''''
label4: ''''''
label5: ''''''
label6: ''''''
label7: ''''''
label8: ''''''
label9: ''''''
legend: 'True'
maxoutbuf: '0'
minoutbuf: '0'
name: '""'
nconnections: '1'
showports: 'False'
tr_chan: '0'
tr_level: '0.0'
tr_mode: qtgui.TRIG_MODE_FREE
tr_tag: '""'
type: float
units: dB
update_time: '0.10'
width1: '1'
width10: '1'
width2: '1'
width3: '1'
width4: '1'
width5: '1'
width6: '1'
width7: '1'
width8: '1'
width9: '1'
wintype: firdes.WIN_BLACKMAN_hARRIS
ymax: '10'
ymin: '-140'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [784, 192.0]
rotation: 0
state: true
connections:
- [blocks_throttle_0, '0', m17_m17_coder_0, '0']
- [blocks_vector_source_x_0_2, '0', blocks_throttle_0, '0']
- [m17_m17_coder_0, '0', m17_m17_decoder_0, '0']
- [m17_m17_coder_0, '0', qtgui_freq_sink_x_0, '0']
- [m17_m17_decoder_0, '0', blocks_null_sink_0, '0']
metadata:

View File

@ -23,19 +23,25 @@ parameters:
label: Meta
dtype: string
default: 'helloworld'
- id: debug
label: Debug
dtype: bool
default: 'False'
options: ['True','False']
asserts:
- ${type<256}
templates:
imports: import m17
make: m17.m17_coder(${src_ip},${dst_ip},${type},${meta},${samp_rate})
make: m17.m17_coder(${src_ip},${dst_ip},${type},${meta},${samp_rate},${debug})
callbacks:
- set_meta(${meta})
- set_samp_rate(${samp_rate})
- set_src_ip(${src_ip})
- set_dst_ip(${dst_ip})
- set_type(${type})
- set_debug(${debug})
# Make one 'inputs' list entry per input and one 'outputs' list entry per output.
# Keys include:

View File

@ -4,7 +4,10 @@ category: '[m17]'
templates:
imports: import m17
make: m17.m17_decoder()
make: m17.m17_decoder(${debug})
callbacks:
- set_debug(${debug})
# Make one 'inputs' list entry per input and one 'outputs' list entry per output.
# Keys include:
@ -13,6 +16,15 @@ templates:
# * 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)
#
parameters:
- id: debug
label: Debug
dtype: bool
default: 'False'
options: ['True','False']
inputs:
- label: in
domain: stream

View File

@ -45,7 +45,7 @@ namespace gr {
* class. m17::m17_coder::make is the public interface for
* creating new instances.
*/
static sptr make(std::string src_id,std::string dst_id,short type,std::string meta,float samp_rate);
static sptr make(std::string src_id,std::string dst_id,short type,std::string meta,float samp_rate,bool debug);
virtual void set_meta(std::string meta)=0;
virtual void set_src_id(std::string src_id)=0;
virtual void set_dst_id(std::string dst_id)=0;

View File

@ -45,7 +45,7 @@ namespace gr {
* class. m17::m17_decoder::make is the public interface for
* creating new instances.
*/
static sptr make();
static sptr make(bool debug);
virtual void set_debug(bool debug)=0;
};

View File

@ -35,7 +35,7 @@ private:
short _type;
int _got_lsf=0;
uint16_t _fn=0; //16-bit Frame Number (for the stream mode)
bool _debug=false;
public:
void set_src_id(std::string meta);