diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ded8e80..0217c29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,5 +43,5 @@ jobs: - name: Test Installed Package working-directory: ${{github.workspace}}/examples run: | - grcc Heron_Receive.grc - xvfb-run --auto-servernum timeout --preserve-status 10s python3 Heron_Receive.py + grcc frame_deframe.grc + { sleep 3; echo \n; } | python frame_deframe.py diff --git a/examples/Heron_Receive.grc b/examples/Heron_Receive.grc deleted file mode 100644 index 257deda..0000000 --- a/examples/Heron_Receive.grc +++ /dev/null @@ -1,240 +0,0 @@ -options: - parameters: - author: swarnava - catch_exceptions: 'True' - category: '[GRC Hier Blocks]' - cmake_opt: '' - comment: '' - copyright: '' - description: '' - gen_cmake: 'On' - gen_linking: dynamic - generate_options: qt_gui - hier_block_src_path: '.:' - id: Heron_Receive - max_nouts: '0' - output_language: python - placement: (0,0) - qt_qss_theme: '' - realtime_scheduling: '' - run: 'True' - run_command: '{python} -u {filename}' - run_options: prompt - sizing_mode: fixed - thread_safe_setters: '' - title: Not titled yet - window_size: (1000,1000) - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [8, 8] - rotation: 0 - state: enabled - -blocks: -- name: samp_rate - id: variable - parameters: - comment: '' - value: 1e6 - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [184, 12] - rotation: 0 - state: enabled -- name: UTAT_HERON_heron_rx_bb_0 - id: UTAT_HERON_heron_rx_bb - parameters: - affinity: '' - alias: '' - comment: '' - maxoutbuf: '0' - minoutbuf: '0' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [768, 288.0] - rotation: 0 - state: true -- name: blocks_throttle_0 - id: blocks_throttle - parameters: - affinity: '' - alias: '' - comment: '' - ignoretag: 'True' - maxoutbuf: '0' - minoutbuf: '0' - samples_per_second: samp_rate - type: byte - vlen: '1' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [416, 280.0] - rotation: 0 - state: true -- name: blocks_uchar_to_float_0 - id: blocks_uchar_to_float - parameters: - affinity: '' - alias: '' - comment: '' - maxoutbuf: '0' - minoutbuf: '0' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [936, 288.0] - rotation: 0 - state: true -- name: blocks_unpack_k_bits_bb_0 - id: blocks_unpack_k_bits_bb - parameters: - affinity: '' - alias: '' - comment: '' - k: '8' - maxoutbuf: '0' - minoutbuf: '0' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [600, 280.0] - rotation: 0 - state: true -- name: blocks_vector_source_x_0 - id: blocks_vector_source_x - parameters: - affinity: '' - alias: '' - comment: '' - maxoutbuf: '0' - minoutbuf: '0' - repeat: 'True' - tags: '[]' - type: byte - vector: (0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0x7E,0x0A,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x1B,0x79) - vlen: '1' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [176, 260.0] - rotation: 0 - state: true -- name: qtgui_time_sink_x_0 - id: qtgui_time_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' - axislabels: 'True' - 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: 'True' - entags: 'True' - grid: 'False' - gui_hint: '' - label1: Signal 1 - label10: Signal 10 - label2: Signal 2 - label3: Signal 3 - label4: Signal 4 - label5: Signal 5 - label6: Signal 6 - label7: Signal 7 - label8: Signal 8 - label9: Signal 9 - legend: 'True' - marker1: '-1' - marker10: '-1' - marker2: '-1' - marker3: '-1' - marker4: '-1' - marker5: '-1' - marker6: '-1' - marker7: '-1' - marker8: '-1' - marker9: '-1' - name: '""' - nconnections: '1' - size: '1024' - srate: samp_rate - stemplot: 'False' - style1: '1' - style10: '1' - style2: '1' - style3: '1' - style4: '1' - style5: '1' - style6: '1' - style7: '1' - style8: '1' - style9: '1' - tr_chan: '0' - tr_delay: '0' - tr_level: '0.0' - tr_mode: qtgui.TRIG_MODE_FREE - tr_slope: qtgui.TRIG_SLOPE_POS - tr_tag: '""' - type: float - update_time: '0.10' - width1: '1' - width10: '1' - width2: '1' - width3: '1' - width4: '1' - width5: '1' - width6: '1' - width7: '1' - width8: '1' - width9: '1' - ylabel: Amplitude - ymax: '14' - ymin: '0' - yunit: '""' - states: - bus_sink: false - bus_source: false - bus_structure: null - coordinate: [1104, 260.0] - rotation: 0 - state: true - -connections: -- [UTAT_HERON_heron_rx_bb_0, '0', blocks_uchar_to_float_0, '0'] -- [blocks_throttle_0, '0', blocks_unpack_k_bits_bb_0, '0'] -- [blocks_uchar_to_float_0, '0', qtgui_time_sink_x_0, '0'] -- [blocks_unpack_k_bits_bb_0, '0', UTAT_HERON_heron_rx_bb_0, '0'] -- [blocks_vector_source_x_0, '0', blocks_throttle_0, '0'] - -metadata: - file_format: 1 - grc_version: 3.10.5.0 diff --git a/examples/frame_deframe.grc b/examples/frame_deframe.grc new file mode 100644 index 0000000..9b9a3b0 --- /dev/null +++ b/examples/frame_deframe.grc @@ -0,0 +1,217 @@ +options: + parameters: + author: Swarnava Ghosh + catch_exceptions: 'True' + category: '[GRC Hier Blocks]' + cmake_opt: '' + comment: '' + copyright: Swarnava Ghosh + description: '' + gen_cmake: 'On' + gen_linking: dynamic + generate_options: no_gui + hier_block_src_path: '.:' + id: frame_deframe + max_nouts: '0' + output_language: python + placement: (0,0) + qt_qss_theme: '' + realtime_scheduling: '' + run: 'True' + run_command: '{python} -u {filename}' + run_options: prompt + sizing_mode: fixed + thread_safe_setters: '' + title: Frame/Deframe + window_size: (1000,1000) + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [8, 8] + rotation: 0 + state: enabled + +blocks: +- name: samp_rate + id: variable + parameters: + comment: '' + value: '32000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [160, 8.0] + rotation: 0 + state: enabled +- name: UTAT_HERON_esttc_deframer_0 + id: UTAT_HERON_esttc_deframer + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + samp_rate: samp_rate + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1128, 232.0] + rotation: 0 + state: enabled +- name: UTAT_HERON_esttc_framer_0 + id: UTAT_HERON_esttc_framer + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [336, 248.0] + rotation: 0 + state: enabled +- name: blocks_message_debug_0 + id: blocks_message_debug + parameters: + affinity: '' + alias: '' + comment: '' + en_uvec: 'True' + log_level: info + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [1368, 248.0] + rotation: 0 + state: enabled +- name: blocks_message_strobe_0 + id: blocks_message_strobe + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + msg: pmt.cons(pmt.PMT_NIL, pmt.init_u8vector(4, [1,2,3,4])) + period: '1000' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [72, 232.0] + rotation: 0 + state: enabled +- name: blocks_null_source_0 + id: blocks_null_source + parameters: + affinity: '' + alias: '' + bus_structure_source: '[[0,],]' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + num_outputs: '1' + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [312, 120.0] + rotation: 0 + state: enabled +- name: blocks_packed_to_unpacked_xx_0 + id: blocks_packed_to_unpacked_xx + parameters: + affinity: '' + alias: '' + bits_per_chunk: '1' + comment: '' + endianness: gr.GR_MSB_FIRST + maxoutbuf: '0' + minoutbuf: '0' + num_ports: '1' + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [768, 232.0] + rotation: 0 + state: enabled +- name: blocks_tag_gate_0 + id: blocks_tag_gate + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + propagate_tags: 'False' + single_key: '""' + type: byte + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [952, 232.0] + rotation: 0 + state: enabled +- name: blocks_throttle_0 + id: blocks_throttle + parameters: + affinity: '' + alias: '' + comment: '' + ignoretag: 'True' + maxoutbuf: '0' + minoutbuf: '0' + samples_per_second: samp_rate + type: complex + vlen: '1' + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [456, 112.0] + rotation: 0 + state: enabled +- name: pdu_pdu_to_tagged_stream_0 + id: pdu_pdu_to_tagged_stream + parameters: + affinity: '' + alias: '' + comment: '' + maxoutbuf: '0' + minoutbuf: '0' + tag: packet_len + type: byte + states: + bus_sink: false + bus_source: false + bus_structure: null + coordinate: [544, 240.0] + rotation: 0 + state: enabled + +connections: +- [UTAT_HERON_esttc_deframer_0, crc_fail, blocks_message_debug_0, log] +- [UTAT_HERON_esttc_deframer_0, crc_ok, blocks_message_debug_0, log] +- [UTAT_HERON_esttc_framer_0, pdu_out, pdu_pdu_to_tagged_stream_0, pdus] +- [blocks_message_strobe_0, strobe, UTAT_HERON_esttc_framer_0, pdu_in] +- [blocks_null_source_0, '0', blocks_throttle_0, '0'] +- [blocks_packed_to_unpacked_xx_0, '0', blocks_tag_gate_0, '0'] +- [blocks_tag_gate_0, '0', UTAT_HERON_esttc_deframer_0, '0'] +- [pdu_pdu_to_tagged_stream_0, '0', blocks_packed_to_unpacked_xx_0, '0'] + +metadata: + file_format: 1 + grc_version: 3.10.10.0