summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_freqshift_cc.block.yml
blob: 32519080d7a69eddee7edfbcff1df63f5c902ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
id: blocks_freqshift_cc
label: Frequency Shift
category: '[Core]/Math Operators'

parameters:
-   id: sample_rate
    label: Sample Rate
    dtype: real
    default: samp_rate
-   id: freq
    label: Frequency Shift
    dtype: real
    default: '0.0'

inputs:
-   domain: stream
    dtype: complex

outputs:
-   domain: stream
    dtype: complex

templates:
    imports: |-
        from gnuradio import blocks
        import math
    make: blocks.rotator_cc(2.0*math.pi*${freq}/${sample_rate})
    callbacks:
    - set_phase_inc(2.0*math.pi*${freq}/${sample_rate})

documentation: |-
    This block is a convenience wrapper around using a rotator block for frequency shifting.  This block obfuscates the 2*Pi*freq/samp_rate phase_inc field and calculation, and only requires the designer to provide the frequency and sample rate.

file_format: 1