Skip to content

Instantly share code, notes, and snippets.

@marcusmueller
Created January 31, 2024 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusmueller/0190023c55e4e9fce6bd645350212bb4 to your computer and use it in GitHub Desktop.
Save marcusmueller/0190023c55e4e9fce6bd645350212bb4 to your computer and use it in GitHub Desktop.
# GNU Radio C++ Flow Graph CMakeLists.txt
#
# Title: generate c++ variables
# Author: Marcus Müller, Solomon B Stoner
# GNU Radio version: v3.11.0.0git-649-gd7cdf222
cmake_minimum_required(VERSION 3.8)
set(CMAKE_CXX_STANDARD 14)
project(repro5090)
find_package(Gnuradio "3.11" COMPONENTS
blocks
fec
fft
filter
analog
digital
dtv
audio
channels
pdu
iio
qtgui
trellis
uhd
uhd UHD 4.0 RFNoC
video-sdl
vocoder
wavelet
zeromq
network
soapy
)
add_executable(repro5090 repro5090.cpp)
target_link_libraries(repro5090
gnuradio::gnuradio-blocks
gnuradio::gnuradio-filter
)
options:
parameters:
author: "Marcus M\xFCller, Solomon B Stoner"
catch_exceptions: 'True'
category: '[GRC Hier Blocks]'
cmake_opt: ''
comment: ''
copyright: 2021,2024
description: ''
gen_cmake: 'On'
gen_linking: dynamic
generate_options: no_gui
hier_block_src_path: '.:'
id: repro5090
max_nouts: '0'
output_language: cpp
placement: (0,0)
qt_qss_theme: ''
realtime_scheduling: ''
run: 'True'
run_command: '{python} -u {filename}'
run_options: run
sizing_mode: fixed
thread_safe_setters: ''
title: generate c++ variables
window_size: (1000,1000)
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [8, 8]
rotation: 0
state: enabled
blocks:
- name: rrc
id: variable_rrc_filter_taps
parameters:
alpha: '0.35'
comment: ''
gain: '1.0'
ntaps: '21'
samp_rate: samp_rate
sym_rate: samp_rate/4
value: ''
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [320, 12.0]
rotation: 0
state: enabled
- name: samp_rate
id: variable
parameters:
comment: ''
value: '32000'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [208, 28.0]
rotation: 0
state: enabled
- name: blocks_null_sink_0
id: blocks_null_sink
parameters:
affinity: ''
alias: ''
bus_structure_sink: '[[0,],]'
comment: ''
num_inputs: '1'
type: complex
vlen: '1'
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [480, 200.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: [56, 200.0]
rotation: 0
state: enabled
- name: fft_filter_xxx_0
id: fft_filter_xxx
parameters:
affinity: ''
alias: ''
comment: ''
decim: '1'
maxoutbuf: '0'
minoutbuf: '0'
nthreads: '1'
samp_delay: '0'
taps: ''
type: ccc
states:
bus_sink: false
bus_source: false
bus_structure: null
coordinate: [256, 180.0]
rotation: 0
state: enabled
connections:
- [blocks_null_source_0, '0', fft_filter_xxx_0, '0']
- [fft_filter_xxx_0, '0', blocks_null_sink_0, '0']
metadata:
file_format: 1
grc_version: v3.11.0.0git-649-gd7cdf222
#ifndef REPRO5090_HPP
#define REPRO5090_HPP
/********************
GNU Radio C++ Flow Graph Header File
Title: generate c++ variables
Author: Marcus Müller, Solomon B Stoner
GNU Radio version: v3.11.0.0git-649-gd7cdf222
********************/
/********************
** Create includes
********************/
#include <gnuradio/top_block.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/blocks/null_sink.h>
#include <gnuradio/blocks/null_source.h>
#include <gnuradio/filter/fft_filter_ccc.h>
using namespace gr;
class repro5090 {
private:
filter::fft_filter_ccc::sptr fft_filter_xxx_0;
blocks::null_source::sptr blocks_null_source_0;
blocks::null_sink::sptr blocks_null_sink_0;
// Variables:
long samp_rate = 32000;
std::vector<float> rrc = filter::firdes::root_raised_cosine(1.0, samp_rate,samp_rate/4, 0.35, 21);
public:
top_block_sptr tb;
repro5090();
~repro5090();
long get_samp_rate () const;
void set_samp_rate(long samp_rate);
std::vector<float> get_rrc () const;
void set_rrc(std::vector<float> rrc);
};
#endif
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment