aboutsummaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
authorPiotr Krysik <ptrkrysik@gmail.com>2017-08-24 15:35:42 +0200
committerPiotr Krysik <ptrkrysik@gmail.com>2017-08-24 15:35:42 +0200
commitbb961c17fabea1c3c796131e5c4317cdfb21c9fa (patch)
treee3ae9a4929d3da8be7fd5d7eedc7ba847030eadc /swig
parent77868e4fa677c1b7964a4e948104de2b50d1570d (diff)
Added versioning borrowed fron GNU Radio to gr-gsm
Diffstat (limited to 'swig')
-rw-r--r--swig/CMakeLists.txt1
-rw-r--r--swig/constants.i36
-rw-r--r--swig/grgsm_swig.i4
3 files changed, 41 insertions, 0 deletions
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
index 1c237c8..4766220 100644
--- a/swig/CMakeLists.txt
+++ b/swig/CMakeLists.txt
@@ -59,6 +59,7 @@ GR_SWIG_INSTALL(TARGETS grgsm_swig DESTINATION ${GR_PYTHON_DIR}/grgsm)
install(
FILES
grgsm_swig.i
+ constants.i
${CMAKE_CURRENT_BINARY_DIR}/grgsm_swig_doc.i
DESTINATION ${GR_INCLUDE_DIR}/grgsm/swig
)
diff --git a/swig/constants.i b/swig/constants.i
new file mode 100644
index 0000000..1efca59
--- /dev/null
+++ b/swig/constants.i
@@ -0,0 +1,36 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2009,2013 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.
+ */
+
+
+namespace gr {
+ namespace gsm{
+ %rename(build_date) build_date;
+ %rename(version) version;
+ %rename(version_info) version_info;
+
+ const std::string build_date();
+ const std::string version();
+ const std::string major_version();
+ const std::string api_version();
+ const std::string minor_version();
+ } /* namespace gsm */
+} /* namespace gr */
diff --git a/swig/grgsm_swig.i b/swig/grgsm_swig.i
index 9d6636a..66615e6 100644
--- a/swig/grgsm_swig.i
+++ b/swig/grgsm_swig.i
@@ -29,6 +29,7 @@
%include "grgsm_swig_doc.i"
%{
+#include "grgsm/constants.h"
#include "grgsm/receiver/receiver.h"
#include "grgsm/receiver/clock_offset_control.h"
#include "grgsm/receiver/cx_channel_hopper.h"
@@ -65,6 +66,8 @@
#include "grgsm/misc_utils/controlled_fractional_resampler_cc.h"
%}
+%include "constants.i"
+
%include "grgsm/receiver/receiver.h"
GR_SWIG_BLOCK_MAGIC2(gsm, receiver);
%include "grgsm/receiver/clock_offset_control.h"
@@ -140,3 +143,4 @@ GR_SWIG_BLOCK_MAGIC2(gsm, burst_source);
GR_SWIG_BLOCK_MAGIC2(gsm, message_source);
%include "grgsm/qa_utils/message_sink.h"
GR_SWIG_BLOCK_MAGIC2(gsm, message_sink);
+