Automatically generate flowgraphs with GRCC

This commit adds GRCC into the CMake build system and creates the
executables from the .grc files on demand.

Because there is always the case that the gr-satnogs has not
been installed yet in the system, we still ship the auto-generated
from our side executables. In next releases, during the install
target, the GRCC and the executables generation, will be called
after the gr-satnogs is installed.
This commit is contained in:
Manolis Surligas 2019-12-24 00:17:31 +02:00
parent 8b8e322a5b
commit de8ba5b768
12 changed files with 62 additions and 20 deletions

View File

@ -19,14 +19,4 @@
include(GrPython)
add_subdirectory(flowgraphs/satellites)
GR_PYTHON_INSTALL(
PROGRAMS
flowgraphs/satnogs_cw_decoder.py
flowgraphs/satnogs_afsk1200_ax25.py
flowgraphs/satnogs_example_flowgraph.py
flowgraphs/satnogs_fsk_ax25.py
flowgraphs/satnogs_bpsk_ax25.py
DESTINATION bin
)
add_subdirectory(flowgraphs)

View File

@ -0,0 +1,48 @@
# Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
add_subdirectory(satellites)
set(flowgraphs
afsk1200_ax25.grc
bpsk_ax25.grc
cw_decoder.grc
example_flowgraph.grc
fsk_ax25.grc
iq_receiver.grc
)
message(“Compiling GRC SatNOGS flowgraphs…”)
foreach(grc_file ${flowgraphs})
message("Compiling " ${grc_file})
execute_process(COMMAND grcc ${grc_file}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endforeach()
GR_PYTHON_INSTALL(
PROGRAMS
satnogs_afsk1200_ax25.py
satnogs_bpsk_ax25.py
satnogs_cw_decoder.py
satnogs_example_flowgraph.py
satnogs_fsk_ax25.py
satnogs_iq_receiver.py
DESTINATION bin
)

View File

@ -19,6 +19,19 @@
include(GrPython)
set(flowgraphs
amsat_fox_duv_decoder.grc
noaa_apt_decoder.grc
reaktor_hello_world_fsk9600_decoder.grc
)
message(“Compiling GRC SatNOGS satellite specific flowgraphs…”)
foreach(grc_file ${flowgraphs})
message("Compiling " ${grc_file})
execute_process(COMMAND grcc ${grc_file}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endforeach()
GR_PYTHON_INSTALL(
PROGRAMS
satnogs_amsat_fox_duv_decoder.py

View File

@ -284,7 +284,6 @@ class satnogs_amsat_fox_duv_decoder(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -286,7 +286,6 @@ class satnogs_noaa_apt_decoder(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -308,7 +308,6 @@ class satnogs_reaktor_hello_world_fsk9600_decoder(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -331,7 +331,6 @@ class satnogs_afsk1200_ax25(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -318,7 +318,6 @@ class satnogs_bpsk_ax25(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -297,7 +297,6 @@ class satnogs_cw_decoder(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -249,7 +249,6 @@ class satnogs_example_flowgraph(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -311,7 +311,6 @@ class satnogs_fsk_ax25(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset

View File

@ -223,7 +223,6 @@ class satnogs_iq_receiver(gr.top_block):
def set_iq_file_path(self, iq_file_path):
self.iq_file_path = iq_file_path
self.satnogs_iq_sink_0.open(self.iq_file_path)
def get_lo_offset(self):
return self.lo_offset