[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/12: analog: add ControlPort interfaces t
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/12: analog: add ControlPort interfaces to frequency_modulator block. |
Date: |
Fri, 19 Feb 2016 13:58:40 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch android
in repository gnuradio.
commit b7870d6cc1b984e44044fa60240e4ad77c8ccd45
Author: Tom Rondeau <address@hidden>
Date: Fri Jan 15 16:57:18 2016 -0500
analog: add ControlPort interfaces to frequency_modulator block.
Change cmake file to allow ControlPort even for static library builds.
---
gr-analog/lib/CMakeLists.txt | 11 -----------
gr-analog/lib/frequency_modulator_fc_impl.cc | 22 ++++++++++++++++++++++
gr-analog/lib/frequency_modulator_fc_impl.h | 2 ++
3 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index 918f894..a75d703 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -110,17 +110,6 @@ GR_LIBRARY_FOO(gnuradio-analog RUNTIME_COMPONENT
"analog_runtime" DEVEL_COMPONEN
add_dependencies(gnuradio-analog analog_generated_includes
analog_generated_swigs gnuradio-filter)
if(ENABLE_STATIC_LIBS)
- if(ENABLE_GR_CTRLPORT)
- # Remove GR_CTRLPORT set this target's definitions.
- # Makes sure we don't try to use ControlPort stuff in source files
- GET_DIRECTORY_PROPERTY(STATIC_DEFS COMPILE_DEFINITIONS)
- list(REMOVE_ITEM STATIC_DEFS "GR_CTRLPORT")
- SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS "${STATIC_DEFS}")
-
- # readd it to the target since we removed it from the directory-wide list.
- SET_PROPERTY(TARGET gnuradio-analog APPEND PROPERTY COMPILE_DEFINITIONS
"GR_CTRLPORT")
- endif(ENABLE_GR_CTRLPORT)
-
add_library(gnuradio-analog_static STATIC ${analog_sources})
add_dependencies(gnuradio-analog_static
diff --git a/gr-analog/lib/frequency_modulator_fc_impl.cc
b/gr-analog/lib/frequency_modulator_fc_impl.cc
index 812eb8b..56fa0f7 100644
--- a/gr-analog/lib/frequency_modulator_fc_impl.cc
+++ b/gr-analog/lib/frequency_modulator_fc_impl.cc
@@ -76,5 +76,27 @@ namespace gr {
return noutput_items;
}
+ void
+ frequency_modulator_fc_impl::setup_rpc()
+ {
+#ifdef GR_CTRLPORT
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_get<frequency_modulator_fc, float>(
+ alias(), "sensitivity",
+ &frequency_modulator_fc::sensitivity,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "Sensitivity", RPC_PRIVLVL_MIN,
+ DISPTIME | DISPOPTSTRIP)));
+
+ add_rpc_variable(
+ rpcbasic_sptr(new rpcbasic_register_set<frequency_modulator_fc, float>(
+ alias(), "sensitivity",
+ &frequency_modulator_fc::set_sensitivity,
+ pmt::mp(-1024.0f), pmt::mp(1024.0f), pmt::mp(0.0f),
+ "", "sensitivity",
+ RPC_PRIVLVL_MIN, DISPNULL)));
+#endif /* GR_CTRLPORT */
+
+ }
} /* namespace analog */
} /* namespace gr */
diff --git a/gr-analog/lib/frequency_modulator_fc_impl.h
b/gr-analog/lib/frequency_modulator_fc_impl.h
index 9f5310c..9f595d1 100644
--- a/gr-analog/lib/frequency_modulator_fc_impl.h
+++ b/gr-analog/lib/frequency_modulator_fc_impl.h
@@ -41,6 +41,8 @@ namespace gr {
void set_sensitivity(float sens) { d_sensitivity = sens; }
float sensitivity() const { return d_sensitivity; }
+ void setup_rpc();
+
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
- [Commit-gnuradio] [gnuradio] branch android updated (ff27361 -> b7870d6), git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 12/12: analog: add ControlPort interfaces to frequency_modulator block.,
git <=
- [Commit-gnuradio] [gnuradio] 05/12: android: logger: adding Android log functions for different logging levels., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 07/12: android: runtime: issues related to vmcircbuf; only mmap_tmpfile version working currently., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 03/12: android: cmake: changed to using C checks for headers instead of C++., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 08/12: android: runtime: need to use a usable, writable location for android apps, so use the tmp path that we set up to point to the app's home directory., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 04/12: android: cmake: adding Boost deps used static builds; ordering in this patch is important., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 06/12: android: runtime: Android does not support pthread_setaffinity_np; turned this into a nop call., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 09/12: android: runtime: moved global block registry to a static get function., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 10/12: android: rutnime: better logging and cleanup, git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 11/12: cmake: cmake should get native thrift binary when cross compiling., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 01/12: android: fft: problems with wisdom files and MEASURE version of FFTW. Using a setting for the FFTW plan options if android or not., git, 2016/02/19