[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: controlport: removing use of ice for
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: controlport: removing use of ice for a controlport rpc. |
Date: |
Fri, 8 Aug 2014 21:24:58 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch maint
in repository gnuradio.
commit 3d5df0ddd3aa8d5a94285b95f487747f25d4ee06
Author: Tom Rondeau <address@hidden>
Date: Fri Aug 8 11:28:05 2014 -0400
controlport: removing use of ice for a controlport rpc.
This effectively disables the use of ControlPort for now until we build in
a new middleware layer. The ControlPort API and interfaces exist but will
function as nops for now.
---
cmake/Modules/FindICE-3.5.cmake | 127 ---
cmake/Modules/FindICE.cmake | 127 ---
docs/doxygen/other/ctrlport.dox | 332 +-------
docs/doxygen/other/perf_counters.dox | 10 -
gnuradio-runtime/CMakeLists.txt | 32 -
gnuradio-runtime/ctrlport.conf.example | 30 -
gnuradio-runtime/ctrlport.conf.in | 6 -
gnuradio-runtime/gnuradio-runtime.conf.in | 3 +-
gnuradio-runtime/include/gnuradio/CMakeLists.txt | 6 -
.../include/gnuradio/IcePy_Communicator.h | 35 -
.../include/gnuradio/ice_application_base.h | 231 ------
.../include/gnuradio/ice_server_template.h | 97 ---
.../include/gnuradio/pycallback_object.h | 15 -
.../include/gnuradio/rpcpmtconverters_ice.h | 35 -
.../include/gnuradio/rpcserver_booter_ice.h | 49 --
gnuradio-runtime/include/gnuradio/rpcserver_ice.h | 228 ------
.../include/gnuradio/rpcserver_selector.h | 4 +-
gnuradio-runtime/lib/controlport/CMakeLists.txt | 26 +-
gnuradio-runtime/lib/controlport/ICE_LICENSE | 54 --
gnuradio-runtime/lib/controlport/frontend.ice | 151 ----
gnuradio-runtime/lib/controlport/gnuradio.ice | 105 ---
.../lib/controlport/ice_application_base.cc | 43 --
.../lib/controlport/rpcpmtconverters_ice.cc | 151 ----
.../lib/controlport/rpcserver_booter_ice.cc | 54 --
gnuradio-runtime/lib/controlport/rpcserver_ice.cc | 192 -----
.../lib/controlport/rpcserver_selector.cc | 3 +-
.../python/gnuradio/ctrlport/CMakeLists.txt | 66 --
.../python/gnuradio/ctrlport/IceRadioClient.py | 104 ---
.../python/gnuradio/ctrlport/__init__.py | 2 -
.../python/gnuradio/ctrlport/gr-ctrlport-curses | 268 -------
.../python/gnuradio/ctrlport/gr-ctrlport-monitor | 752 ------------------
.../python/gnuradio/ctrlport/gr-perf-monitor | 591 --------------
.../python/gnuradio/ctrlport/gr-perf-monitorx | 849 ---------------------
gnuradio-runtime/swig/CMakeLists.txt | 2 -
gr-analog/lib/CMakeLists.txt | 1 -
gr-analog/swig/CMakeLists.txt | 1 -
gr-atsc/swig/CMakeLists.txt | 1 -
gr-audio/lib/CMakeLists.txt | 1 -
gr-audio/swig/CMakeLists.txt | 2 -
gr-blocks/grc/CMakeLists.txt | 2 -
gr-blocks/grc/blocks_block_tree.xml | 2 -
gr-blocks/grc/blocks_ctrlport_performance.xml | 49 --
gr-blocks/grc/blocks_ctrlport_viewer.xml | 49 --
gr-blocks/lib/CMakeLists.txt | 1 -
gr-blocks/python/blocks/qa_cpp_py_binding.py | 172 -----
gr-blocks/python/blocks/qa_cpp_py_binding_set.py | 150 ----
gr-blocks/python/blocks/qa_ctrlport_probes.py | 187 +----
gr-blocks/swig/CMakeLists.txt | 1 -
gr-channels/lib/CMakeLists.txt | 1 -
gr-channels/swig/CMakeLists.txt | 1 -
gr-comedi/lib/CMakeLists.txt | 1 -
gr-comedi/swig/CMakeLists.txt | 1 -
gr-digital/lib/CMakeLists.txt | 1 -
gr-digital/swig/CMakeLists.txt | 1 -
gr-fcd/lib/CMakeLists.txt | 1 -
gr-fcd/swig/CMakeLists.txt | 1 -
gr-fec/lib/CMakeLists.txt | 1 -
gr-fec/swig/CMakeLists.txt | 1 -
gr-fft/lib/CMakeLists.txt | 1 -
gr-fft/swig/CMakeLists.txt | 1 -
gr-filter/lib/CMakeLists.txt | 1 -
gr-filter/swig/CMakeLists.txt | 1 -
gr-noaa/lib/CMakeLists.txt | 1 -
gr-noaa/swig/CMakeLists.txt | 1 -
gr-pager/lib/CMakeLists.txt | 1 -
gr-pager/swig/CMakeLists.txt | 1 -
gr-qtgui/lib/CMakeLists.txt | 1 -
gr-qtgui/swig/CMakeLists.txt | 1 -
gr-trellis/lib/CMakeLists.txt | 1 -
gr-trellis/swig/CMakeLists.txt | 1 -
gr-uhd/lib/CMakeLists.txt | 1 -
gr-uhd/swig/CMakeLists.txt | 1 -
gr-video-sdl/lib/CMakeLists.txt | 1 -
gr-video-sdl/swig/CMakeLists.txt | 1 -
gr-vocoder/lib/CMakeLists.txt | 1 -
gr-vocoder/swig/CMakeLists.txt | 1 -
gr-wavelet/lib/CMakeLists.txt | 1 -
gr-wavelet/swig/CMakeLists.txt | 1 -
gr-wxgui/lib/CMakeLists.txt | 1 -
gr-wxgui/swig/CMakeLists.txt | 1 -
gr-zeromq/lib/CMakeLists.txt | 1 -
gr-zeromq/swig/CMakeLists.txt | 1 -
82 files changed, 16 insertions(+), 5417 deletions(-)
diff --git a/cmake/Modules/FindICE-3.5.cmake b/cmake/Modules/FindICE-3.5.cmake
deleted file mode 100644
index f3dbb08..0000000
--- a/cmake/Modules/FindICE-3.5.cmake
+++ /dev/null
@@ -1,127 +0,0 @@
-# Override the search path for ICE; useful for manually installed libs.
-# set(ICE_MANUAL_INSTALL_PATH /opt/Ice-3.5.0/)
-
-message(STATUS "Checking for Ice-3.5")
-
-FIND_PATH(
- ICE_CONFIG_INCLUDE_DIR
- NAMES IceUtil/Config.h
- HINTS ${ICE_MANUAL_INSTALL_PATH}/include/ ${CMAKE_INSTALL_PREFIX}/include/
-)
-
-if(ICE_CONFIG_INCLUDE_DIR)
- file(STRINGS "${ICE_CONFIG_INCLUDE_DIR}/IceUtil/Config.h"
- ICE_STRING_VERSION REGEX "ICE_STRING_VERSION")
- string(REGEX MATCH "3.5" ICE_FOUND ${ICE_STRING_VERSION})
- if(ICE_FOUND)
- set(ICE_FOUND TRUE)
- endif(ICE_FOUND)
-endif(ICE_CONFIG_INCLUDE_DIR)
-
-if(NOT ICE_FOUND)
- message(STATUS " package 'Ice-3.5' not found")
-
-else(NOT ICE_FOUND)
- message(STATUS " ICE 3.5 Include directory found:
${ICE_CONFIG_INCLUDE_DIR}")
-
- # Prepare the path hint for the libraries based on the include
- # directory found.
- string(REGEX REPLACE "/include" "" ICE_PATH ${ICE_CONFIG_INCLUDE_DIR})
-
- FIND_PATH(
- ICE_INCLUDE_DIR
- NAMES IceUtil/IceUtil.h Ice/Ice.h
- NO_DEFAULT_PATH
- HINTS ${ICE_PATH}/include
- )
-
- set(ICE_LIBRARY )
-
- if(APPLE)
- set(ICE_LIB_PREFIX "Zeroc")
- else()
- set(ICE_LIB_PREFIX "")
- endif(APPLE)
-
- FIND_LIBRARY(
- ICE_ICE ${ICE_LIB_PREFIX}Ice
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICESTORM ${ICE_LIB_PREFIX}IceStorm
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICEGRID ${ICE_LIB_PREFIX}IceGrid
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICEUTIL ${ICE_LIB_PREFIX}IceUtil
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_GLACIER2 Glacier2
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
-
- FIND_LIBRARY(
- ICE_PTHREAD NAMES pthread pthread-2.13
- HINTS ${CMAKE_INSTALL_PREFIX}/lib64/ ${CMAKE_INSTALL_PREFIX}/lib/
- HINTS ${PC_ICE_LIBDIR} ${PC_ICE_LIBRARY_DIRS} /lib/i386-linux-gnu
/lib/x86_64-linux-gnu /usr/lib /lib /lib64
- ENV LD_LIBRARY_PATH
- )
-
- set(ICE_FOUND FALSE)
-
- message(STATUS " libIce: ${ICE_ICE}")
- message(STATUS " libIceUtil: ${ICE_ICEUTIL}")
-
- # Make sure we have these two libs in particular
- # - me might expand this list requirement in the future
- if(ICE_ICE AND ICE_ICEUTIL)
- list(APPEND ICE_LIBRARY
- ${ICE_ICE}
- ${ICE_ICEUTIL}
- )
-
- if(CMAKE_CROSSCOMPILING)
- # When cross-compiling, we set up the environment/toolchain to put
- # the right slice2cpp/py in the path. We just need to grab that here.
- FIND_PROGRAM(ICE_SLICE2CPP slice2cpp)
- FIND_PROGRAM(ICE_SLICE2PY slice2py)
-
- # We also don't need to look for Python in this case, so just
- # force this to TRUE here.
- set(ICE_FOUND TRUE)
-
- else(CMAKE_CROSSCOMPILING)
-
- FIND_PROGRAM(ICE_SLICE2CPP slice2cpp
- HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
- FIND_PROGRAM(ICE_SLICE2PY slice2py
- HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
-
- # Check that the ICE Python package is installed
- include(GrPython)
- GR_PYTHON_CHECK_MODULE("Ice >= 3.5" Ice "Ice.stringVersion() >= '3.5.0'"
PYTHON_ICE_FOUND)
- if(PYTHON_ICE_FOUND)
- set(ICE_FOUND TRUE)
- endif(PYTHON_ICE_FOUND)
- endif(CMAKE_CROSSCOMPILING)
-
- message(STATUS " SLICE2CPP: ${ICE_SLICE2CPP}")
- message(STATUS " SLICE2PY: ${ICE_SLICE2PY}")
-
- if(ICE_FOUND)
- message(STATUS "Ice-3.5 found")
-
- set(ICE_LIBRARIES ${ICE_LIBRARY})
- set(ICE_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(ICE DEFAULT_MSG ICE_LIBRARY
ICE_INCLUDE_DIR)
- mark_as_advanced(ICE_INCLUDE_DIR ICE_LIBRARY)
- endif(ICE_FOUND)
- endif(ICE_ICE AND ICE_ICEUTIL)
-
-endif(NOT ICE_FOUND)
diff --git a/cmake/Modules/FindICE.cmake b/cmake/Modules/FindICE.cmake
deleted file mode 100644
index 2a65cf6..0000000
--- a/cmake/Modules/FindICE.cmake
+++ /dev/null
@@ -1,127 +0,0 @@
-# Override the search path for ICE; useful for manually installed libs.
-# set(ICE_MANUAL_INSTALL_PATH /opt/Ice-3.4.2/)
-
-message(STATUS "Checking for Ice-3.4")
-
-FIND_PATH(
- ICE_CONFIG_INCLUDE_DIR
- NAMES IceUtil/Config.h
- HINTS ${ICE_MANUAL_INSTALL_PATH}/include/ ${CMAKE_INSTALL_PREFIX}/include/
-)
-
-if(ICE_CONFIG_INCLUDE_DIR)
- file(STRINGS "${ICE_CONFIG_INCLUDE_DIR}/IceUtil/Config.h"
- ICE_STRING_VERSION REGEX "ICE_STRING_VERSION")
- string(REGEX MATCH "3.4" ICE_FOUND ${ICE_STRING_VERSION})
- if(ICE_FOUND)
- set(ICE_FOUND TRUE)
- endif(ICE_FOUND)
-endif(ICE_CONFIG_INCLUDE_DIR)
-
-if(NOT ICE_FOUND)
- message(STATUS " package 'Ice-3.4' not found")
-
-else(NOT ICE_FOUND)
- message(STATUS " ICE 3.4 Include directory found:
${ICE_CONFIG_INCLUDE_DIR}")
-
- # Prepare the path hint for the libraries based on the include
- # directory found.
- string(REGEX REPLACE "/include" "" ICE_PATH ${ICE_CONFIG_INCLUDE_DIR})
-
- FIND_PATH(
- ICE_INCLUDE_DIR
- NAMES IceUtil/IceUtil.h Ice/Ice.h
- NO_DEFAULT_PATH
- HINTS ${CMAKE_INSTALL_PREFIX}/include
- HINTS ${ICE_PATH}/include
- )
-
- set(ICE_LIBRARY )
-
- if(APPLE)
- set(ICE_LIB_PREFIX "Zeroc")
- else()
- set(ICE_LIB_PREFIX "")
- endif(APPLE)
-
- FIND_LIBRARY(
- ICE_ICE ${ICE_LIB_PREFIX}Ice
- HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICESTORM ${ICE_LIB_PREFIX}IceStorm
- HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICEGRID ${ICE_LIB_PREFIX}IceGrid
- HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_ICEUTIL ${ICE_LIB_PREFIX}IceUtil
- HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
- FIND_LIBRARY(
- ICE_GLACIER2 Glacier2
- HINTS ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/lib64
- HINTS ${ICE_PATH}/lib ${ICE_PATH}/lib64
- )
-
- FIND_LIBRARY(
- ICE_PTHREAD NAMES pthread pthread-2.13
- HINTS ${CMAKE_INSTALL_PREFIX}/lib64/ ${CMAKE_INSTALL_PREFIX}/lib/
- HINTS ${PC_ICE_LIBDIR} ${PC_ICE_LIBRARY_DIRS} /lib/i386-linux-gnu
/lib/x86_64-linux-gnu /usr/lib /lib /lib64
- ENV LD_LIBRARY_PATH
- )
-
- set(ICE_FOUND FALSE)
-
- if(ICE_ICE AND ICE_ICEUTIL)
- list(APPEND ICE_LIBRARY
- ${ICE_ICE}
- ${ICE_ICEUTIL}
- )
-
- message(STATUS " libIce: ${ICE_ICE}")
- message(STATUS " libIceUtil: ${ICE_ICEUTIL}")
-
- FIND_PROGRAM(ICE_SLICE2CPP slice2cpp
- HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
- FIND_PROGRAM(ICE_SLICE2PY slice2py
- HINTS ${CMAKE_INSTALL_PREFIX}/bin ${ICE_MANUAL_INSTALL_PATH}/bin/)
-
- # Check that the ICE Python package is installed
- include(GrPython)
- GR_PYTHON_CHECK_MODULE("Ice >= 3.4" Ice "Ice.stringVersion() >= '3.4.0'"
PYTHON_ICE_FOUND)
- if(PYTHON_ICE_FOUND)
- set(ICE_FOUND TRUE)
- endif(PYTHON_ICE_FOUND)
-
- if(ICE_FOUND)
- message(STATUS "Ice-3.4 found")
-
- if(CMAKE_COMPILER_IS_GNUCXX)
- execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
- OUTPUT_VARIABLE gcc_version)
- string(REGEX MATCH "[0-9].[0-9].[0-9]" gcc_version_num ${gcc_version})
- if(NOT ${gcc_version_num} VERSION_LESS "4.7")
- message(STATUS "-- Found GCC version: ${gcc_version_num}")
- message(STATUS "-- GCC incompatible with Ice 3.4, disabling
ControlPort")
- set(ICE_FOUND FALSE)
- return() # exit now
- endif(NOT ${gcc_version_num} VERSION_LESS "4.7")
- endif(CMAKE_COMPILER_IS_GNUCXX)
-
- set(ICE_LIBRARIES ${ICE_LIBRARY})
- set(ICE_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
-
- include(FindPackageHandleStandardArgs)
- find_package_handle_standard_args(ICE DEFAULT_MSG ICE_LIBRARY
ICE_INCLUDE_DIR)
- mark_as_advanced(ICE_INCLUDE_DIR ICE_LIBRARY)
- endif(ICE_FOUND)
- endif(ICE_ICE AND ICE_ICEUTIL)
-
-endif(NOT ICE_FOUND)
diff --git a/docs/doxygen/other/ctrlport.dox b/docs/doxygen/other/ctrlport.dox
index a1ffcad..8db156d 100644
--- a/docs/doxygen/other/ctrlport.dox
+++ b/docs/doxygen/other/ctrlport.dox
@@ -16,334 +16,8 @@ gnuradio.ctrlport module, imported as:
from gnuradio import ctrlport
\endcode
-
-\section Dependencies
-
-ControlPort is an abstracted remote procedure call tool that. It is
-built on top of other middleware libraries. Currently, the only
-implemented middleware library is the Internet Communication Engine
-(ICE). It is possible to replace this library with other similar
-tools in such a way that the GNU Radio interface to ControlPort is
-unchanged. However, most clients were purpose-built around ICE and
-will need to be redone.
-
-ControlPort requires ZeroC's ICE and associated
-libraries/headers/programs. ICE is generally installed into the
-standard paths if using a software repo (like apt-get, yum, etc.). If
-installed by hand, GNU Radio assumes ICE is installed into
-/opt/Ice-3.4.2. If this is not the case, you can tell GNU Radio where
-to find ICE by passing to cmake the following:
-
- -DICE_MANUAL_INSTALL_PATH=\<your path here\>
-
-
-\section conf Configuration
-
-ControlPort is configured using two files. The first is the GNU Radio
-preferences file while the second file is specific to the type of
-middleware used. Since we are focusing on using ICE, the configuration
-file uses the ICE configuration file and format.
-
-The GNU Radio preferences file has three options. The 'on' option is
-used to enable or disable the use of ControlPort, and is disabled by
-default. The 'config' option allows a user to specify the
-middleware-specific configuration file. The 'edges_list' is a special
-option that exports the list of nodes and edges of the flowgraph
-across ControlPort. This latter option is mainly used for redrawing
-the flowgraph for the Performance Counter applications.
-
-\code
- [ControlPort]
- on = True
- config = ctrlport.conf
- edges_list = True
-\endcode
-
-The ControlPort preferences are installed by default into
-'gnuradio-runtime.conf'. These can always be overridden in the local
-~/.gnuradio/config.conf file.
-
-En example ICE configuration file is installed as
-$prefix/etc/gnuradio/ctrlport.conf.example. More information on how to
-configure ICE can be found here:
-http://doc.zeroc.com/display/Ice/Properties+and+Configuration
-
-
-\section using_ctrlport Using ControlPort to Export Variables
-
-The ability to export variables from a block is inherited from
-gr::block. Then, when the flowgraph is started, the function
-<b>setup_rpc()</b> is called in turn for each block. By default, this
-is an empty function. A block overloads this function and defines and
-exports variables in it.
-
-Say we have a class <b>gr::blocks::foo</b> that has variables <b>a</b>
-and <b>b</b> that we want to export. Specifically, we want to be able
-to read the values of both <b>a</b> and <b>b</b> and also set the
-value of <b>b</b>. The class <b>gr::blocks::foo</b> has setters and
-getters all set up. So our class implementation header file looks
-something like:
-
-\code
-namespace gr {
- namespace blocks {
-
- class foo_impl : public foo
- {
- private:
- float d_a, d_b;
-
- public:
- foo_impl(float a, float b);
- ~foo_impl();
-
- float a() const { return d_a; }
- float b() const { return d_a; }
- void set_a(float a) { d_a = a; }
- void set_b(float b) { d_b = b; }
- void setup_rpc();
- int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
- };
-
- } /* namespace blocks */
-} /* namespace gr */
-\endcode
-
-The source code then sets up the class and fills in
-<b>setup_rpc()</b>.
-
-\code
-namespace gr {
- namespace blocks {
-
- foo_impl::foo_impl(float a, float b):
- sync_bloc(....),
- d_a(a), d_b(b)
- { }
-
- foo_impl::~foo_impl()
- { }
-
- void
- foo_impl::setup_rpc()
- {
-#ifdef GR_CTRLPORT
- add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_get<foo, float>(
- alias(), "a",
- &foo::a,
- pmt::mp(-2.0f), pmt::mp(2.0f), pmt::mp(0.0f),
- "", "Get value of a", RPC_PRIVLVL_MIN,
- DISPTIME | DISPOPTSTRIP)));
-
- add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_get<foo, float>(
- alias(), "b",
- &foo::b,
- pmt::mp(0.0f), pmt::mp(20.0f), pmt::mp(10.0f),
- "", "Get value of b", RPC_PRIVLVL_MIN,
- DISPTIME | DISPOPTSTRIP)));
-
- add_rpc_variable(
- rpcbasic_sptr(new rpcbasic_register_set<foo, float>(
- alias(), "b",
- &foo::set_b,
- pmt::mp(0.0f), pmt::mp(20.0f), pmt::mp(10.0f),
- "", "Set value of b", RPC_PRIVLVL_MIN,
- DISPNULL)));
-#endif /* GR_CTRLPORT */
- }
-
- int
- foo_impl::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
- { .... }
-
- } /* namespace blocks */
-} /* namespace gr */
-\endcode
-
-In the above example, we're ignoring some of the basic semantics of
-the class as a GNU Radio block and focus just on the call to set up
-the get and set functions over ControlPort. Each block has a function
-that allows us to add a new ControlPort interface object to a list,
-the <b>add_rpc_variable</b>. We don't care about that list anymore;
-that's for ControlPort to worry about. We just add new variables,
-either setters or getters.
-
-Without dissecting every piece of the above calls, notice that we use
-the public class, <b>gr::blocks::foo</b> as the class, not the
-implementation class. We also use the block's alias, which GNU Radio
-uses as a database entry to connect a block by name to the pointer in
-memory. This allows ControlPort to know where the object in memory is
-at any given time to access the setters and getters.
-
-The three PMTs specified are simply an expected minimum, maximum, and
-default value. None of these are strictly enforced and only serve as
-guides. The RPC_PRIVLVL_MIN is currently a placeholder for a
-privilege level setting. In many cases, reading <b>b</b> might be
-fine for everyone, but we want strong restrictions on who has the
-ability to set <b>b</b>.
-
-And finally, we can specify display options to hint at the right way
-to display this variable when remotely plotting it. More on that in
-the following section.
-
-Finally, note that we put \#ifdefs around the code. We always want
-<b>setup_rpc</b> to be there and callable, but if ControlPort was not
-built for GNU Radio, we cannot register any variables with it. This is
-just a nicety to allow us to set up our code for use with ControlPort
-without requiring it.
-
-
-\subsection alt_reg Alternative Registers
-
-If using the concept above, <b>setup_rpc</b> automatically gets called
-when the flowgraph is started. In most instances, this is all we ever
-need since there's nothing interesting going on until then. However,
-if not using a gr::block or needing access before we run the flowgraph,
-the above method won't work (it comes down to when the block's alias
-has meaning).
-
-There are alternate variable registration functions for the sets and
-gets. These take the form:
-
-\code
- rpcbasic_register_get(const std::string& name,
- const char* functionbase,
- T* obj,
- Tfrom (T::*function)(),
- const pmt::pmt_t &min, const pmt::pmt_t &max, const
pmt::pmt_t &def,
- const char* units_ = "",
- const char* desc_ = "",
- priv_lvl_t minpriv_ = RPC_PRIVLVL_MIN,
- DisplayType display_ = DISPNULL)
-
- rpcbasic_register_set(const std::string& name,
- const char* functionbase,
- T* obj,
- void (T::*function)(Tto),
- const pmt::pmt_t &min, const pmt::pmt_t &max, const
pmt::pmt_t &def,
- const char* units_ = "",
- const char* desc_ = "",
- priv_lvl_t minpriv_ = RPC_PRIVLVL_MIN,
- DisplayType display_ = DISPNULL)
-\endcode
-
-The only thing different about the above code is that instead of
-taking a single 'alias()' name, which provides us access to the
-objects pointer, we instead provide a unique name
-(<b>fucntionbase</b>) and a pointer to the object itself
-(<b>obj</b>). These are templated functions, so the class T is known
-from that.
-
-If using this method, the recommended way is to create a new function
-(not <b>setup_rpc</b>), register the variable using
-<b>add_rpc_variable</b> but with the different <b>register_get/set</b>
-shown here, and then call this function either in the object's
-constructor or make it a public member function to be called when you
-need it.
-
-
-\section disp Display Options
-
-When exporting a new RPC variable over ControlPort, one argument is a
-display options mask. These options are useful to a remote client to
-tell identify activities like default plotters and initial
-conditions. The <b>gr-ctrlport-monitor</b> application uses this
-heavily in determining how to plot ControlPort variables.
-
-The options mask is just a 32-bit value with options OR'd
-together. Certain options are only appropriate for certain types of
-plots. Options on plots where that option is not available will
-simply be ignored.
-
-The main caveat to be aware of is that the DISPXY plot type is
-specific to complex values. Therefore, DISPOPTCPLX is assumed.
-
-These options are specified in rpccallbackregister_base.h and are
-exposed through SWIG to live in the \b gr namespace.
-
-<b>Plot Types</b>
-\li <b>DISPNULL:</b> Nothing specified.
-\li <b>DISPTIME:</b> Time-domain plot.
-\li <b>DISPXY:</b> XY or constellation plot (complex only).
-\li <b>DISPPSD:</b> PSD plot.
-\li <b>DISPSPEC:</b> Spectrogram plot.
-\li <b>DISPRAST:</b> Time raster plot (non-complex only)
-
-<b>Plot Options</b>
-\li <b>DISPOPTCPLX:</b> Signal is complex.
-\li <b>DISPOPTLOG:</b> Start plot in semilog-y mode (time domain only).
-\li <b>DISPOPTSTEM:</b> Start plot in stem mode (time domain only).
-\li <b>DISPOPTSTRIP:</b> Run plot as a stripchart (time domain only).
-\li <b>DISPOPTSCATTER:</b> Do scatter plot instead of lines (XY plot only).
-
-
-\section probes ControlPort Probes
-
-ControlPort provides a set of probes that can be used as sinks that
-pass vectors of data across ControlPort. These probes are used to
-sample or visualize data remotely. We can place a ControlPort probe
-anywhere in the flowgraph to grab the latest sample of data from the
-block it's connected to.
-
-The main ControlPort probe to use is
-<b>blocks.ctrlport_probe2_x</b>. From GRC, this is simply "CtrlPort
-Probe", which can handle complex, floats, ints, shorts, and bytes. The
-blocks are named and given a description to identify them over
-ControlPort. The blocks also take a vector length for how many samples
-to pass back at a time. Finally, these blocks take a display hint,
-as described in the above section. This allows us to specify the
-default behavior for how to display the samples.
-
-Another block that can be used is the <b>fft.ctrlport_probe_psd</b> to
-calculate the PSD and pass that over the ControlPort interface.
-
-\section monitors ControlPort Monitors
-
-There are two main ControlPort monitor applications provided with GNU
-Radio. Both act similarly. The first is a standard ControlPort monitor
-application. This connects to a running flowgraph and displays all
-exported interfaces in a table format. The name, unit, latest sample,
-and description of all interfaces are display in a
-row. Double-clicking will open up the default display. Right clicking
-any item will allow the user to select the type of plot to use to
-display the data.
-
-When a display is active, using the buttons at the top, the subwindows
-can all be tiled or windowed as needed to manage the full
-interface. We can then drag-and-drop any other item on top of a
-currently running display plot.
-
-To launch the ControlPort monitor application, know the IP address and
-port of the ControlPort endpoint established by the flowgraph and run:
-
-<pre>
-gr-ctrlport-monitor \<ip-addr\> -p \<port\>
-</pre>
-
-
-\subsection perfmonitor Performance Monitor
-
-A second application is used to locally redraw the flowgraph and
-display some of the Performance Counters. In this application, the
-nodes are blue boxes where the size of the box is proportional to the
-work time and the color depth and line width are proportional to the
-output buffer fullness.
-
-The controls at the top of the Performance Monitor application allow
-us to select the instantaneous, average, and variance values of the
-Performance Counters. And the work time and buffer fullness can be
-displayed as a table or bar graph.
-
-To launch the Performance Monitor, run:
-
-<pre>
-gr-perf-monitorx \<ip-addr\> -p \<port\>
-</pre>
+ControlPort is currently a temporary stub implementation of a set of
+RPC calls we would like to enable that would allow remote viewing,
+command, and control of GNU Radio flowgraphs and blocks.
*/
diff --git a/docs/doxygen/other/perf_counters.dox
b/docs/doxygen/other/perf_counters.dox
index c09f17c..200d4dc 100644
--- a/docs/doxygen/other/perf_counters.dox
+++ b/docs/doxygen/other/perf_counters.dox
@@ -85,14 +85,4 @@ The options for the [PerfCounters] section are:
\li clock: sets the type of clock used when calculating work_time
('thread' or 'monotonic').
-
-\section pc_perfmonitor Performance Monitor
-
-See \ref perfmonitor for some details of using a ControlPort-based
-monitor application, gr-perf-monitorx, for visualizing the
-counters. This application is particularly useful in learning which
-blocks are the computationally complex blocks that could use extra
-optimization or work to improve their performance. It can also be used
-to understand the current 'health' of the application.
-
*/
diff --git a/gnuradio-runtime/CMakeLists.txt b/gnuradio-runtime/CMakeLists.txt
index 75410ab..1f94242 100644
--- a/gnuradio-runtime/CMakeLists.txt
+++ b/gnuradio-runtime/CMakeLists.txt
@@ -60,18 +60,6 @@ GR_SET_GLOBAL(GNURADIO_RUNTIME_PYTHONPATH
${GNURADIO_RUNTIME_PYTHONPATH})
# Register controlport component
########################################################################
-if(ENABLE_STATIC_LIBS)
- set(NOT_STATIC_LIBS False)
- message(STATUS "ControlPort is incompatible with static library builds.
Disabling.")
-else(ENABLE_STATIC_LIBS)
- set(NOT_STATIC_LIBS True)
-endif(ENABLE_STATIC_LIBS)
-
-FIND_PACKAGE(ICE-3.5) # check for ICE 3.5
-if(NOT ICE_FOUND)
- message(STATUS "ICE 3.5 not found. Looking for 3.4")
- FIND_PACKAGE(ICE) # checks for version 3.4
-endif(NOT ICE_FOUND)
FIND_PACKAGE(SWIG)
if(SWIG_FOUND)
@@ -88,9 +76,7 @@ GR_REGISTER_COMPONENT("gr-ctrlport" ENABLE_GR_CTRLPORT
Boost_FOUND
SWIG_FOUND
SWIG_VERSION_CHECK
- ICE_FOUND
ENABLE_GNURADIO_RUNTIME
- NOT_STATIC_LIBS
)
########################################################################
@@ -183,22 +169,4 @@ install(
COMPONENT "runtime_devel"
)
-########################################################################
-# Setup ControlPort preferences file and installation information
-########################################################################
-if(ENABLE_GR_CTRLPORT)
-
-SET(GR_PKG_CTRL_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/ctrlport)
-
-SET(GR_PKG_CTRL_SLICE_DIR ${GR_PKG_DATA_DIR}/ctrlport)
-file(TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${GR_PKG_CTRL_SLICE_DIR} slicedir)
-
-install(
- FILES ctrlport.conf.example
- DESTINATION ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}
- COMPONENT "gnuradio_runtime"
-)
-
-endif(ENABLE_GR_CTRLPORT)
-
endif(ENABLE_GNURADIO_RUNTIME)
diff --git a/gnuradio-runtime/ctrlport.conf.example
b/gnuradio-runtime/ctrlport.conf.example
deleted file mode 100644
index dc61673..0000000
--- a/gnuradio-runtime/ctrlport.conf.example
+++ /dev/null
@@ -1,30 +0,0 @@
-## Use this to create an endpoint used to export ControlPort.
-##
-## A typical configuation would be to specify using a particular
-## interface (determined from the IP address) and port number:
-##
-## ControlPort.Endpoints=tcp -h 192.168.1.1 -p 9000
-##
-## A similar endpoint without the port number stated will pick a
-## random, free port:
-##
-## ControlPort.Endpoints=tcp -h 192.168.1.1
-##
-## ICE has some wildcard capabilities, as well. The following tells
-## ICE to use all available interfaces:
-##
-## ControlPort.Endpoints=tcp -h *
-##
-## Using 'default' for the host will use what 'hostname' resolves to.
-##
-## For more details:
-## http://doc.zeroc.com/display/Ice/Proxy+and+Endpoint+Syntax
-## http://www.zeroc.com/doc/Ice-3.2.1/manual/ProxyEndpointRef.51.2.html
-
-# ControlPort.Endpoints = tcp -t 300 -h 127.0.0.1 -p 23456
-
-
-## Set a default hostname (or IP) if no '-h' is used in the Endpoint
-## configuration
-
-#Ice.Default.Host = myhost
diff --git a/gnuradio-runtime/ctrlport.conf.in
b/gnuradio-runtime/ctrlport.conf.in
deleted file mode 100644
index 5c31a04..0000000
--- a/gnuradio-runtime/ctrlport.conf.in
+++ /dev/null
@@ -1,6 +0,0 @@
-# This file contains system wide configuration data for GNU Radio.
-# You may override any setting on a per-user basis by editing
-# ~/.gnuradio/config.conf
-
-[ctrlport]
address@hidden@
diff --git a/gnuradio-runtime/gnuradio-runtime.conf.in
b/gnuradio-runtime/gnuradio-runtime.conf.in
index 0996fb2..6ac9d27 100644
--- a/gnuradio-runtime/gnuradio-runtime.conf.in
+++ b/gnuradio-runtime/gnuradio-runtime.conf.in
@@ -30,11 +30,10 @@ debug_file = stderr
[PerfCounters]
on = False
-export = True
+export = False
clock = thread
#clock = monotonic
[ControlPort]
on = False
edges_list = False
-config = # @CMAKE_INSTALL_PREFIX@/etc/gnuradio/ctrlport.conf
diff --git a/gnuradio-runtime/include/gnuradio/CMakeLists.txt
b/gnuradio-runtime/include/gnuradio/CMakeLists.txt
index a72ea1e..3fc2fe7 100644
--- a/gnuradio-runtime/include/gnuradio/CMakeLists.txt
+++ b/gnuradio-runtime/include/gnuradio/CMakeLists.txt
@@ -72,20 +72,14 @@ install(FILES
types.h
sys_pri.h
unittests.h
- ice_application_base.h
- IcePy_Communicator.h
- ice_server_template.h
rpccallbackregister_base.h
rpcmanager_base.h
rpcmanager.h
- rpcpmtconverters_ice.h
rpcregisterhelpers.h
rpcserver_aggregator.h
rpcserver_base.h
rpcserver_booter_aggregator.h
rpcserver_booter_base.h
- rpcserver_booter_ice.h
- rpcserver_ice.h
rpcserver_selector.h
${CMAKE_CURRENT_BINARY_DIR}/logger.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio
diff --git a/gnuradio-runtime/include/gnuradio/IcePy_Communicator.h
b/gnuradio-runtime/include/gnuradio/IcePy_Communicator.h
deleted file mode 100644
index 2dd0cc7..0000000
--- a/gnuradio-runtime/include/gnuradio/IcePy_Communicator.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICEPY_COMMUNICATOR_H
-#define ICEPY_COMMUNICATOR_H
-
-#include <Ice/CommunicatorF.h>
-#include <gnuradio/api.h>
-
-namespace IcePy
-{
-
-extern PyTypeObject CommunicatorType;
-
-GR_RUNTIME_API bool initCommunicator(PyObject*);
-
-GR_RUNTIME_API Ice::CommunicatorPtr getCommunicator(PyObject*);
-
-GR_RUNTIME_API PyObject* createCommunicator(const Ice::CommunicatorPtr&);
-GR_RUNTIME_API PyObject* getCommunicatorWrapper(const Ice::CommunicatorPtr&);
-
-}
-
-extern "C" PyObject* IcePy_initialize(PyObject*, PyObject*);
-extern "C" PyObject* IcePy_initializeWithProperties(PyObject*, PyObject*);
-extern "C" PyObject* IcePy_initializeWithLogger(PyObject*, PyObject*);
-extern "C" PyObject* IcePy_initializeWithPropertiesAndLogger(PyObject*,
PyObject*);
-
-#endif
diff --git a/gnuradio-runtime/include/gnuradio/ice_application_base.h
b/gnuradio-runtime/include/gnuradio/ice_application_base.h
deleted file mode 100644
index 1263271..0000000
--- a/gnuradio-runtime/include/gnuradio/ice_application_base.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#ifndef ICE_APPLICATION_BASE_H
-#define ICE_APPLICATION_BASE_H
-
-#ifdef HAVE_WINDOWS_H
-#include <winsock2.h>
-#include <sys/time.h>
-#endif
-
-#include <gnuradio/api.h>
-#include <gnuradio/prefs.h>
-#include <Ice/Ice.h>
-#include <boost/thread.hpp>
-#include <boost/thread/mutex.hpp>
-#include <stdio.h>
-#include <iostream>
-#include <set>
-#include <string>
-#include <stdio.h>
-
-namespace {
- static const unsigned int ICEAPPLICATION_ACTIVATION_TIMEOUT_MS(600);
-};
-
-class GR_RUNTIME_API ice_application_common : public Ice::Application
-{
- public:
- template<typename TserverBase, typename TserverClass> friend class
ice_application_base;
- static boost::shared_ptr<ice_application_common> Instance();
- ~ice_application_common() {;}
- static int d_reacquire_attributes;
-
- protected:
- static bool d_main_called;
- static bool d_have_ice_config;
- static std::string d_endpointStr;
- static boost::shared_ptr<boost::thread> d_thread;
- ice_application_common() {;}
- int run(int, char*[]);
-};
-
-template<typename TserverBase, typename TserverClass>
-class ice_application_base
-{
-public:
- boost::shared_ptr<ice_application_common> d_application;
- ice_application_base(TserverClass* _this);
- ~ice_application_base() {;}
-
- static TserverBase* i();
- static const std::vector<std::string> endpoints();
-
-protected:
- bool have_ice_config() { return d_application->d_have_ice_config; }
- void set_endpoint(const std::string& endpoint) {
d_application->d_endpointStr = endpoint;}
-
- //this one is the key... overwrite in templated/inherited variants
- virtual TserverBase* i_impl() = 0;
-
- //tools for the i_impl...
- //tell it when it has to resync with the communicator
- virtual bool reacquire_sync();
- virtual void sync_reacquire();
-
- static TserverClass* d_this;
-
- int d_reacquire;
- //static int d_reacquire_attributes;
-
-private:
- void starticeexample();
-
- bool application_started();
-
- int run(int, char*[]);
-
- static void kickoff();
-};
-
-template<typename TserverBase, typename TserverClass>
-TserverClass* ice_application_base<TserverBase, TserverClass>::d_this(0);
-
-//template<typename TserverBase, typename TserverClass>
-//int ice_application_base<TserverBase,
TserverClass>::d_reacquire_attributes(0);
-
-template<typename TserverBase, typename TserverClass>
-ice_application_base<TserverBase,
TserverClass>::ice_application_base(TserverClass* _this)
- : d_reacquire(0)
-{
- //d_reacquire_attributes = 0;
- d_this = _this;
- d_application = ice_application_common::Instance();
-}
-
-template<typename TserverBase, typename TserverClass>
-void ice_application_base<TserverBase, TserverClass>::starticeexample()
-{
- char* argv[2];
- argv[0] = (char*)"";
-
- std::string conffile = gr::prefs::singleton()->get_string("ControlPort",
"config", "");
-
- if(conffile.size() > 0) {
- std::stringstream iceconf;
- ice_application_common::d_have_ice_config = true;
- ice_application_common::d_main_called = true;
- iceconf << conffile;
- d_application->main(0, argv, iceconf.str().c_str());
- }
- else {
- ice_application_common::d_have_ice_config = false;
- ice_application_common::d_main_called = true;
- d_application->main(0, argv);
- }
-}
-
-template<typename TserverBase, typename TserverClass>
-void ice_application_base<TserverBase, TserverClass>::kickoff()
-{
- static bool run_once = false;
-
- //if(!d_this->application_started()) {
- if(!run_once) {
- ++d_this->d_application->d_reacquire_attributes;
-
- ice_application_common::d_thread = boost::shared_ptr<boost::thread>
- (new boost::thread(boost::bind(&ice_application_base::starticeexample,
d_this)));
-
- ::timespec timer_ts, rem_ts;
- timer_ts.tv_sec = 0; timer_ts.tv_nsec =
ICEAPPLICATION_ACTIVATION_TIMEOUT_MS*1000;
-
- int iter = 0;
- while(!d_this->application_started()) {
- #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
- ::Sleep(timer_ts.tv_nsec / 1000000);
- #else
- ::nanosleep(&timer_ts, &rem_ts);
- #endif
- if(!d_this->application_started())
- std::cout << "@";
- if(iter++ > 100) {
- std::cout << "ice_application_base::kickoff(), timeout waiting to get
communicator() d_application->main() might have failed?!" << std::endl;;
- break;
- }
- }
-
- run_once = true;
- }
-
- return;
-}
-
-
-template<typename TserverBase, typename TserverClass>
-bool ice_application_base<TserverBase, TserverClass>::reacquire_sync()
-{
- return (d_this->d_reacquire != d_application->d_reacquire_attributes);
-}
-
-template<typename TserverBase, typename TserverClass>
-void ice_application_base<TserverBase, TserverClass>::sync_reacquire()
-{
- d_this->d_reacquire = d_application->d_reacquire_attributes;
-}
-
-
-template<typename TserverBase, typename TserverClass>
-const std::vector<std::string> ice_application_base<TserverBase,
TserverClass>::endpoints()
-{
- std::vector<std::string> ep;
ep.push_back(d_this->d_application->d_endpointStr); return ep;
-}
-
-template<typename TserverBase, typename TserverClass>
-TserverBase* ice_application_base<TserverBase, TserverClass>::i()
-{
- //printf("indacall\n");
-
- assert(d_this != 0);
- if(!d_this->application_started()) {
- //printf("anotherkickoff\n");
- kickoff();
- }
- //printf("donekickedoff\n");
-
- /*else if(!d_proxy) {
- d_proxy = d_this->i_impl();
- assert(d_proxy != 0);
- }*/
-
- return d_this->i_impl();
-}
-
-/*template<typename TserverBase, typename TserverClass>
- int ice_application_base<TserverBase, TserverClass>::run(int argc, char*
argv[]) {
- int implreturn(run_impl(argc, argv));
- ice_application_base<TserverBase,
TserverClass>::communicator()->waitForShutdown();
- return implreturn;
- }*/
-
-template<typename TserverBase, typename TImplClass>
-bool ice_application_base<TserverBase, TImplClass>::application_started()
-{
- return ice_application_base<TserverBase,
TImplClass>::d_this->d_application->communicator();
-}
-
-/*template<typename TserverBase, typename TImplClass>
-int ice_application_base<TserverBase, TImplClass>::run_impl(int argc, char*
argv[]) { return EXIT_SUCCESS; }
-*/
-
-#endif
diff --git a/gnuradio-runtime/include/gnuradio/ice_server_template.h
b/gnuradio-runtime/include/gnuradio/ice_server_template.h
deleted file mode 100644
index 5e77d29..0000000
--- a/gnuradio-runtime/include/gnuradio/ice_server_template.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#ifndef ICE_SERVER_TEMPLATE_H
-#define ICE_SERVER_TEMPLATE_H
-
-#include <gnuradio/rpcserver_ice.h>
-#include <gnuradio/ice_application_base.h>
-#include <iostream>
-
-template<typename TserverBase, typename TserverClass, typename TImplClass,
typename TIceClass>
-class ice_server_template : public ice_application_base<TserverBase,
TImplClass>
-{
-public:
- ice_server_template(TImplClass* _this,
- const std::string& contolPortName,
- const std::string& endpointName);
- ~ice_server_template();
-
-protected:
- //virtual bool application_started();
- TserverBase* i_impl();
- friend class ice_application_base<TserverBase, TImplClass>;
-
-private:
- //virtual int run_impl(int, char*[]);
- Ice::ObjectAdapterPtr d_adapter;
- TserverBase* d_iceserver;
- const std::string d_contolPortName, d_endpointName;
-};
-
-template<typename TserverBase, typename TserverClass, typename TImplClass,
typename TIceClass>
-ice_server_template<TserverBase, TserverClass, TImplClass,
TIceClass>::ice_server_template
- (TImplClass* _this, const std::string& controlPortName, const std::string&
endpointName)
- : ice_application_base<TserverBase, TImplClass>(_this),
- d_iceserver(0),
- d_contolPortName(controlPortName),
- d_endpointName(endpointName)
-{;}
-
-template<typename TserverBase, typename TserverClass, typename TImplClass,
typename TIceClass>
-ice_server_template<TserverBase, TserverClass,TImplClass,
TIceClass>::~ice_server_template()
-{
- if(d_adapter) {
- d_adapter->deactivate();
- delete(d_iceserver);
- d_adapter = 0;
- }
-}
-
-template<typename TserverBase, typename TserverClass, typename TImplClass,
typename TIceClass>
-TserverBase* ice_server_template<TserverBase, TserverClass, TImplClass,
TIceClass>::i_impl()
-{
- if(ice_application_base<TserverBase, TImplClass>::d_this->reacquire_sync()) {
- d_adapter = (ice_application_base<TserverBase,
TImplClass>::d_this->have_ice_config()) ?
- ice_application_base<TserverBase,
TImplClass>::d_this->d_this->d_application->communicator()->createObjectAdapter(d_contolPortName)
:
- ice_application_base<TserverBase,
TImplClass>::d_this->d_this->d_application->communicator()->createObjectAdapterWithEndpoints(d_contolPortName,"tcp
-h *");
-
- TserverClass* server_ice(new TserverClass());
- TIceClass obj(server_ice);
-
- Ice::Identity id(ice_application_base<TserverBase,
TImplClass>::d_this->d_this->d_application->communicator()->stringToIdentity(d_endpointName));
- d_adapter->add(obj, id);
- d_adapter->activate();
- ice_application_base<TserverBase,
TImplClass>::d_this->set_endpoint(ice_application_common::communicator()->proxyToString(d_adapter->createDirectProxy(id)));
-
- std::cout << std::endl << "Ice Radio Endpoint: "
- << ice_server_template<TserverBase, TserverClass, TImplClass,
TIceClass>::endpoints()[0]
- << std::endl;
-
- d_iceserver = (TserverBase*) server_ice;
- ice_application_base<TserverBase, TImplClass>::d_this->sync_reacquire();
- }
-
- return d_iceserver;
-}
-
-#endif /* ICE_SERVER_TEMPLATE_H */
diff --git a/gnuradio-runtime/include/gnuradio/pycallback_object.h
b/gnuradio-runtime/include/gnuradio/pycallback_object.h
index 989aed1..85a883c 100644
--- a/gnuradio-runtime/include/gnuradio/pycallback_object.h
+++ b/gnuradio-runtime/include/gnuradio/pycallback_object.h
@@ -22,8 +22,6 @@
#include <iostream>
#include <gnuradio/rpcregisterhelpers.h>
-#include <gnuradio/ice_application_base.h>
-#include <gnuradio/IcePy_Communicator.h>
#include <pythread.h>
#include <boost/format.hpp>
@@ -32,19 +30,6 @@ enum pyport_t {
PYPORT_FLOAT
};
-class Instance
-{
-public:
- static boost::shared_ptr<ice_application_common> get_application()
- {
- return ice_application_common::Instance();
- }
- static Ice::CommunicatorPtr get_swig_communicator()
- {
- return get_application()->communicator();
- }
-};
-
int pycallback_object_count = 500;
// a simple to-PMT converter template class-function
diff --git a/gnuradio-runtime/include/gnuradio/rpcpmtconverters_ice.h
b/gnuradio-runtime/include/gnuradio/rpcpmtconverters_ice.h
deleted file mode 100644
index 8b2c528..0000000
--- a/gnuradio-runtime/include/gnuradio/rpcpmtconverters_ice.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#ifndef RPCPMTCONVERTERS_ICE_H
-#define RPCPMTCONVERTERS_ICE_H
-
-#include <pmt/pmt.h>
-#include <gnuradio.h>
-
-namespace rpcpmtconverter
-{
- pmt::pmt_t to_pmt(const GNURadio::KnobPtr& knob, const Ice::Current& c);
- GNURadio::KnobPtr from_pmt(const pmt::pmt_t& knob, const Ice::Current& c);
-}
-
-#endif /* RPCPMTCONVERTERS_ICE_H */
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_booter_ice.h
b/gnuradio-runtime/include/gnuradio/rpcserver_booter_ice.h
deleted file mode 100644
index 9c64095..0000000
--- a/gnuradio-runtime/include/gnuradio/rpcserver_booter_ice.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#ifndef RPCSERVER_BOOTER_ICE_H
-#define RPCSERVER_BOOTER_ICE_H
-
-#include <gnuradio/rpcserver_booter_base.h>
-#include <gnuradio/ice_server_template.h>
-#include <gnuradio.h>
-
-class rpcserver_base;
-class rpcserver_ice;
-
-class rpcserver_booter_ice : public virtual rpcserver_booter_base,
- public virtual ice_server_template<rpcserver_base, rpcserver_ice,
- rpcserver_booter_ice,
GNURadio::ControlPortPtr>
-{
-public:
- rpcserver_booter_ice();
- ~rpcserver_booter_ice();
-
- rpcserver_base* i();
- const std::string & type() {return d_type;}
- const std::vector<std::string> endpoints();
-
-private:
- std::string d_type;
-};
-
-#endif /* RPCSERVER_BOOTER_ICE_H */
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_ice.h
b/gnuradio-runtime/include/gnuradio/rpcserver_ice.h
deleted file mode 100644
index 260c7f0..0000000
--- a/gnuradio-runtime/include/gnuradio/rpcserver_ice.h
+++ /dev/null
@@ -1,228 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#ifndef RPCSERVER_ICE_H
-#define RPCSERVER_ICE_H
-
-#include <gnuradio/rpcserver_base.h>
-#include <gnuradio/rpcpmtconverters_ice.h>
-#include <string>
-#include <sstream>
-#include <map>
-#include <gnuradio.h>
-#include <Ice/Exception.h>
-#include <boost/format.hpp>
-
-class rpcserver_ice : public virtual rpcserver_base, public
GNURadio::ControlPort
-{
-public:
- rpcserver_ice();
- virtual ~rpcserver_ice();
-
- void registerConfigureCallback(const std::string &id, const
configureCallback_t callback);
- void unregisterConfigureCallback(const std::string &id);
-
- void registerQueryCallback(const std::string &id, const queryCallback_t
callback);
- void unregisterQueryCallback(const std::string &id);
-
- virtual void set(const GNURadio::KnobMap&, const Ice::Current&);
-
- GNURadio::KnobMap get(const GNURadio::KnobIDList&, const Ice::Current&);
-
- GNURadio::KnobMap getRe(const GNURadio::KnobIDList&, const Ice::Current&);
-
- GNURadio::KnobPropMap properties(const GNURadio::KnobIDList&, const
Ice::Current&);
-
- virtual void shutdown(const Ice::Current&);
-
-private:
- typedef std::map<std::string, configureCallback_t> ConfigureCallbackMap_t;
- ConfigureCallbackMap_t d_setcallbackmap;
-
- typedef std::map<std::string, queryCallback_t> QueryCallbackMap_t;
- QueryCallbackMap_t d_getcallbackmap;
-
- template<typename T, typename TMap> struct set_f
- : public std::unary_function<T,void>
- {
- set_f(const Ice::Current& _c, TMap& _setcallbackmap, const priv_lvl_t&
_cur_priv) :
- c(_c), d_setcallbackmap(_setcallbackmap), cur_priv(_cur_priv)
- {;}
-
- void operator()(const T& p)
- {
- ConfigureCallbackMap_t::const_iterator
iter(d_setcallbackmap.find(p.first));
- if(iter != d_setcallbackmap.end()) {
- if(cur_priv <= iter->second.priv) {
- (*iter->second.callback).post(pmt::PMT_NIL,
rpcpmtconverter::to_pmt(p.second,c));
- }
- else {
- std::cout << "Key " << p.first << " requires PRIVLVL <= "
- << iter->second.priv << " to set, currently at: "
- << cur_priv << std::endl;
- }
- }
- else {
- throw IceUtil::NullHandleException(__FILE__, __LINE__);
- }
- }
-
- const Ice::Current& c;
- TMap& d_setcallbackmap;
- const priv_lvl_t& cur_priv;
- };
-
- template<typename T, typename TMap>
- struct get_f : public std::unary_function<T,void>
- {
- get_f(const Ice::Current& _c, TMap& _getcallbackmap,
- const priv_lvl_t& _cur_priv, GNURadio::KnobMap& _outknobs) :
- c(_c), d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv),
outknobs(_outknobs)
- {}
-
- void operator()(const T& p)
- {
- QueryCallbackMap_t::const_iterator iter(d_getcallbackmap.find(p));
- if(iter != d_getcallbackmap.end()) {
- if(cur_priv <= iter->second.priv) {
- outknobs[p] =
rpcpmtconverter::from_pmt((*iter->second.callback).retrieve(), c);
- }
- else {
- std::cout << "Key " << iter->first << " requires PRIVLVL: <= "
- << iter->second.priv << " to get, currently at: "
- << cur_priv << std::endl;
- }
- }
- else {
- std::stringstream ss;
- ss << "Ctrlport Key called with unregistered key (" << p << ")\n";
- std::cout << ss.str();
- throw
IceUtil::IllegalArgumentException(__FILE__,__LINE__,ss.str().c_str());
- }
- }
-
- const Ice::Current& c;
- TMap& d_getcallbackmap;
- const priv_lvl_t& cur_priv;
- GNURadio::KnobMap& outknobs;
- };
-
- template<typename T, typename TMap, typename TKnobMap>
- struct get_all_f : public std::unary_function<T,void>
- {
- get_all_f(const Ice::Current& _c, TMap& _getcallbackmap,
- const priv_lvl_t& _cur_priv, TKnobMap& _outknobs) :
- c(_c), d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv),
outknobs(_outknobs)
- {;}
-
- void operator()(const T& p)
- {
- if(cur_priv <= p.second.priv) {
- outknobs[p.first] =
rpcpmtconverter::from_pmt(p.second.callback->retrieve(), c);
- }
- else {
- std::cout << "Key " << p.first << " requires PRIVLVL <= "
- << p.second.priv << " to get, currently at: "
- << cur_priv << std::endl;
- }
- }
-
- const Ice::Current& c;
- TMap& d_getcallbackmap;
- const priv_lvl_t& cur_priv;
- TKnobMap& outknobs;
- };
-
- template<typename T, typename TMap, typename TKnobMap>
- struct properties_all_f : public std::unary_function<T,void>
- {
- properties_all_f(const Ice::Current& _c, QueryCallbackMap_t&
_getcallbackmap,
- const priv_lvl_t& _cur_priv, GNURadio::KnobPropMap&
_outknobs) :
- c(_c), d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv),
outknobs(_outknobs)
- {;}
-
- void operator()(const T& p)
- {
- if(cur_priv <= p.second.priv) {
- GNURadio::KnobProp prop;//(new GNURadio::KnobProp());
- prop.type = GNURadio::KNOBDOUBLE;
- prop.units = p.second.units;
- prop.description = p.second.description;
- prop.min = rpcpmtconverter::from_pmt(p.second.min, c);
- prop.max = rpcpmtconverter::from_pmt(p.second.max, c);
- prop.display = static_cast<uint32_t>(p.second.display);
- outknobs[p.first] = prop;
- }
- else {
- std::cout << "Key " << p.first << " requires PRIVLVL <= "
- << p.second.priv << " to get, currently at: "
- << cur_priv << std::endl;
- }
- }
-
- const Ice::Current& c;
- TMap& d_getcallbackmap;
- const priv_lvl_t& cur_priv;
- TKnobMap& outknobs;
- };
-
- template<class T, typename TMap, typename TKnobMap>
- struct properties_f : public std::unary_function<T,void>
- {
- properties_f(const Ice::Current& _c, TMap& _getcallbackmap,
- const priv_lvl_t& _cur_priv, TKnobMap& _outknobs) :
- c(_c), d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv),
outknobs(_outknobs)
- {;}
-
- void operator()(const T& p)
- {
- typename TMap::const_iterator iter(d_getcallbackmap.find(p));
- if(iter != d_getcallbackmap.end()) {
- if(cur_priv <= iter->second.priv) {
- GNURadio::KnobProp prop;
- prop.type = GNURadio::KNOBDOUBLE;
- prop.units = iter->second.units;
- prop.description = iter->second.description;
- prop.min = rpcpmtconverter::from_pmt(iter->second.min, c);
- prop.max = rpcpmtconverter::from_pmt(iter->second.max, c);
- prop.display = static_cast<uint32_t>(iter->second.display);
- //outknobs[iter->first] = prop;
- outknobs[p] = prop;
- }
- else {
- std::cout << "Key " << iter->first << " requires PRIVLVL: <= " <<
- iter->second.priv << " to get, currently at: " << cur_priv <<
std::endl;
- }
- }
- else {
- throw IceUtil::NullHandleException(__FILE__, __LINE__);
- }
- }
-
- const Ice::Current& c;
- TMap& d_getcallbackmap;
- const priv_lvl_t& cur_priv;
- TKnobMap& outknobs;
- };
-};
-
-#endif /* RPCSERVER_ICE_H */
diff --git a/gnuradio-runtime/include/gnuradio/rpcserver_selector.h
b/gnuradio-runtime/include/gnuradio/rpcserver_selector.h
index f45e919..8a14f78 100644
--- a/gnuradio-runtime/include/gnuradio/rpcserver_selector.h
+++ b/gnuradio-runtime/include/gnuradio/rpcserver_selector.h
@@ -23,9 +23,9 @@
#ifndef RPCSERVER_SELECTOR
#define RPCSERVER_SELECTOR
-#define RPCSERVER_ENABLED
+//#define RPCSERVER_ENABLED
-#define RPCSERVER_ICE
+//#define RPCSERVER_ICE
//#define RPCSERVER_ERLANG
//#define RPCSERVER_XMLRPC
diff --git a/gnuradio-runtime/lib/controlport/CMakeLists.txt
b/gnuradio-runtime/lib/controlport/CMakeLists.txt
index bd46659..c41d87b 100644
--- a/gnuradio-runtime/lib/controlport/CMakeLists.txt
+++ b/gnuradio-runtime/lib/controlport/CMakeLists.txt
@@ -19,44 +19,24 @@
if(ENABLE_GR_CTRLPORT)
-include_directories(${ICE_INCLUDE_DIR})
-
# Add definition so we can compile in ControlPort to the blocks.
ADD_DEFINITIONS(-DGR_CTRLPORT)
-########################################################################
-# Run ICE To compile Slice files
-########################################################################
-EXECUTE_PROCESS(
- COMMAND "${ICE_SLICE2CPP}" "-I${CMAKE_CURRENT_SOURCE_DIR}"
- "--output-dir=${CMAKE_CURRENT_BINARY_DIR}/"
- "${CMAKE_CURRENT_SOURCE_DIR}/gnuradio.ice"
- )
-
list(APPEND gnuradio_runtime_sources
- ${CMAKE_CURRENT_SOURCE_DIR}/ice_application_base.cc
${CMAKE_CURRENT_SOURCE_DIR}/rpcmanager.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/rpcpmtconverters_ice.cc
${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_aggregator.cc
${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_booter_aggregator.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_booter_ice.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_ice.cc
${CMAKE_CURRENT_SOURCE_DIR}/rpcserver_selector.cc
)
-# Append generated file in build directory
-list(APPEND gnuradio_runtime_sources
- ${CMAKE_CURRENT_BINARY_DIR}/gnuradio.cpp
-)
-
########################################################################
# Add controlport stuff to gnuradio-runtime
########################################################################
include_directories(${CMAKE_CURRENT_BINARY_DIR})
-list(APPEND gnuradio_runtime_libs
- ${ICE_LIBRARIES}
-)
+# Add any required libraries here
+#list(APPEND gnuradio_runtime_libs
+#)
endif(ENABLE_GR_CTRLPORT)
diff --git a/gnuradio-runtime/lib/controlport/ICE_LICENSE
b/gnuradio-runtime/lib/controlport/ICE_LICENSE
deleted file mode 100644
index 51ab60d..0000000
--- a/gnuradio-runtime/lib/controlport/ICE_LICENSE
+++ /dev/null
@@ -1,54 +0,0 @@
-Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
-
-This copy of Ice is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License version 2 as
-published by the Free Software Foundation.
-
-Ice 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 version
-2 along with this program; if not, see http://www.gnu.org/licenses.
-
-Linking Ice statically or dynamically with other software (such as a
-library, module or application) is making a combined work based on Ice.
-Thus, the terms and conditions of the GNU General Public License version
-2 cover this combined work.
-
-If such software can only be used together with Ice, then not only the
-combined work but the software itself is a work derived from Ice and as
-such shall be licensed under the terms of the GNU General Public License
-version 2. This includes the situation where Ice is only being used
-through an abstraction layer.
-
-As a special exception to the above, ZeroC grants to the contributors for
-the following projects the permission to license their Ice-based software
-under the terms of the GNU Lesser General Public License (LGPL) version
-2.1 or of the BSD license:
-
- - Orca Robotics (http://orca-robotics.sourceforge.net)
-
- - Mumble (http://mumble.sourceforge.net)
-
-This exception does not extend to the parts of Ice used by these
-projects, or to any other derived work: as a whole, any work based on Ice
-shall be licensed under the terms and conditions of the GNU General
-Public License version 2.
-
-You may also combine Ice with any software not derived from Ice, provided
-the license of such software is compatible with the GNU General Public
-License version 2. In addition, as a special exception, ZeroC grants you
-permission to combine Ice with:
-
- - the OpenSSL library, or with a modified version of the OpenSSL library
- that uses the same license as OpenSSL
-
- - any library not derived from Ice and licensed under the terms of
- the Apache License, version 2.0
- (http://www.apache.org/licenses/LICENSE-2.0.html)
-
-If you modify this copy of Ice, you may extend any of the exceptions
-provided above to your version of Ice, but you are not obligated to
-do so.
diff --git a/gnuradio-runtime/lib/controlport/frontend.ice
b/gnuradio-runtime/lib/controlport/frontend.ice
deleted file mode 100644
index e4d346d..0000000
--- a/gnuradio-runtime/lib/controlport/frontend.ice
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright 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.
- */
-
-#include <gnuradio.ice>
-
-[["python:package:gnuradio.ctrlport"]]
-module GNURadio {
- module Frontend {
-
- // primitive types
- dictionary<string, string> StrStrDict;
- dictionary<string, string> TunerArgs;
- struct F32Range
- {
- float min;
- float max;
- };
-
- // exception types
- exception NotSupported {};
- exception InvalidSetting { string msg; };
- exception ReceiverFailure { string msg; };
- exception NotExist {};
-
-
- // Status Types
- struct TunerStatus {
- float freq;
- float rate;
- int a2dbits;
- float gain;
- F32Range gainrange;
- bool isInverted;
- StrStrDict info;
- };
-
- struct StreamInfo {
- string uri;
- StrStrDict info;
- };
-
- struct ReceiverInfo {
- string uid;
- string name;
- StrStrDict info;
- };
-
- struct ChannelStatus {
- string uid;
- string name;
- bool active;
- float freq;
- float bandwidth;
- bool isComplex;
- StrStrDict info;
- };
-
- struct ChannelizerStatus {
- string uid;
- string name;
- StrStrDict info;
- };
-
- // Interfaces
- interface Component {
- void setName(string newName);
- };
-
- interface AbstractReceiver extends Component {
- idempotent ReceiverInfo getReceiverInfo();
- };
-
- interface Tuner extends Component {
- TunerStatus configureTuner(TunerArgs args) throws ReceiverFailure,
InvalidSetting;
- idempotent TunerStatus status();
- idempotent float setGain(float gain) throws ReceiverFailure,
NotSupported, InvalidSetting;
- idempotent bool setInversion(bool inverted) throws
ReceiverFailure, NotSupported, InvalidSetting;
- idempotent float setCenterFreq(float freq) throws ReceiverFailure,
NotSupported, InvalidSetting;
- idempotent float setBandwidth(float bw) throws ReceiverFailure,
NotSupported, InvalidSetting;
- idempotent void setInfo(string k, string v) throws
ReceiverFailure, NotSupported, InvalidSetting;
- };
-
- interface Channel extends Tuner {
- void start();
- void stop();
- void destroyChannel() throws NotSupported;
- idempotent bool active();
- idempotent ChannelStatus channelStat();
- idempotent StreamInfo stream();
- idempotent bool setComplex(bool complex) throws ReceiverFailure,
NotSupported, InvalidSetting;
- idempotent void setStreamInfo(string k, string v) throws
ReceiverFailure, NotSupported, InvalidSetting;
- };
-
- sequence<Tuner*> TunerSeq;
- sequence<Channel*> ChannelSeq;
-
- interface Channelizer extends AbstractReceiver {
- idempotent ChannelizerStatus status();
- idempotent Tuner* getTuner();
- idempotent ChannelSeq getChannels();
- idempotent ChannelSeq getActiveChannels();
- idempotent ChannelSeq getInactiveChannels();
- Channel* createChannel(float freq, float bw, StrStrDict args)
throws NotSupported;
- };
-
- sequence<Channelizer*> ChannelizerSeq;
-
- interface Receiver extends AbstractReceiver {
- idempotent ChannelizerSeq getInputs();
- idempotent Channel* getChannelByID(string id) throws NotExist;
- idempotent Channelizer* getChannelizerByID(string id) throws
NotExist;
- idempotent void setInfo(string k, string v) throws
ReceiverFailure, NotSupported, InvalidSetting;
- };
-
- };
-
- module Booter {
- dictionary<string, string> WaveformArgs;
- exception WaveformRunningError {
- string waveformClass;
- float centerFrequencyHz;
- };
- exception SignalSourceError {string msg; };
- interface WaveformBooter extends Frontend::Receiver, ControlPort {
- string launchWaveform(string waveformClass, WaveformArgs
args)
- throws WaveformRunningError, SignalSourceError;
- WaveformArgMap getDriverEnum();
- WaveformArgMap getSourceInfo();
- idempotent bool waveformRunning();
- idempotent string getWaveformClass();
- };
- };
-};
diff --git a/gnuradio-runtime/lib/controlport/gnuradio.ice
b/gnuradio-runtime/lib/controlport/gnuradio.ice
deleted file mode 100644
index 01db91b..0000000
--- a/gnuradio-runtime/lib/controlport/gnuradio.ice
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2012 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.
- */
-
-[["python:package:gnuradio.ctrlport"]]
-
-#ifndef GNURADIO_DEBUG
-#define GNURADIO_DEBUG
-
-module GNURadio {
-
-struct complex {
- float re;
- float im;
-};
-
-class Knob {};
-class KnobB extends Knob { bool value; };
-class KnobC extends Knob { byte value; };
-class KnobI extends Knob { int value; };
-class KnobT extends Knob { short value; };
-class KnobF extends Knob { float value; };
-class KnobD extends Knob { double value; };
-class KnobL extends Knob { long value; };
-class KnobS extends Knob { string value; };
-class KnobZ extends Knob { complex value; };
-
-sequence<bool> VectorB; sequence<byte> VectorC;
-sequence<int> VectorI; sequence<float> VectorF;
-sequence<double> VectorD; sequence<string> VectorS;
-sequence<long> VectorL; sequence<short> VectorT;
-
-class KnobVecB extends Knob { VectorB value; };
-class KnobVecC extends Knob { VectorC value; };
-class KnobVecI extends Knob { VectorI value; };
-class KnobVecT extends Knob { VectorT value; };
-class KnobVecF extends Knob { VectorF value; };
-class KnobVecD extends Knob { VectorD value; };
-class KnobVecL extends Knob { VectorL value; };
-class KnobVecS extends Knob { VectorS value; };
-
-enum KnobType { KNOBBOOL, KNOBCHAR, KNOBINT, KNOBFLOAT,
- KNOBDOUBLE, KNOBSTRING, KNOBLONG, KNOBVECBOOL,
- KNOBVECCHAR, KNOBVECINT, KNOBVECFLOAT, KNOBVECDOUBLE,
- KNOBVECSTRING, KNOBVECLONG, KNOBSHORT};
-
-const int DISPNULL = 0x0000;
-const int DISPTIME = 0x0001;
-const int DISPXY = 0x0002;
-const int DISPPSD = 0x0004;
-const int DISPSPEC = 0x0008;
-const int DISPRAST = 0x0010;
-const int DISPOPTCPLX = 0x0100;
-const int DISPOPTLOG = 0x0200;
-const int DISPOPTSTEM = 0x0400;
-const int DISPOPTSTRIP = 0x0800;
-const int DISPOPTSCATTER = 0x1000;
-
-struct KnobProp {
- KnobType type;
- string units;
- string description;
- int display;
- Knob min;
- Knob max;
- Knob defaultvalue;
-};
-
-sequence<string> KnobIDList;
-dictionary<string, Knob> KnobMap;
-dictionary<string, KnobProp> KnobPropMap;
-dictionary<string, string> WaveformArgMap;
-
-interface StreamReceiver {
- void push(VectorC data);
-};
-
-interface ControlPort {
- void set(KnobMap knobs);
- idempotent KnobMap get(KnobIDList knobs);
- idempotent KnobMap getRe(KnobIDList knobs);
- idempotent KnobPropMap properties(KnobIDList knobs);
- void shutdown();
-};
-
-};
-
-#endif
diff --git a/gnuradio-runtime/lib/controlport/ice_application_base.cc
b/gnuradio-runtime/lib/controlport/ice_application_base.cc
deleted file mode 100644
index b390c77..0000000
--- a/gnuradio-runtime/lib/controlport/ice_application_base.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#include <gnuradio/ice_application_base.h>
-
-int ice_application_common::d_reacquire_attributes(0);
-bool ice_application_common::d_main_called(false);
-bool ice_application_common::d_have_ice_config(false);
-boost::shared_ptr<boost::thread> ice_application_common::d_thread;
-std::string ice_application_common::d_endpointStr("");
-
-boost::shared_ptr<ice_application_common>
-ice_application_common::Instance()
-{
- static boost::shared_ptr<ice_application_common>
- instance(new ice_application_common());
- return instance;
-}
-
-int ice_application_common::run(int, char**)
-{
- communicator()->waitForShutdown();
- return EXIT_SUCCESS;
-}
diff --git a/gnuradio-runtime/lib/controlport/rpcpmtconverters_ice.cc
b/gnuradio-runtime/lib/controlport/rpcpmtconverters_ice.cc
deleted file mode 100644
index 1477ae2..0000000
--- a/gnuradio-runtime/lib/controlport/rpcpmtconverters_ice.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#include <gnuradio/rpcpmtconverters_ice.h>
-#include <Ice/Ice.h>
-#include <gnuradio.h>
-
-GNURadio::KnobPtr
-rpcpmtconverter::from_pmt(const pmt::pmt_t& knob, const Ice::Current& c)
-{
- if(pmt::is_real(knob)) {
- return new GNURadio::KnobD(Ice::Double(pmt::to_double(knob)));
- }
- else if(pmt::is_symbol(knob)) {
- std::string stuff = pmt::symbol_to_string(knob);
- return new GNURadio::KnobS(stuff);
- }
- else if(pmt::is_integer(knob)) {
- return new GNURadio::KnobI(pmt::to_long(knob));
- }
- else if(pmt::is_bool(knob)) {
- return new GNURadio::KnobB(pmt::to_bool(knob));
- }
- else if(pmt::is_uint64(knob)) {
- return new GNURadio::KnobL(pmt::to_uint64(knob));
- }
- else if(pmt::is_complex(knob)) {
- std::complex<double> tmp = pmt::to_complex(knob);
- GNURadio::complex cpx;
- cpx.re = tmp.real();
- cpx.im = tmp.imag();
- return new GNURadio::KnobZ(cpx);
- }
- else if(pmt::is_c32vector(knob)) { // c32 sent as interleaved floats
- size_t size(pmt::length(knob));
- const float* start((const float*) pmt::c32vector_elements(knob,size));
- return new GNURadio::KnobVecF(std::vector<float>(start,start+size*2));
- }
- else if (pmt::is_s32vector(knob)) {
- size_t size(pmt::length(knob));
- const int* start((const int*) pmt::s32vector_elements(knob,size));
- return new GNURadio::KnobVecI(std::vector<int>(start,start+size));
- }
- else if (pmt::is_s16vector(knob)) {
- size_t size(pmt::length(knob));
- const short* start((const short*) pmt::s16vector_elements(knob,size));
- return new GNURadio::KnobVecT(std::vector<short>(start,start+size));
- }
- else if(pmt::is_f32vector(knob)) {
- size_t size(pmt::length(knob));
- const float* start((const float*) pmt::f32vector_elements(knob,size));
- return new GNURadio::KnobVecF(std::vector<float>(start,start+size));
- }
- else if (pmt::is_u8vector(knob)) {
- size_t size(pmt::length(knob));
- const uint8_t* start((const uint8_t*) pmt::u8vector_elements(knob,size));
- return new GNURadio::KnobVecC(std::vector<Ice::Byte>(start,start+size));
- }
- else if (pmt::is_s8vector(knob)) {
- size_t size(pmt::length(knob));
- const int8_t* start((const int8_t*) pmt::s8vector_elements(knob,size));
- return new GNURadio::KnobVecC(std::vector<Ice::Byte>(start,start+size));
- }
- else {
- std::cerr << "Error: Don't know how to handle Knob Type (from): " <<
std::endl; assert(0);}
- //TODO: VECTORS!!!
- return new GNURadio::Knob();
-}
-
-pmt::pmt_t
-rpcpmtconverter::to_pmt(const GNURadio::KnobPtr& knob, const Ice::Current& c)
-{
- std::string id(knob->ice_id(c).substr(12));
- if(id == "KnobD") {
- GNURadio::KnobDPtr k(GNURadio::KnobDPtr::dynamicCast(knob));
- return pmt::mp(k->value);
- }
- else if(id == "KnobF") {
- GNURadio::KnobFPtr k(GNURadio::KnobFPtr::dynamicCast(knob));
- return pmt::mp(k->value);
- }
- else if(id == "KnobI") {
- GNURadio::KnobIPtr k(GNURadio::KnobIPtr::dynamicCast(knob));
- return pmt::mp(k->value);
- }
- else if(id == "KnobT") {
- GNURadio::KnobTPtr k(GNURadio::KnobTPtr::dynamicCast(knob));
- return pmt::mp(k->value);
- }
- else if(id == "KnobS") {
- GNURadio::KnobSPtr k(GNURadio::KnobSPtr::dynamicCast(knob));
- return pmt::string_to_symbol(k->value);
- }
- else if(id == "KnobB") {
- GNURadio::KnobBPtr k(GNURadio::KnobBPtr::dynamicCast(knob));
- if((k->value == true) || (k->value > 0))
- return pmt::PMT_T;
- else
- return pmt::PMT_F;
- }
- else if(id == "KnobC") {
- GNURadio::KnobCPtr k(GNURadio::KnobCPtr::dynamicCast(knob));
- return pmt::mp(k->value);
- }
- else if(id == "KnobL") {
- GNURadio::KnobLPtr k(GNURadio::KnobLPtr::dynamicCast(knob));
- return pmt::mp((long)k->value);
- }
- else if(id == "KnobZ") {
- GNURadio::KnobZPtr k(GNURadio::KnobZPtr::dynamicCast(knob));
- std::complex<double> cpx(k->value.re, k->value.im);
- return pmt::from_complex(cpx);
- }
- else if(id == "KnobVecC") {
- GNURadio::KnobVecCPtr k(GNURadio::KnobVecCPtr::dynamicCast(knob));
- return pmt::init_u8vector(k->value.size(), &k->value[0]);
- }
- else if(id == "KnobVecI") {
- GNURadio::KnobVecIPtr k(GNURadio::KnobVecIPtr::dynamicCast(knob));
- return pmt::init_s32vector(k->value.size(), &k->value[0]);
- }
- //else if(id == "KnobVecF") {
- // GNURadio::KnobVecFPtr k(GNURadio::KnobVecFPtr::dynamicCast(knob));
- // return pmt::mp(k->value);
- //TODO: FLOAT!!!
- //TODO: VECTORS!!!
- else {
- std::cerr << "Error: Don't know how to handle Knob Type: " << id <<
std::endl; assert(0);
- }
-
- return pmt::pmt_t();
-}
diff --git a/gnuradio-runtime/lib/controlport/rpcserver_booter_ice.cc
b/gnuradio-runtime/lib/controlport/rpcserver_booter_ice.cc
deleted file mode 100644
index f60a218..0000000
--- a/gnuradio-runtime/lib/controlport/rpcserver_booter_ice.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#include <gnuradio/rpcserver_ice.h>
-#include <gnuradio/rpcserver_booter_ice.h>
-
-namespace {
- static const char* const CONTROL_PORT_CLASS("ice");
- static const char* const CONTROL_PORT_NAME("ControlPort");
- static const char* const ENDPOINT_NAME("gnuradio");
-};
-
-rpcserver_booter_ice::rpcserver_booter_ice() :
- ice_server_template<rpcserver_base, rpcserver_ice,
- rpcserver_booter_ice, GNURadio::ControlPortPtr>
- (this, std::string(CONTROL_PORT_NAME), std::string(ENDPOINT_NAME)),
- d_type(std::string(CONTROL_PORT_CLASS))
-{;}
-
-rpcserver_booter_ice::~rpcserver_booter_ice()
-{;}
-
-rpcserver_base*
-rpcserver_booter_ice::i()
-{
- return ice_server_template<rpcserver_base, rpcserver_ice,
- rpcserver_booter_ice,
GNURadio::ControlPortPtr>::i();
-}
-
-const std::vector<std::string>
-rpcserver_booter_ice::endpoints()
-{
- return ice_server_template<rpcserver_base, rpcserver_ice,
- rpcserver_booter_ice,
GNURadio::ControlPortPtr>::endpoints();
-}
diff --git a/gnuradio-runtime/lib/controlport/rpcserver_ice.cc
b/gnuradio-runtime/lib/controlport/rpcserver_ice.cc
deleted file mode 100644
index cba6be5..0000000
--- a/gnuradio-runtime/lib/controlport/rpcserver_ice.cc
+++ /dev/null
@@ -1,192 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 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.
- */
-
-#include <gnuradio/rpcserver_ice.h>
-#include <IceUtil/IceUtil.h>
-#include <Ice/Ice.h>
-#include <iostream>
-#include <sstream>
-#include <stdexcept>
-#include <pmt/pmt.h>
-#include <boost/xpressive/xpressive.hpp>
-
-#define DEBUG 0
-
-using namespace rpcpmtconverter;
-
-rpcserver_ice::rpcserver_ice()
-{}
-
-rpcserver_ice::~rpcserver_ice()
-{}
-
-void
-rpcserver_ice::registerConfigureCallback(const std::string &id,
- const configureCallback_t callback)
-{
- {
- ConfigureCallbackMap_t::const_iterator iter(d_setcallbackmap.find(id));
- if(iter != d_setcallbackmap.end()) {
- std::stringstream s;
- s << "rpcserver_ice:: rpcserver_ice ERROR registering set, already
registered: "
- << id << std::endl;
- throw std::runtime_error(s.str().c_str());
- }
- }
-
- if(DEBUG)
- std::cout << "rpcserver_ice registering set: " << id << std::endl;
-
- d_setcallbackmap.insert(ConfigureCallbackMap_t::value_type(id, callback));
-}
-
-void
-rpcserver_ice::unregisterConfigureCallback(const std::string &id)
-{
- ConfigureCallbackMap_t::iterator iter(d_setcallbackmap.find(id));
- if(iter == d_setcallbackmap.end()) {
- std::stringstream s;
- s << "rpcserver_ice:: rpcserver_ice ERROR unregistering set, not
registered: "
- << id << std::endl;
- throw std::runtime_error(s.str().c_str());
- }
-
- if(DEBUG)
- std::cout << "rpcserver_ice unregistering set: " << id << std::endl;
-
- d_setcallbackmap.erase(iter);
-}
-
-void
-rpcserver_ice::registerQueryCallback(const std::string &id,
- const queryCallback_t callback)
-{
- {
- QueryCallbackMap_t::const_iterator iter(d_getcallbackmap.find(id));
- if(iter != d_getcallbackmap.end()) {
- std::stringstream s;
- s << "rpcserver_ice:: rpcserver_ice ERROR registering get, already
registered: "
- << id << std::endl;
- throw std::runtime_error(s.str().c_str());
- }
- }
-
- if(DEBUG)
- std::cout << "rpcserver_ice registering get: " << id << std::endl;
-
- d_getcallbackmap.insert(QueryCallbackMap_t::value_type(id, callback));
-}
-
-void
-rpcserver_ice::unregisterQueryCallback(const std::string &id)
-{
- QueryCallbackMap_t::iterator iter(d_getcallbackmap.find(id));
- if(iter == d_getcallbackmap.end()) {
- std::stringstream s;
- s << "rpcserver_ice:: rpcserver_ice ERROR unregistering get, registered: "
- << id << std::endl;
- throw std::runtime_error(s.str().c_str());
- }
-
- if(DEBUG)
- std::cout << "rpcserver_ice unregistering get: " << id << std::endl;
-
- d_getcallbackmap.erase(iter);
-}
-
-void
-rpcserver_ice::set(const GNURadio::KnobMap& knobs, const Ice::Current& c)
-{
- std::for_each(knobs.begin(), knobs.end(),
- set_f<GNURadio::KnobMap::value_type,ConfigureCallbackMap_t>
- (c, d_setcallbackmap, cur_priv));
-}
-
-GNURadio::KnobMap
-rpcserver_ice::getRe(const GNURadio::KnobIDList& knobs, const Ice::Current& c)
-{
- GNURadio::KnobMap outknobs;
-
- if(knobs.size() == 0) {
- std::for_each(d_getcallbackmap.begin(), d_getcallbackmap.end(),
- get_all_f<QueryCallbackMap_t::value_type, QueryCallbackMap_t,
GNURadio::KnobMap>
- (c, d_getcallbackmap, cur_priv, outknobs));
- }
- else {
- QueryCallbackMap_t::iterator it;
- for(it = d_getcallbackmap.begin(); it != d_getcallbackmap.end(); it++){
- for(size_t j=0; j<knobs.size(); j++){
- const boost::xpressive::sregex
re(boost::xpressive::sregex::compile(knobs[j]));
- if(boost::xpressive::regex_match(it->first, re)){
- get_f<GNURadio::KnobIDList::value_type, QueryCallbackMap_t>
- (c, d_getcallbackmap, cur_priv, outknobs)(it->first);
- break;
- }
- }
- }
- }
- return outknobs;
-}
-
-GNURadio::KnobMap
-rpcserver_ice::get(const GNURadio::KnobIDList& knobs, const Ice::Current& c)
-{
- GNURadio::KnobMap outknobs;
-
- if(knobs.size() == 0) {
- std::for_each(d_getcallbackmap.begin(), d_getcallbackmap.end(),
- get_all_f<QueryCallbackMap_t::value_type, QueryCallbackMap_t,
GNURadio::KnobMap>
- (c, d_getcallbackmap, cur_priv, outknobs));
- }
- else {
- std::for_each(knobs.begin(), knobs.end(),
- get_f<GNURadio::KnobIDList::value_type, QueryCallbackMap_t>
- (c, d_getcallbackmap, cur_priv, outknobs));
- }
- return outknobs;
-}
-
-GNURadio::KnobPropMap
-rpcserver_ice::properties(const GNURadio::KnobIDList& knobs, const
Ice::Current& c)
-{
- GNURadio::KnobPropMap outknobs;
-
- if(knobs.size() == 0) {
- std::for_each(d_getcallbackmap.begin(), d_getcallbackmap.end(),
- properties_all_f<QueryCallbackMap_t::value_type,
- QueryCallbackMap_t,GNURadio::KnobPropMap>(c,
d_getcallbackmap, cur_priv, outknobs));
- }
- else {
- std::for_each(knobs.begin(), knobs.end(),
- properties_f<GNURadio::KnobIDList::value_type,
- QueryCallbackMap_t, GNURadio::KnobPropMap>(c,
d_getcallbackmap, cur_priv, outknobs));
- }
- return outknobs;
-}
-
-void
-rpcserver_ice::shutdown(const Ice::Current& c)
-{
- if(DEBUG)
- std::cout << "Shutting down..." << std::endl;
- c.adapter->getCommunicator()->shutdown();
-}
diff --git a/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
b/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
index d515e78..692f151 100644
--- a/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
+++ b/gnuradio-runtime/lib/controlport/rpcserver_selector.cc
@@ -27,8 +27,7 @@
bool rpcmanager::make_aggregator(false);
#ifdef RPCSERVER_ICE
- #include <gnuradio/rpcserver_booter_ice.h>
- rpcmanager::rpcserver_booter_register_helper<rpcserver_booter_ice> boot_ice;
+ #error TODO ICE
#endif
#ifdef RPCSERVER_ERLANG
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
index 8080634..1d5a292 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/CMakeLists.txt
@@ -20,62 +20,6 @@
########################################################################
include(GrPython)
-EXECUTE_PROCESS(
- COMMAND ${ICE_SLICE2PY}
-I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport
- --output-dir=${CMAKE_BINARY_DIR}/gnuradio-runtime/python
- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/gnuradio.ice
-)
-
-EXECUTE_PROCESS(
- COMMAND ${ICE_SLICE2PY}
-I${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport
- --output-dir=${CMAKE_BINARY_DIR}/gnuradio-runtime/python
- ${CMAKE_SOURCE_DIR}/gnuradio-runtime/lib/controlport/frontend.ice
-)
-
-EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_BINARY_DIR}/gnuradio-runtime/python/gnuradio/__init__.py
-)
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
- ${CMAKE_CURRENT_SOURCE_DIR}/IceRadioClient.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
- COMPONENT "runtime_python"
-)
-
-# We don't want to install these in the root Python directory, but we
-# aren't given a choice based on the way slice2py generates the
-# information.
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_BINARY_DIR}/gnuradio-runtime/python/gnuradio_ice.py
- ${CMAKE_BINARY_DIR}/gnuradio-runtime/python/frontend_ice.py
- DESTINATION ${GR_PYTHON_DIR}
- COMPONENT "runtime_python"
-)
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_BINARY_DIR}/GNURadio/__init__.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/GNURadio
- COMPONENT "runtime_python"
-)
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_BINARY_DIR}/GNURadio/Booter/__init__.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/GNURadio/Booter
- COMPONENT "runtime_python"
-)
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_BINARY_DIR}/GNURadio/Frontend/__init__.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/GNURadio/Frontend
- COMPONENT "runtime_python"
-)
-
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/icon.png
@@ -90,13 +34,3 @@ GR_PYTHON_INSTALL(
DESTINATION ${GR_PYTHON_DIR}/gnuradio/ctrlport/
COMPONENT "runtime_python"
)
-
-GR_PYTHON_INSTALL(
- FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/gr-ctrlport-monitor
- ${CMAKE_CURRENT_SOURCE_DIR}/gr-perf-monitorx
- ${CMAKE_CURRENT_SOURCE_DIR}/gr-ctrlport-curses
- DESTINATION ${GR_RUNTIME_DIR}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
- COMPONENT "runtime_python"
-)
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/IceRadioClient.py
b/gnuradio-runtime/python/gnuradio/ctrlport/IceRadioClient.py
deleted file mode 100644
index 87998f7..0000000
--- a/gnuradio-runtime/python/gnuradio/ctrlport/IceRadioClient.py
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012 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.
-#
-
-import Ice, Glacier2
-from PyQt4 import QtGui, QtCore
-import sys, time, Ice
-from gnuradio import gr
-from gnuradio.ctrlport import GNURadio
-
-class IceRadioClient(Ice.Application):
- def __init__(self, parentClass):
- self.parentClass = parentClass
-
- def getRadio(self, host, port):
- radiostr = "gnuradio -t:tcp -h " + host + " -p " + port + " -t 3000"
- base = self.communicator().stringToProxy(radiostr).ice_twoway()
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- if not radio:
- sys.stderr.write("{0} : invalid proxy.\n".format(args[0]))
- return None
-
- return radio
-
- def run(self,args):
- if len(args) < 2:
- print "useage: [glacierinstance glacierhost glacierport] host
port"
- return
- if len(args) == 8:
- self.useglacier = True
- guser = args[1]
- gpass = args[2]
- ginst = args[3]
- ghost = args[4]
- gport = args[5]
- host = args[6]
- port = args[7]
- else:
- self.useglacier = False
- host = args[1]
- port = args[2]
- if(port == "-p"):
- port = args[3]
-
- if self.useglacier:
- gstring = ginst + "/router -t:tcp -h " + ghost + " -p " + gport
- print "GLACIER: {0}".format(gstring)
-
- setrouter =
Glacier2.RouterPrx.checkedCast(self.communicator().stringToProxy(gstring))
- self.communicator().setDefaultRouter(setrouter)
- defaultRouter = self.communicator().getDefaultRouter()
- #defaultRouter = self.communicator().stringToProxy(gstring)
- if not defaultRouter:
- print self.appName() + ": no default router set"
- return 1
- else:
- print str(defaultRouter)
- router = Glacier2.RouterPrx.checkedCast(defaultRouter)
- if not router:
- print self.appName() + ": configured router is not a Glacier2
router"
- return 1
-
- while True:
- print "This demo accepts any user-id / password combination."
- if not guser == '' and not gpass == '':
- id = guser
- pw = gpass
- else:
- id = raw_input("user id: ")
- pw = raw_input("password: ")
-
- try:
- router.createSession(id, pw)
- break
- except Glacier2.PermissionDeniedException, ex:
- print "permission denied:\n" + ex.reason
-
- radio = self.getRadio(host, port)
- if(radio is None):
- return 1
-
- app = QtGui.QApplication(sys.argv)
- ex = self.parentClass(radio, port, self)
- ex.show();
- app.exec_()
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
b/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
index cfb30ce..8f33d65 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/__init__.py
@@ -20,8 +20,6 @@
# The presence of this file turns this directory into a Python package
-import Ice, IcePy
-
# import swig generated symbols into the ctrlport namespace
#from ctrlport_swig import *
from monitor import *
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-curses
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-curses
deleted file mode 100755
index f40c87a..0000000
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-curses
+++ /dev/null
@@ -1,268 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012 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.
-#
-
-import threading
-import curses
-import os, sys, time
-from optparse import OptionParser
-
-import Ice
-from gnuradio.ctrlport import GNURadio
-
-ENTER = chr(10)
-UP_ARROW = chr(65)
-DOWN_ARROW = chr(66)
-
-class modem_monitor(threading.Thread):
- def __init__(self, cb_live, cb_exit, interface):
- threading.Thread.__init__(self)
- self.cb_live = cb_live
- self.cb_exit = cb_exit
-
- self.running = True
-
- def __del__(self):
- rx.close()
-
- def run(self):
- while self.running:
- time.sleep(0.5)
-
- def shutdown(self):
- self.running = False
- self.rx.close()
-
- def cb(self,contents):
- (op, sep, payload) = contents.partition(":")
- if(op == "live"):
- print "live"
- self.cb_live(payload)
- elif(op == "exit"):
- self.cb_exit(payload)
- else:
- print "unknown op arrived! garbage on multicast adx?"
-
-class modem_window(threading.Thread):
- def __init__(self, locator):
- threading.Thread.__init__(self)
- self.locator = locator
-
- # curses init
- self.win = curses.newwin(30,100,4,4)
-
- # Ice/GRCP init
- self.comm = Ice.initialize()
- proxy = self.comm.stringToProxy(locator)
- self.radio = GNURadio.ControlPortPrx.checkedCast(proxy)
- self.updateKnobs()
-
- # GUI init
- self.running = True
- self.ssel = 0
- self.start()
- #self.updateGUI()
-
- # input loop
- while(self.running):
- self.getInput()
-
- # wait for update thread exit
- self.join()
-
- def updateKnobs(self):
- self.knobs = self.radio.get([])
-
- def getInput(self):
- a = self.win.getch()
- if(a <= 256):
- a = chr(a)
- if(a == 'q'):
- self.running = False
- elif(a == UP_ARROW):
- self.ssel = max(self.ssel-1, 0)
- self.updateGUI()
- elif(a == DOWN_ARROW):
- self.ssel = max(min(self.ssel+1, len(self.knobs.keys())-1),0)
- self.updateGUI()
- self.updateGUI()
-
- def updateGUI(self):
- self.win.clear()
- self.win.border(0)
- self.win.addstr(1, 2, "Modem Statistics :: %s"%(self.locator))
- self.win.addstr(2, 2,
"---------------------------------------------------")
-
- maxnb = 0
- maxk = 0
- for k in self.knobs.keys():
- (nb,k) = k.split("::", 2)
- maxnb = max(maxnb,len(nb))
- maxk = max(maxk,len(k))
-
- offset = 3
- keys = self.knobs.keys()
- keys.sort()
- for k in keys:
- (nb,sk) = k.split("::", 2)
- v = self.knobs[k].value
- sv = str(v)
- if(len(sv) > 20):
- sv = sv[0:20]
- props = 0
- if(self.ssel == offset-3):
- props = props | curses.A_REVERSE
- self.win.addstr(offset, 2, "%s %s %s" % \
- (nb.rjust(maxnb," "), sk.ljust(maxk," "), sv),props)
- offset = offset + 1
- self.win.refresh()
-
- def run(self):
- while(self.running):
- self.updateKnobs()
- self.updateGUI()
- time.sleep(1)
-
-class monitor_gui:
- def __init__(self, interfaces, options):
-
- locator = None
-
- # Extract options into a locator
- if(options.host and options.port):
- locator = "{0} -t:{1} -h {2} -p {3}".format(
- options.app, options.protocol,
- options.host, options.port)
-
- # Set up GUI
- self.locators = {}
-
- self.mode = 0 # modem index screen (modal keyboard input)
- self.lsel = 0 # selected locator
- self.scr = curses.initscr()
- self.updateGUI()
-
- # Kick off initial monitors
- self.monitors = []
- for i in interfaces:
- self.monitors.append( modem_monitor(self.addModem, self.delModem,
i) )
- self.monitors[-1].start()
-
- if not ((locator == None) or (locator == "")):
- self.addModem(locator)
-
- # wait for user input
- while(True):
- self.getInput()
-
- def addModem(self, locator):
- if(not self.locators.has_key(locator)):
- self.locators[locator] = {}
- self.locators[locator]["update_time"] = time.time()
- self.locators[locator]["status"] = "live"
-
- self.updateGUI();
-
- def delModem(self, locator):
- #if(self.locators.has_key(locator)):
- if(not self.locators.has_key(locator)):
- self.locators[locator] = {}
- self.locators[locator]["update_time"] = time.time()
- self.locators[locator]["status"] = "exit"
-
- self.updateGUI()
-
- def updateGUI(self):
- if(self.mode == 0): #redraw locators
- self.scr.clear()
- self.scr.border(0)
- self.scr.addstr(1, 2, " GRCP-Curses Modem Monitor :: (A)dd
(R)efresh, (Q)uit, ...")
- for i in range(len(self.locators.keys())):
- locator = self.locators.keys()[i]
- lhash = self.locators[locator]
- #self.scr.addstr(3+i, 5, locator + str(lhash))
- props = 0
- if(self.lsel == i):
- props = props | curses.A_REVERSE
- self.scr.addstr(3+i, 5, locator + str(lhash), props)
- self.scr.refresh()
-
- def connectGUI(self):
- self.scr.clear()
- self.scr.addstr(1, 1, "Connect to radio:")
- locator = self.scr.getstr(200)
- self.addModem(locator)
- self.updateGUI()
-
- def getInput(self):
- a = self.scr.getch()
- self.scr.addstr(20, 2, "got key (%d) " % (int(a)))
- if(a <= 256):
- a = chr(a)
- if(a =='r'):
- self.updateGUI()
- elif(a == 'q'):
- self.shutdown()
- elif(a == 'a'):
- self.connectGUI()
- elif(a == UP_ARROW):
- self.lsel = max(self.lsel-1, 0)
- self.updateGUI()
- elif(a == DOWN_ARROW):
- self.lsel = max(min(self.lsel+1,
len(self.locators.keys())-1),0)
- self.updateGUI()
- elif(a == ENTER):
- try:
- locator = self.locators.keys()[self.lsel]
- self.mode = 1
- mwin = modem_window(locator)
- self.mode = 0
- # pop up a new modem display ...
- self.updateGUI()
- except:
- pass
-
- def shutdown(self):
- curses.endwin()
- os._exit(0)
-
-if __name__ == "__main__":
- parser = OptionParser()
- parser.add_option("-H", "--host", type="string",
- help="Hostname of ControlPort server.")
- parser.add_option("-p", "--port", type="int",
- help="Port number of host's ControlPort endpoint.")
- parser.add_option("-i", "--interfaces", type="string",
- action="append", default=["lo"],
- help="Interfaces to use. [default=%default]")
- parser.add_option("-P", "--protocol", type="string", default="tcp",
- help="Type of protocol to use (usually tcp).
[default=%default]")
- parser.add_option("-a", "--app", type="string", default="gnuradio",
- help="Name of application [default=%default]")
- (options, args) = parser.parse_args()
-
- if((options.host == None) ^ (options.port == None)):
- print "Please set both a hostname and a port number.\n"
- parser.print_help()
- sys.exit(1)
-
- mg = monitor_gui(options.interfaces, options)
-
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
deleted file mode 100755
index 76dd2e5..0000000
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor
+++ /dev/null
@@ -1,752 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012,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.
-#
-
-from gnuradio import gr, ctrlport
-
-from PyQt4 import QtCore,Qt
-import PyQt4.QtGui as QtGui
-import os, sys, time, struct
-
-import Ice
-from gnuradio.ctrlport.IceRadioClient import *
-from gnuradio.ctrlport.GrDataPlotter import *
-from gnuradio.ctrlport import GNURadio
-
-class RateDialog(QtGui.QDialog):
- def __init__(self, delay, parent=None):
- super(RateDialog, self).__init__(parent)
- self.gridLayout = QtGui.QGridLayout(self)
- self.setWindowTitle("Update Delay (ms)");
- self.delay = QtGui.QLineEdit(self);
- self.delay.setText(str(delay));
- self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok |
QtGui.QDialogButtonBox.Cancel)
- self.gridLayout.addWidget(self.delay);
- self.gridLayout.addWidget(self.buttonBox);
- self.buttonBox.accepted.connect(self.accept)
- self.buttonBox.rejected.connect(self.reject)
- def accept(self):
- self.done(1);
- def reject(self):
- self.done(0);
-
-class MAINWindow(QtGui.QMainWindow):
- def minimumSizeHint(self):
- return Qtgui.QSize(800,600)
-
- def __init__(self, radio, port, interface):
-
- super(MAINWindow, self).__init__()
- self.updateRate = 1000;
- self.conns = []
- self.plots = []
- self.knobprops = []
- self.interface = interface
-
- self.mdiArea = QtGui.QMdiArea()
- self.mdiArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.mdiArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.setCentralWidget(self.mdiArea)
-
- self.mdiArea.subWindowActivated.connect(self.updateMenus)
- self.windowMapper = QtCore.QSignalMapper(self)
-
self.windowMapper.mapped[QtGui.QWidget].connect(self.setActiveSubWindow)
-
- self.createActions()
- self.createMenus()
- self.createToolBars()
- self.createStatusBar()
- self.updateMenus()
-
- self.setWindowTitle("GNU Radio Control Port Monitor")
- self.setUnifiedTitleAndToolBarOnMac(True)
-
- self.newCon(radio, port)
- icon = QtGui.QIcon(ctrlport.__path__[0] + "/icon.png" )
- self.setWindowIcon(icon)
-
- # Locally turn off ControlPort export from GR. This prevents
- # our GR-based plotters from launching their own ControlPort
- # instance (and possibly causing a port collision if one has
- # been specified).
- os.environ['GR_CONF_CONTROLPORT_ON'] = 'False'
-
- def setUpdateRate(self,nur):
- self.updateRate = int(nur);
- for c in self.conns:
- c.updateRate = self.updateRate;
- c.timer.setInterval(self.updateRate);
-
- def newCon(self, radio=None, port=None):
- child = MForm(radio, port, len(self.conns), self.updateRate, self)
- if(child.radio is not None):
- child.setWindowTitle(str(child.radio))
- self.mdiArea.addSubWindow(child)
- child.showMaximized()
- self.conns.append(child)
- self.plots.append([])
-
- def propertiesMenu(self, key, radio, uid):
- r = str(radio).split(" ")
- title = "{0}:{1}".format(r[3], r[5])
-
- props = radio.properties([key])
-
- pmin,pmax = get_minmax(props[key])
-
- # Use display option mask of item to set up available plot
- # types and default options.
- disp = self.knobprops[uid][key].display
- cplx = disp & gr.DISPOPTCPLX | disp & gr.DISPXY
- strip = disp & gr.DISPOPTSTRIP
- stem = disp & gr.DISPOPTSTEM
- log = disp & gr.DISPOPTLOG
- scatter = disp & gr.DISPOPTSCATTER
-
- def newUpdaterProxy():
- self.newUpdater(key, radio)
-
- def newPlotterFProxy():
- self.newPlotF(key, uid, title, pmin, pmax,
- log, strip, stem)
-
- def newPlotterCProxy():
- self.newPlotC(key, uid, title, pmin, pmax,
- log, strip, stem)
-
- def newPlotterConstProxy():
- self.newPlotConst(key, uid, title, pmin, pmax,
- scatter, strip)
-
- def newPlotterPsdFProxy():
- self.newPlotPsdF(key, uid, title)
-
- def newPlotterPsdCProxy():
- self.newPlotPsdC(key, uid, title)
-
- def newPlotterRasterFProxy():
- self.newPlotRasterF(key, uid, title, pmin, pmax)
-
- def newPlotterRasterBProxy():
- self.newPlotRasterB(key, uid, title, pmin, pmax)
-
- menu = QtGui.QMenu(self)
- menu.setTitle("Item Actions")
- menu.setTearOffEnabled(False)
-
- # object properties
- menu.addAction("Properties", newUpdaterProxy)
-
- # displays available
- if(cplx == 0):
- menu.addAction("Plot Time", newPlotterFProxy)
- menu.addAction("Plot PSD", newPlotterPsdFProxy)
- menu.addAction("Plot Raster (real)", newPlotterRasterFProxy)
- #menu.addAction("Plot Raster (bits)", newPlotterRasterBProxy)
- else:
- menu.addAction("Plot Time", newPlotterCProxy)
- menu.addAction("Plot PSD", newPlotterPsdCProxy)
- menu.addAction("Plot Constellation", newPlotterConstProxy)
-
- menu.popup(QtGui.QCursor.pos())
-
- def newUpdater(self, key, radio):
- updater = UpdaterWindow(key, radio, None)
- updater.setWindowTitle("Updater: " + key)
- updater.setModal(False)
- updater.exec_()
-
- def newSub(self, e):
- tag = str(e.text(0))
- tree = e.treeWidget().parent()
- uid = tree.uid
- knobprop = self.knobprops[uid][tag]
-
- r = str(tree.radio).split(" ")
- title = "{0}:{1}".format(r[3], r[5])
- pmin,pmax = get_minmax(knobprop)
-
- disp = knobprop.display
- if(disp & gr.DISPTIME):
- strip = disp & gr.DISPOPTSTRIP
- stem = disp & gr.DISPOPTSTEM
- log = disp & gr.DISPOPTLOG
- if(disp & gr.DISPOPTCPLX == 0):
- self.newPlotF(tag, uid, title, pmin, pmax,
- log, strip, stem)
- else:
- self.newPlotC(tag, uid, title, pmin, pmax,
- log, strip, stem)
-
- elif(disp & gr.DISPXY):
- scatter = disp & gr.DISPOPTSCATTER
- self.newPlotConst(tag, uid, title, pmin, pmax, scatter)
-
- elif(disp & gr.DISPPSD):
- if(disp & gr.DISPOPTCPLX == 0):
- self.newPlotPsdF(tag, uid, title)
- else:
- self.newPlotPsdC(tag, uid, title)
-
- def startDrag(self, e):
- drag = QtGui.QDrag(self)
- mime_data = QtCore.QMimeData()
-
- tag = str(e.text(0))
- tree = e.treeWidget().parent()
- knobprop = self.knobprops[tree.uid][tag]
- disp = knobprop.display
- iscomplex = (disp & gr.DISPOPTCPLX) or (disp & gr.DISPXY)
-
- if(disp != gr.DISPNULL):
- data = "PlotData:::{0}:::{1}".format(tag, iscomplex)
- else:
- data = "OtherData:::{0}:::{1}".format(tag, iscomplex)
-
- mime_data.setText(data)
- drag.setMimeData(mime_data)
-
- drop = drag.start()
-
- def createPlot(self, plot, uid, title):
- plot.start()
- self.plots[uid].append(plot)
-
- self.mdiArea.addSubWindow(plot)
- plot.setWindowTitle("{0}: {1}".format(title, plot.name()))
- self.connect(plot.qwidget(),
- QtCore.SIGNAL('destroyed(QObject*)'),
- self.destroyPlot)
-
- # when the plot is updated via drag-and-drop, we need to be
- # notified of the new qwidget that's created so we can
- # properly destroy it.
- plot.plotupdated.connect(self.plotUpdated)
-
- plot.show()
-
- def plotUpdated(self, q):
- # the plot has been updated with a new qwidget; make sure this
- # gets dies to the destroyPlot function.
- for i, plots in enumerate(self.plots):
- for p in plots:
- if(p == q):
- #plots.remove(p)
- #plots.append(q)
- self.connect(q.qwidget(),
- QtCore.SIGNAL('destroyed(QObject*)'),
- self.destroyPlot)
- break
-
- def destroyPlot(self, obj):
- for plots in self.plots:
- for p in plots:
- if p.qwidget() == obj:
- plots.remove(p)
- break
-
- def newPlotConst(self, tag, uid, title="", pmin=None, pmax=None,
- scatter=False, stripchart=False):
- plot = GrDataPlotterConst(tag, 32e6, pmin, pmax, stripchart)
- plot.scatter(scatter)
- self.createPlot(plot, uid, title)
-
- def newPlotF(self, tag, uid, title="", pmin=None, pmax=None,
- logy=False, stripchart=False, stem=False):
- plot = GrDataPlotterF(tag, 32e6, pmin, pmax, stripchart)
- plot.semilogy(logy)
- plot.stem(stem)
- self.createPlot(plot, uid, title)
-
- def newPlotC(self, tag, uid, title="", pmin=None, pmax=None,
- logy=False, stripchart=False, stem=False):
- plot = GrDataPlotterC(tag, 32e6, pmin, pmax, stripchart)
- plot.semilogy(logy)
- plot.stem(stem)
- self.createPlot(plot, uid, title)
-
- def newPlotPsdF(self, tag, uid, title="", pmin=None, pmax=None):
- plot = GrDataPlotterPsdF(tag, 32e6, pmin, pmax)
- self.createPlot(plot, uid, title)
-
- def newPlotPsdC(self, tag, uid, title="", pmin=None, pmax=None):
- plot = GrDataPlotterPsdC(tag, 32e6, pmin, pmax)
- self.createPlot(plot, uid, title)
-
- def newPlotRasterF(self, tag, uid, title="", pmin=None, pmax=None):
- plot = GrTimeRasterF(tag, 32e6, pmin, pmax)
- self.createPlot(plot, uid, title)
-
- def newPlotRasterB(self, tag, uid, title="", pmin=None, pmax=None):
- plot = GrTimeRasterB(tag, 32e6, pmin, pmax)
- self.createPlot(plot, uid, title)
-
- def update(self, knobs, uid):
- #sys.stderr.write("KNOB KEYS: {0}\n".format(knobs.keys()))
- for plot in self.plots[uid]:
- data = []
- for n in plot.knobnames:
- d = knobs[n].value
- if(type(d) == GNURadio.complex):
- d = [d.re, d.im]
-
- # If it's a byte stream, Python thinks it's a string.
- # Unpack and convert to floats for plotting.
- if(type(d) == str and n.find('probe2_b') == 0):
- d = struct.unpack(len(d)*'b', d)
- d = [float(di) for di in d]
-
- data.append(d)
- plot.update(data)
- plot.stop()
- plot.wait()
- plot.start()
-
- def setActiveSubWindow(self, window):
- if window:
- self.mdiArea.setActiveSubWindow(window)
-
-
- def createActions(self):
- self.newConAct = QtGui.QAction("&New Connection",
- self, shortcut=QtGui.QKeySequence.New,
- statusTip="Create a new file", triggered=self.newCon)
-
- self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
- statusTip="Exit the application",
- triggered=QtGui.qApp.closeAllWindows)
-
- self.closeAct = QtGui.QAction("Cl&ose", self, shortcut="Ctrl+F4",
- statusTip="Close the active window",
- triggered=self.mdiArea.closeActiveSubWindow)
-
- self.closeAllAct = QtGui.QAction("Close &All", self,
- statusTip="Close all the windows",
- triggered=self.mdiArea.closeAllSubWindows)
-
- self.urAct = QtGui.QAction("Update Rate", self, shortcut="F5",
- statusTip="Change Update Rate",
- triggered=self.updateRateShow)
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_T);
- self.tileAct = QtGui.QAction("&Tile", self,
- statusTip="Tile the windows",
- triggered=self.mdiArea.tileSubWindows,
- shortcut=qks)
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_C);
- self.cascadeAct = QtGui.QAction("&Cascade", self,
- statusTip="Cascade the windows", shortcut=qks,
- triggered=self.mdiArea.cascadeSubWindows)
-
- self.nextAct = QtGui.QAction("Ne&xt", self,
- shortcut=QtGui.QKeySequence.NextChild,
- statusTip="Move the focus to the next window",
- triggered=self.mdiArea.activateNextSubWindow)
-
- self.previousAct = QtGui.QAction("Pre&vious", self,
- shortcut=QtGui.QKeySequence.PreviousChild,
- statusTip="Move the focus to the previous window",
- triggered=self.mdiArea.activatePreviousSubWindow)
-
- self.separatorAct = QtGui.QAction(self)
- self.separatorAct.setSeparator(True)
-
- self.aboutAct = QtGui.QAction("&About", self,
- statusTip="Show the application's About box",
- triggered=self.about)
-
- self.aboutQtAct = QtGui.QAction("About &Qt", self,
- statusTip="Show the Qt library's About box",
- triggered=QtGui.qApp.aboutQt)
-
- def createMenus(self):
- self.fileMenu = self.menuBar().addMenu("&File")
- self.fileMenu.addAction(self.newConAct)
- self.fileMenu.addAction(self.urAct)
- self.fileMenu.addSeparator()
- self.fileMenu.addAction(self.exitAct)
-
- self.windowMenu = self.menuBar().addMenu("&Window")
- self.updateWindowMenu()
- self.windowMenu.aboutToShow.connect(self.updateWindowMenu)
-
- self.menuBar().addSeparator()
-
- self.helpMenu = self.menuBar().addMenu("&Help")
- self.helpMenu.addAction(self.aboutAct)
- self.helpMenu.addAction(self.aboutQtAct)
-
- def updateRateShow(self):
- askrate = RateDialog(self.updateRate, self);
- if askrate.exec_():
- ur = float(str(askrate.delay.text()));
- self.setUpdateRate(ur);
- return;
- else:
- return;
-
- def createToolBars(self):
- self.fileToolBar = self.addToolBar("File")
- self.fileToolBar.addAction(self.newConAct)
- self.fileToolBar.addAction(self.urAct)
-
- self.fileToolBar = self.addToolBar("Window")
- self.fileToolBar.addAction(self.tileAct)
- self.fileToolBar.addAction(self.cascadeAct)
-
- def createStatusBar(self):
- self.statusBar().showMessage("Ready")
-
-
- def activeMdiChild(self):
- activeSubWindow = self.mdiArea.activeSubWindow()
- if activeSubWindow:
- return activeSubWindow.widget()
- return None
-
- def updateMenus(self):
- hasMdiChild = (self.activeMdiChild() is not None)
- self.closeAct.setEnabled(hasMdiChild)
- self.closeAllAct.setEnabled(hasMdiChild)
- self.tileAct.setEnabled(hasMdiChild)
- self.cascadeAct.setEnabled(hasMdiChild)
- self.nextAct.setEnabled(hasMdiChild)
- self.previousAct.setEnabled(hasMdiChild)
- self.separatorAct.setVisible(hasMdiChild)
-
- def updateWindowMenu(self):
- self.windowMenu.clear()
- self.windowMenu.addAction(self.closeAct)
- self.windowMenu.addAction(self.closeAllAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.tileAct)
- self.windowMenu.addAction(self.cascadeAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.nextAct)
- self.windowMenu.addAction(self.previousAct)
- self.windowMenu.addAction(self.separatorAct)
-
- def about(self):
- about_info = \
-'''Copyright 2012 Free Software Foundation, Inc.\n
-This program is part of GNU Radio.\n
-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.\n
-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.\n
-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.'''
-
- QtGui.QMessageBox.about(None, "gr-ctrlport-monitor", about_info)
-
-
-class ConInfoDialog(QtGui.QDialog):
- def __init__(self, parent=None):
- super(ConInfoDialog, self).__init__(parent)
-
- self.gridLayout = QtGui.QGridLayout(self)
-
-
- self.host = QtGui.QLineEdit(self);
- self.port = QtGui.QLineEdit(self);
- self.host.setText("localhost");
- self.port.setText("43243");
-
- self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok |
QtGui.QDialogButtonBox.Cancel)
-
- self.gridLayout.addWidget(self.host);
- self.gridLayout.addWidget(self.port);
- self.gridLayout.addWidget(self.buttonBox);
-
- self.buttonBox.accepted.connect(self.accept)
- self.buttonBox.rejected.connect(self.reject)
-
-
- def accept(self):
- self.done(1);
-
- def reject(self):
- self.done(0);
-
-
-class UpdaterWindow(QtGui.QDialog):
- def __init__(self, key, radio, parent):
- QtGui.QDialog.__init__(self, parent)
-
- self.key = key;
- self.radio = radio
-
- self.resize(300,200)
- self.layout = QtGui.QVBoxLayout()
-
- self.props = radio.properties([key])[key]
- info = str(self.props)
-
- self.infoLabel = QtGui.QLabel(info)
- self.layout.addWidget(self.infoLabel)
-
- # Test here to make sure that a 'set' function exists
- try:
- a = radio.set(radio.get([key]))
- has_set = True
- except Ice.UnknownException:
- has_set = False
-
- if(has_set is False):
- self.cancelButton = QtGui.QPushButton("Ok")
- self.cancelButton.connect(self.cancelButton,
QtCore.SIGNAL('clicked()'), self.reject)
-
- self.buttonlayout = QtGui.QHBoxLayout()
- self.buttonlayout.addWidget(self.cancelButton)
- self.layout.addLayout(self.buttonlayout)
-
- else: # we have a set function
- self.textInput = QtGui.QLineEdit()
- self.layout.addWidget(self.textInput)
-
- self.applyButton = QtGui.QPushButton("Apply")
- self.setButton = QtGui.QPushButton("OK")
- self.cancelButton = QtGui.QPushButton("Cancel")
-
- rv = radio.get([key])
- val = rv[key].value
- if(type(val) == GNURadio.complex):
- val = val.re + val.im*1j
-
- self.textInput.setText(str(val))
- self.sv = rv[key]
-
- self.applyButton.connect(self.applyButton,
QtCore.SIGNAL('clicked()'), self._apply)
- self.setButton.connect(self.setButton, QtCore.SIGNAL('clicked()'),
self._set)
- self.cancelButton.connect(self.cancelButton,
QtCore.SIGNAL('clicked()'), self.reject)
-
- self.is_num = ((type(self.sv.value)==float) or
(type(self.sv.value)==int))
- if(self.is_num):
- self.sliderlayout = QtGui.QHBoxLayout()
-
- self.slider = QtGui.QSlider(QtCore.Qt.Horizontal)
-
-
self.sliderlayout.addWidget(QtGui.QLabel(str(self.props.min.value)))
- self.sliderlayout.addWidget(self.slider)
-
self.sliderlayout.addWidget(QtGui.QLabel(str(self.props.max.value)))
-
- self.steps = 10000
- self.valspan = self.props.max.value - self.props.min.value
-
- self.slider.setRange(0, 10000)
- self._set_slider_value(self.sv.value)
-
- self.connect(self.slider, QtCore.SIGNAL("sliderReleased()"),
self._slide)
-
- self.layout.addLayout(self.sliderlayout)
- else:
- self._set_slider_value = None
-
- self.buttonlayout = QtGui.QHBoxLayout()
- self.buttonlayout.addWidget(self.applyButton)
- self.buttonlayout.addWidget(self.setButton)
- self.buttonlayout.addWidget(self.cancelButton)
- self.layout.addLayout(self.buttonlayout)
-
- # set layout and go...
- self.setLayout(self.layout)
-
- def _set_slider_value(self, val):
-
self.slider.setValue(self.steps*(val-self.props.min.value)/self.valspan)
-
- def _slide(self):
- val = (self.slider.value()*self.valspan +
self.props.min.value)/float(self.steps)
- self.textInput.setText(str(val))
-
- def _apply(self):
- if(type(self.sv.value) == str):
- val = str(self.textInput.text())
- elif(type(self.sv.value) == int):
- val = int(round(float(self.textInput.text())))
- elif(type(self.sv.value) == float):
- val = float(self.textInput.text())
- elif(type(self.sv.value) == GNURadio.complex):
- t = str(self.textInput.text())
- t = complex(t.strip("(").strip(")").replace(" ", ""))
- val = GNURadio.complex()
- val.re = t.real
- val.im = t.imag
- else:
- sys.stderr.write("set type not supported!
({0})\n".format(type(self.sv.value)))
- return
-
- self.sv.value = val
- km = {}
- km[self.key] = self.sv
- self.radio.set(km)
- if self._set_slider_value:
- self._set_slider_value(self.sv.value)
-
- def _set(self):
- self._apply()
- self.done(0)
-
-
-class MForm(QtGui.QWidget):
- def update(self):
- try:
- st = time.time();
- knobs = self.radio.get([]);
- ft = time.time();
- latency = ft-st;
- self.parent.statusBar().showMessage("Current GNU Radio Control
Port Query Latency: %f ms"%(latency*1000))
-
- except Exception, e:
- sys.stderr.write("ctrlport-monitor: radio.get threw exception
({0}).\n".format(e))
- if(type(self.parent) is MAINWindow):
- # Find window of connection
- remove = []
- for p in self.parent.mdiArea.subWindowList():
- if self.parent.conns[self.uid] == p.widget():
- remove.append(p)
-
- # Find any subplot windows of connection
- for p in self.parent.mdiArea.subWindowList():
- for plot in self.parent.plots[self.uid]:
- if plot.qwidget() == p.widget():
- remove.append(p)
-
- # Clean up local references to these
- self.parent.conns.remove(self.parent.conns[self.uid])
- self.parent.plots.remove(self.parent.plots[self.uid])
-
- # Remove subwindows for connection and plots
- for r in remove:
- self.parent.mdiArea.removeSubWindow(r)
-
- # Clean up self
- self.close()
- else:
- sys.exit(1)
- return
-
- tableitems = knobs.keys()
-
- #UPDATE TABLE:
- try:
- self.table.updateItems(knobs, self.knobprops)
- except:
- self.knobprops = self.radio.properties([])
-
- #UPDATE PLOTS
- self.parent.update(knobs, self.uid)
-
-
- def __init__(self, radio=None, port=None, uid=0, updateRate=2000,
parent=None):
-
- super(MForm, self).__init__()
-
- if(radio == None or port == None):
- askinfo = ConInfoDialog(self);
- if askinfo.exec_():
- host = str(askinfo.host.text());
- port = str(askinfo.port.text());
- radio = parent.interface.getRadio(host, port)
- else:
- self.radio = None
- return
-
- self.uid = uid
- self.parent = parent
- self.horizontalLayout = QtGui.QVBoxLayout(self)
- self.gridLayout = QtGui.QGridLayout()
-
- self.radio = radio
- self.knobprops = self.radio.properties([])
- self.parent.knobprops.append(self.knobprops)
- self.resize(775,500)
- self.timer = QtCore.QTimer()
- self.constupdatediv = 0
- self.tableupdatediv = 0
- plotsize=250
-
- # make table
- self.table = GrDataPlotterValueTable(uid, self, 0, 0, 400, 200)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
QtGui.QSizePolicy.Preferred)
- self.table.treeWidget.setSizePolicy(sizePolicy)
-
self.table.treeWidget.setEditTriggers(QtGui.QAbstractItemView.EditKeyPressed)
- self.table.treeWidget.setSortingEnabled(True)
- self.table.treeWidget.setDragEnabled(True)
-
- # add things to layouts
- self.horizontalLayout.addWidget(self.table.treeWidget)
-
- # set up timer
- self.connect(self.timer, QtCore.SIGNAL('timeout()'), self.update)
- self.updateRate = updateRate;
- self.timer.start(self.updateRate)
-
- # set up context menu ..
- self.table.treeWidget.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
- self.table.treeWidget.customContextMenuRequested.connect(self.openMenu)
-
- # Set up double-click to launch default plotter
- self.connect(self.table.treeWidget,
- QtCore.SIGNAL('itemDoubleClicked(QTreeWidgetItem*, int)'),
- self.parent.newSub);
-
- # Allow drag/drop event from table item to plotter
- self.connect(self.table.treeWidget,
- QtCore.SIGNAL('itemPressed(QTreeWidgetItem*, int)'),
- self.parent.startDrag)
-
- def openMenu(self, pos):
- index = self.table.treeWidget.selectedIndexes()
- item = self.table.treeWidget.itemFromIndex(index[0])
- itemname = str(item.text(0))
- self.parent.propertiesMenu(itemname, self.radio, self.uid)
-
-
-def get_minmax(p):
- pmin = p.min.value
- pmax = p.max.value
-
- # Find min/max or real or imag for GNURadio::complex
- if(type(pmin) == GNURadio.complex):
- pmin = min(pmin.re, pmin.im)
- if(type(pmax) == GNURadio.complex):
- pmax = max(pmax.re, pmax.im)
-
- # If it's a byte stream, Python thinks it's a string.
- if(type(pmin) == str):
- pmin = struct.unpack('b', pmin)[0]
- if(type(pmax) == str):
- pmax = struct.unpack('b', pmax)[0]
-
- if pmin == []:
- pmin = None
- else:
- pmin = 1.1*float(pmin)
- if pmax == []:
- pmax = None
- else:
- pmax = 1.1*float(pmax)
-
- return pmin, pmax
-
-class MyClient(IceRadioClient):
- def __init__(self):
- IceRadioClient.__init__(self, MAINWindow)
-
-sys.exit(MyClient().main(sys.argv))
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitor
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitor
deleted file mode 100755
index 612eb66..0000000
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitor
+++ /dev/null
@@ -1,591 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012-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.
-#
-
-from gnuradio import gr, ctrlport
-
-from PyQt4 import QtCore,Qt,Qwt5
-import PyQt4.QtGui as QtGui
-import sys, time, re, pprint
-import itertools
-import scipy
-
-import Ice
-from gnuradio.ctrlport.IceRadioClient import *
-from gnuradio.ctrlport.GrDataPlotter import *
-from gnuradio.ctrlport import GNURadio
-
-class MAINWindow(QtGui.QMainWindow):
- def minimumSizeHint(self):
- return QtGui.QSize(800,600)
-
- def __init__(self, radio, port, interface):
-
- super(MAINWindow, self).__init__()
- self.conns = []
- self.plots = []
- self.knobprops = []
- self.interface = interface
-
- self.mdiArea = QtGui.QMdiArea()
- self.mdiArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.mdiArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.setCentralWidget(self.mdiArea)
-
- self.mdiArea.subWindowActivated.connect(self.updateMenus)
- self.windowMapper = QtCore.QSignalMapper(self)
-
self.windowMapper.mapped[QtGui.QWidget].connect(self.setActiveSubWindow)
-
- self.createActions()
- self.createMenus()
- self.createToolBars()
- self.createStatusBar()
- self.updateMenus()
-
- self.setWindowTitle("GNU Radio Performance Monitor")
- self.setUnifiedTitleAndToolBarOnMac(True)
-
- self.newCon(radio, port)
- icon = QtGui.QIcon(ctrlport.__path__[0] + "/icon.png" )
- self.setWindowIcon(icon)
-
- def newCon(self, radio=None, port=None):
- child = MForm(radio, port, len(self.conns), self)
- if(child.radio is not None):
- child.setWindowTitle(str(child.radio))
- horizbar = QtGui.QScrollArea()
- horizbar.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- horizbar.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- horizbar.setWidget(child)
- self.mdiArea.addSubWindow(horizbar)
- self.mdiArea.currentSubWindow().showMaximized()
-
- self.conns.append(child)
- self.plots.append([])
-
- def newUpdater(self, key, radio):
- updater = UpdaterWindow(key, radio, None)
- updater.setWindowTitle("Updater: " + key)
- updater.setModal(False)
- updater.exec_()
-
- def update(self, knobs, uid):
- #sys.stderr.write("KNOB KEYS: {0}\n".format(knobs.keys()))
- for plot in self.plots[uid]:
- data = knobs[plot.name()].value
- plot.update(data)
- plot.stop()
- plot.wait()
- plot.start()
-
- def setActiveSubWindow(self, window):
- if window:
- self.mdiArea.setActiveSubWindow(window)
-
-
- def createActions(self):
- self.newConAct = QtGui.QAction("&New Connection",
- self, shortcut=QtGui.QKeySequence.New,
- statusTip="Create a new file", triggered=self.newCon)
-
- self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
- statusTip="Exit the application",
- triggered=QtGui.qApp.closeAllWindows)
-
- self.closeAct = QtGui.QAction("Cl&ose", self, shortcut="Ctrl+F4",
- statusTip="Close the active window",
- triggered=self.mdiArea.closeActiveSubWindow)
-
- self.closeAllAct = QtGui.QAction("Close &All", self,
- statusTip="Close all the windows",
- triggered=self.mdiArea.closeAllSubWindows)
-
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_T);
- self.tileAct = QtGui.QAction("&Tile", self,
- statusTip="Tile the windows",
- triggered=self.mdiArea.tileSubWindows,
- shortcut=qks)
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_C);
- self.cascadeAct = QtGui.QAction("&Cascade", self,
- statusTip="Cascade the windows", shortcut=qks,
- triggered=self.mdiArea.cascadeSubWindows)
-
- self.nextAct = QtGui.QAction("Ne&xt", self,
- shortcut=QtGui.QKeySequence.NextChild,
- statusTip="Move the focus to the next window",
- triggered=self.mdiArea.activateNextSubWindow)
-
- self.previousAct = QtGui.QAction("Pre&vious", self,
- shortcut=QtGui.QKeySequence.PreviousChild,
- statusTip="Move the focus to the previous window",
- triggered=self.mdiArea.activatePreviousSubWindow)
-
- self.separatorAct = QtGui.QAction(self)
- self.separatorAct.setSeparator(True)
-
- self.aboutAct = QtGui.QAction("&About", self,
- statusTip="Show the application's About box",
- triggered=self.about)
-
- self.aboutQtAct = QtGui.QAction("About &Qt", self,
- statusTip="Show the Qt library's About box",
- triggered=QtGui.qApp.aboutQt)
-
- def createMenus(self):
- self.fileMenu = self.menuBar().addMenu("&File")
- self.fileMenu.addAction(self.newConAct)
- self.fileMenu.addSeparator()
- self.fileMenu.addAction(self.exitAct)
-
- self.windowMenu = self.menuBar().addMenu("&Window")
- self.updateWindowMenu()
- self.windowMenu.aboutToShow.connect(self.updateWindowMenu)
-
- self.menuBar().addSeparator()
-
- self.helpMenu = self.menuBar().addMenu("&Help")
- self.helpMenu.addAction(self.aboutAct)
- self.helpMenu.addAction(self.aboutQtAct)
-
- def createToolBars(self):
- self.fileToolBar = self.addToolBar("File")
- self.fileToolBar.addAction(self.newConAct)
-
- self.fileToolBar = self.addToolBar("Window")
- self.fileToolBar.addAction(self.tileAct)
- self.fileToolBar.addAction(self.cascadeAct)
-
- def createStatusBar(self):
- self.statusBar().showMessage("Ready")
-
-
- def activeMdiChild(self):
- activeSubWindow = self.mdiArea.activeSubWindow()
- if activeSubWindow:
- return activeSubWindow.widget()
- return None
-
- def updateMenus(self):
- hasMdiChild = (self.activeMdiChild() is not None)
- self.closeAct.setEnabled(hasMdiChild)
- self.closeAllAct.setEnabled(hasMdiChild)
- self.tileAct.setEnabled(hasMdiChild)
- self.cascadeAct.setEnabled(hasMdiChild)
- self.nextAct.setEnabled(hasMdiChild)
- self.previousAct.setEnabled(hasMdiChild)
- self.separatorAct.setVisible(hasMdiChild)
-
- def updateWindowMenu(self):
- self.windowMenu.clear()
- self.windowMenu.addAction(self.closeAct)
- self.windowMenu.addAction(self.closeAllAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.tileAct)
- self.windowMenu.addAction(self.cascadeAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.nextAct)
- self.windowMenu.addAction(self.previousAct)
- self.windowMenu.addAction(self.separatorAct)
-
- def about(self):
- about_info = \
-'''Copyright 2012 Free Software Foundation, Inc.\n
-This program is part of GNU Radio.\n
-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.\n
-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.\n
-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.'''
-
- QtGui.QMessageBox.about(None, "gr-ctrlport-monitor", about_info)
-
-
-class ConInfoDialog(QtGui.QDialog):
- def __init__(self, parent=None):
- super(ConInfoDialog, self).__init__(parent)
-
- self.gridLayout = QtGui.QGridLayout(self)
-
-
- self.host = QtGui.QLineEdit(self);
- self.port = QtGui.QLineEdit(self);
- self.host.setText("localhost");
- self.port.setText("43243");
-
- self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok |
- QtGui.QDialogButtonBox.Cancel)
-
- self.gridLayout.addWidget(self.host);
- self.gridLayout.addWidget(self.port);
- self.gridLayout.addWidget(self.buttonBox);
-
- self.buttonBox.accepted.connect(self.accept)
- self.buttonBox.rejected.connect(self.reject)
-
-
- def accept(self):
- self.done(1);
-
- def reject(self):
- self.done(0);
-
-
-class UpdaterWindow(QtGui.QDialog):
- def __init__(self, key, radio, parent):
- QtGui.QDialog.__init__(self, parent)
-
- self.key = key;
- self.radio = radio
-
- self.resize(300,200)
- self.layout = QtGui.QVBoxLayout()
-
- self.props = radio.properties([key])[key]
- info = str(self.props)
-
- self.infoLabel = QtGui.QLabel(info)
- self.layout.addWidget(self.infoLabel)
-
- self.cancelButton = QtGui.QPushButton("Ok")
- self.cancelButton.connect(self.cancelButton,
QtCore.SIGNAL('clicked()'), self.reject)
-
- self.buttonlayout = QtGui.QHBoxLayout()
- self.buttonlayout.addWidget(self.cancelButton)
- self.layout.addLayout(self.buttonlayout)
-
- # set layout and go...
- self.setLayout(self.layout)
-
- def _set_slider_value(self, val):
-
self.slider.setValue(self.steps*(val-self.props.min.value)/self.valspan)
-
- def _slide(self):
- val = (self.slider.value()*self.valspan +
self.props.min.value)/float(self.steps)
- self.textInput.setText(str(val))
-
- def _apply(self):
- if(type(self.sv.value) == str):
- val = str(self.textInput.text())
- elif(type(self.sv.value) == int):
- val = int(round(float(self.textInput.text())))
- elif(type(self.sv.value) == float):
- val = float(self.textInput.text())
- else:
- sys.stderr.write("set type not supported!
({0})\n".format(type(self.sv.value)))
- sys.exit(-1)
-
- self.sv.value = val
- km = {}
- km[self.key] = self.sv
- self.radio.set(km)
- self._set_slider_value(self.sv.value)
-
- def _set(self):
- self._apply()
- self.done(0)
-
-
-def build_edge_graph(sources, sinks, edges):
- '''
- Starting from the sources, walks through all of the edges to find
- the next connected block. The output is stored in 'allblocks'
- where each row starts with a source and follows one path down
- until it terminates in either a sink or as an input to a block
- that is part of another chain.
- '''
- def find_edge(src, sinks, edges, row, col):
- #print "\n\nAll blocks: "
- #printer.pprint(allblocks)
- #print "\nLooking for: ", src
-
- src0 = src.split(":")[0]
- if(src0 in sinks):
- if(len(allblocks) <= row):
- allblocks.append(col*[""])
- allblocks[row].append(src)
- return row+1
-
- for edge in edges:
- if(re.match(src0, edge)):
- s = edge.split("->")[0]
- b = edge.split("->")[1]
- if(len(allblocks) <= row):
- allblocks.append(col*[""])
- allblocks[row].append(s)
- #print "Source: {0} Sink: {1}".format(s, b)
- row = find_edge(b, sinks, edges, row, col+1)
- return row
-
- # Recursively get all edges as a matrix of source->sink
- n = 0
- allblocks = []
- for src in sources:
- n = find_edge(src, sinks, edges, n, 0)
-
- # Sort by longest list
- allblocks = sorted(allblocks, key=len)
- allblocks.reverse()
-
- # Make all rows same length by padding '' in front of sort rows
- maxrowlen = len(allblocks[0])
- for i,a in enumerate(allblocks):
- rowlen = len(a)
- allblocks[i] = (maxrowlen-rowlen)*[''] + a
-
- # Dedup rows
- allblocks = sorted(allblocks)
- allblocks = list(k for k,_ in itertools.groupby(allblocks))
- allblocks.reverse()
-
- return allblocks
-
-
-class MForm(QtGui.QWidget):
- def update(self):
- try:
- st = time.time()
- knobs = self.radio.get([b[0] for b in self.block_dict])
-
- ft = time.time()
- latency = ft-st
- self.parent.statusBar().showMessage("Current GNU Radio Control
Port Query Latency: %f ms"%\
- (latency*1000))
-
- except Exception, e:
- sys.stderr.write("ctrlport-monitor: radio.get threw exception
({0}).\n".format(e))
- if(type(self.parent) is MAINWindow):
- # Find window of connection
- remove = []
- for p in self.parent.mdiArea.subWindowList():
- if self.parent.conns[self.uid] == p.widget():
- remove.append(p)
-
- # Find any subplot windows of connection
- for p in self.parent.mdiArea.subWindowList():
- for plot in self.parent.plots[self.uid]:
- if plot.qwidget() == p.widget():
- remove.append(p)
-
- # Clean up local references to these
- self.parent.conns.remove(self.parent.conns[self.uid])
- self.parent.plots.remove(self.parent.plots[self.uid])
-
- # Remove subwindows for connection and plots
- for r in remove:
- self.parent.mdiArea.removeSubWindow(r)
-
- # Clean up self
- self.close()
- else:
- sys.exit(1)
- return
-
- #UPDATE TABLE:
- self.updateItems(knobs)
-
- #UPDATE PLOTS
- self.parent.update(knobs, self.uid)
-
- def updateItems(self, knobs):
- for b in self.block_dict:
- if(knobs[b[0]].ice_id.im_class == GNURadio.KnobVecF):
- b[1].setText("{0:.4f}".format(knobs[b[0]].value[b[2]]))
- else:
- b[1].setText("{0:.4f}".format(knobs[b[0]].value))
-
- def __init__(self, radio=None, port=None, uid=0, parent=None):
-
- super(MForm, self).__init__()
-
- if(radio == None or port == None):
- askinfo = ConInfoDialog(self);
- if askinfo.exec_():
- host = str(askinfo.host.text());
- port = str(askinfo.port.text());
- radio = parent.interface.getRadio(host, port)
- else:
- self.radio = None
- return
-
- self.uid = uid
- self.parent = parent
- self.layout = QtGui.QGridLayout(self)
- self.layout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
-
- self.radio = radio
- self.knobprops = self.radio.properties([])
- self.parent.knobprops.append(self.knobprops)
- self.resize(775,500)
- self.timer = QtCore.QTimer()
- self.constupdatediv = 0
- self.tableupdatediv = 0
- plotsize=250
-
-
- # Set up the graph of blocks
- input_name = lambda x: x+"::avg input % full"
- output_name = lambda x: x+"::avg output % full"
- wtime_name = lambda x: x+"::avg work time"
- nout_name = lambda x: x+"::avg noutput_items"
- nprod_name = lambda x: x+"::avg nproduced"
-
- tmplist = []
- knobs = self.radio.get([])
- edgelist = None
- for k in knobs:
- propname = k.split("::")
- blockname = propname[0]
- keyname = propname[1]
- if(keyname == "edge list"):
- edgelist = knobs[k].value
- elif(blockname not in tmplist):
- # only take gr_blocks (no hier_block2)
- if(knobs.has_key(input_name(blockname))):
- tmplist.append(blockname)
-
- if not edgelist:
- sys.stderr.write("Could not find list of edges from flowgraph. " +
\
- "Make sure the option 'edges_list' is enabled
" + \
- "in the ControlPort configuration.\n\n")
- sys.exit(1)
-
- edges = edgelist.split("\n")[0:-1]
- producers = []
- consumers = []
- for e in edges:
- _e = e.split("->")
- producers.append(_e[0])
- consumers.append(_e[1])
-
- # Get producers and consumers as sets while ignoring the
- # ports.
- prods = set(map(lambda x: x.split(":")[0], producers))
- cons = set(map(lambda x: x.split(":")[0], consumers))
-
- # Split out all blocks, sources, and sinks based on how they
- # appear as consumers and/or producers.
- blocks = prods.intersection(cons)
- sources = prods.difference(blocks)
- sinks = cons.difference(blocks)
-
- nblocks = len(prods) + len(cons)
-
- allblocks = build_edge_graph(sources, sinks, edges)
- nrows = len(allblocks)
- ncols = len(allblocks[0])
-
- col_width = 120
-
- self.block_dict = []
-
- for row, blockrow in enumerate(allblocks):
- for col, block in enumerate(blockrow):
- if(block == ''):
- continue
-
- bgroup = QtGui.QGroupBox(block)
- playout = QtGui.QFormLayout()
- bgroup.setLayout(playout)
- self.layout.addWidget(bgroup, row, 2*col)
-
- blockname = block.split(":")[0]
-
- name = wtime_name(blockname)
- wtime = knobs[name].value
- newtime = QtGui.QLineEdit()
- newtime.setMinimumWidth(col_width)
- newtime.setText("{0:.4f}".format(wtime))
- self.block_dict.append((name, newtime))
-
- name = nout_name(blockname)
- nout = knobs[name].value
- newnout = QtGui.QLineEdit()
- newnout.setText("{0:.4f}".format(nout))
- newnout.setMinimumWidth(col_width)
- self.block_dict.append((name, newnout))
-
- name = nprod_name(blockname)
- nprod = knobs[name].value
- newnprod = QtGui.QLineEdit()
- newnprod.setMinimumWidth(col_width)
- newnprod.setText("{0:.4f}".format(nprod))
- self.block_dict.append((name, newnprod))
-
- playout.addRow("Work time", newtime)
- playout.addRow("noutput_items", newnout)
- playout.addRow("nproduced", newnprod)
-
- if blockname in blocks or blockname in sources:
- # Add a buffer between blocks
- buffgroup = QtGui.QGroupBox("Buffer")
- bufflayout = QtGui.QFormLayout()
- buffgroup.setLayout(bufflayout)
- self.layout.addWidget(buffgroup, row, 2*col+1)
-
- i = int(block.split(":")[1])
- name = output_name(blockname)
- obuff = knobs[name].value
- for i,o in enumerate(obuff):
- newobuff = QtGui.QLineEdit()
- newobuff.setMinimumWidth(col_width)
- newobuff.setText("{0:.4f}".format(o))
- self.block_dict.append((name, newobuff, i))
- bufflayout.addRow("Out Buffer {0}".format(i),
- newobuff)
-
- if blockname in blocks or blockname in sinks:
- item = self.layout.itemAtPosition(row, 2*col-1)
- if(item):
- buffgroup = item.widget()
- bufflayout = buffgroup.layout()
- else:
- buffgroup = QtGui.QGroupBox("Buffer")
- bufflayout = QtGui.QFormLayout()
- buffgroup.setLayout(bufflayout)
- self.layout.addWidget(buffgroup, row, 2*col-1)
-
- i = int(block.split(":")[1])
- name = input_name(blockname)
- ibuff = knobs[name].value[i]
- newibuff = QtGui.QLineEdit()
- newibuff.setMinimumWidth(col_width)
- newibuff.setText("{0:.4f}".format(ibuff))
- self.block_dict.append((name, newibuff, i))
- bufflayout.addRow("In Buffer {0}".format(i),
- newibuff)
-
- # set up timer
- self.timer = QtCore.QTimer()
- self.connect(self.timer, QtCore.SIGNAL('timeout()'), self.update)
- self.timer.start(1000)
-
- def openMenu(self, pos):
- index = self.table.treeWidget.selectedIndexes()
- item = self.table.treeWidget.itemFromIndex(index[0])
- itemname = str(item.text(0))
- self.parent.propertiesMenu(itemname, self.radio, self.uid)
-
-
-class MyClient(IceRadioClient):
- def __init__(self):
- IceRadioClient.__init__(self, MAINWindow)
-
-sys.exit(MyClient().main(sys.argv))
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
deleted file mode 100755
index 369922c..0000000
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ /dev/null
@@ -1,849 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012-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.
-#
-
-import random,math,operator
-import networkx as nx;
-import matplotlib
-matplotlib.use("Qt4Agg");
-import matplotlib.pyplot as plt
-from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
FigureCanvas
-from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as
NavigationToolbar
-from matplotlib.figure import Figure
-
-from gnuradio import gr, ctrlport
-
-from PyQt4 import QtCore,Qt,Qwt5
-import PyQt4.QtGui as QtGui
-import sys, time, re, pprint
-import itertools
-
-import Ice
-from gnuradio.ctrlport.IceRadioClient import *
-from gnuradio.ctrlport.GrDataPlotter import *
-from gnuradio.ctrlport import GNURadio
-
-class MAINWindow(QtGui.QMainWindow):
- def minimumSizeHint(self):
- return QtGui.QSize(800,600)
-
- def __init__(self, radio, port, interface):
-
- super(MAINWindow, self).__init__()
- self.conns = []
- self.plots = []
- self.knobprops = []
- self.interface = interface
-
- self.mdiArea = QtGui.QMdiArea()
- self.mdiArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.mdiArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
- self.setCentralWidget(self.mdiArea)
-
- self.mdiArea.subWindowActivated.connect(self.updateMenus)
- self.windowMapper = QtCore.QSignalMapper(self)
-
self.windowMapper.mapped[QtGui.QWidget].connect(self.setActiveSubWindow)
-
- self.createActions()
- self.createMenus()
- self.createToolBars()
- self.createStatusBar()
- self.updateMenus()
-
- self.setWindowTitle("GNU Radio Performance Monitor")
- self.setUnifiedTitleAndToolBarOnMac(True)
-
- self.newCon(radio, port)
- icon = QtGui.QIcon(ctrlport.__path__[0] + "/icon.png" )
- self.setWindowIcon(icon)
-
- def newSubWindow(self, window, title):
- child = window;
- child.setWindowTitle(title)
- self.mdiArea.addSubWindow(child)
- self.conns.append(child)
- child.show();
- self.mdiArea.currentSubWindow().showMaximized()
-
-
- def newCon(self, radio=None, port=None):
- child = MForm(radio, port, len(self.conns), self)
- if(child.radio is not None):
- child.setWindowTitle(str(child.radio))
-# horizbar = QtGui.QScrollArea()
-# horizbar.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
-# horizbar.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
-# horizbar.setWidget(child)
-# self.mdiArea.addSubWindow(horizbar)
- self.mdiArea.addSubWindow(child)
- self.mdiArea.currentSubWindow().showMaximized()
-
- self.conns.append(child)
- self.plots.append([])
-
- def update(self, knobs, uid):
- #sys.stderr.write("KNOB KEYS: {0}\n".format(knobs.keys()))
- for plot in self.plots[uid]:
- data = knobs[plot.name()].value
- plot.update(data)
- plot.stop()
- plot.wait()
- plot.start()
-
- def setActiveSubWindow(self, window):
- if window:
- self.mdiArea.setActiveSubWindow(window)
-
-
- def createActions(self):
- self.newConAct = QtGui.QAction("&New Connection",
- self, shortcut=QtGui.QKeySequence.New,
- statusTip="Create a new file", triggered=self.newCon)
-
- self.exitAct = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",
- statusTip="Exit the application",
- triggered=QtGui.qApp.closeAllWindows)
-
- self.closeAct = QtGui.QAction("Cl&ose", self, shortcut="Ctrl+F4",
- statusTip="Close the active window",
- triggered=self.mdiArea.closeActiveSubWindow)
-
- self.closeAllAct = QtGui.QAction("Close &All", self,
- statusTip="Close all the windows",
- triggered=self.mdiArea.closeAllSubWindows)
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_T);
- self.tileAct = QtGui.QAction("&Tile", self,
- statusTip="Tile the windows",
- triggered=self.mdiArea.tileSubWindows,
- shortcut=qks)
-
- qks = QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_C);
- self.cascadeAct = QtGui.QAction("&Cascade", self,
- statusTip="Cascade the windows", shortcut=qks,
- triggered=self.mdiArea.cascadeSubWindows)
-
- self.nextAct = QtGui.QAction("Ne&xt", self,
- shortcut=QtGui.QKeySequence.NextChild,
- statusTip="Move the focus to the next window",
- triggered=self.mdiArea.activateNextSubWindow)
-
- self.previousAct = QtGui.QAction("Pre&vious", self,
- shortcut=QtGui.QKeySequence.PreviousChild,
- statusTip="Move the focus to the previous window",
- triggered=self.mdiArea.activatePreviousSubWindow)
-
- self.separatorAct = QtGui.QAction(self)
- self.separatorAct.setSeparator(True)
-
- self.aboutAct = QtGui.QAction("&About", self,
- statusTip="Show the application's About box",
- triggered=self.about)
-
- self.aboutQtAct = QtGui.QAction("About &Qt", self,
- statusTip="Show the Qt library's About box",
- triggered=QtGui.qApp.aboutQt)
-
- def createMenus(self):
- self.fileMenu = self.menuBar().addMenu("&File")
- self.fileMenu.addAction(self.newConAct)
- self.fileMenu.addSeparator()
- self.fileMenu.addAction(self.exitAct)
-
- self.windowMenu = self.menuBar().addMenu("&Window")
- self.updateWindowMenu()
- self.windowMenu.aboutToShow.connect(self.updateWindowMenu)
-
- self.menuBar().addSeparator()
-
- self.helpMenu = self.menuBar().addMenu("&Help")
- self.helpMenu.addAction(self.aboutAct)
- self.helpMenu.addAction(self.aboutQtAct)
-
- def createToolBars(self):
- self.fileToolBar = self.addToolBar("File")
- self.fileToolBar.addAction(self.newConAct)
-
- self.fileToolBar = self.addToolBar("Window")
- self.fileToolBar.addAction(self.tileAct)
- self.fileToolBar.addAction(self.cascadeAct)
-
- def createStatusBar(self):
- self.statusBar().showMessage("Ready")
-
-
- def activeMdiChild(self):
- activeSubWindow = self.mdiArea.activeSubWindow()
- if activeSubWindow:
- return activeSubWindow.widget()
- return None
-
- def updateMenus(self):
- hasMdiChild = (self.activeMdiChild() is not None)
- self.closeAct.setEnabled(hasMdiChild)
- self.closeAllAct.setEnabled(hasMdiChild)
- self.tileAct.setEnabled(hasMdiChild)
- self.cascadeAct.setEnabled(hasMdiChild)
- self.nextAct.setEnabled(hasMdiChild)
- self.previousAct.setEnabled(hasMdiChild)
- self.separatorAct.setVisible(hasMdiChild)
-
- def updateWindowMenu(self):
- self.windowMenu.clear()
- self.windowMenu.addAction(self.closeAct)
- self.windowMenu.addAction(self.closeAllAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.tileAct)
- self.windowMenu.addAction(self.cascadeAct)
- self.windowMenu.addSeparator()
- self.windowMenu.addAction(self.nextAct)
- self.windowMenu.addAction(self.previousAct)
- self.windowMenu.addAction(self.separatorAct)
-
- def about(self):
- about_info = \
-'''Copyright 2012 Free Software Foundation, Inc.\n
-This program is part of GNU Radio.\n
-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.\n
-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.\n
-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.'''
-
- QtGui.QMessageBox.about(None, "gr-ctrlport-monitor", about_info)
-
-
-class ConInfoDialog(QtGui.QDialog):
- def __init__(self, parent=None):
- super(ConInfoDialog, self).__init__(parent)
-
- self.gridLayout = QtGui.QGridLayout(self)
-
-
- self.host = QtGui.QLineEdit(self);
- self.port = QtGui.QLineEdit(self);
- self.host.setText("localhost");
- self.port.setText("43243");
-
- self.buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok |
- QtGui.QDialogButtonBox.Cancel)
-
- self.gridLayout.addWidget(self.host);
- self.gridLayout.addWidget(self.port);
- self.gridLayout.addWidget(self.buttonBox);
-
- self.buttonBox.accepted.connect(self.accept)
- self.buttonBox.rejected.connect(self.reject)
-
-
- def accept(self):
- self.done(1);
-
- def reject(self):
- self.done(0);
-
-
-class DataTable(QtGui.QWidget):
- def update(self):
- print "update"
-
- def __init__(self, radio, G):
- QtGui.QWidget.__init__( self)
-
- self.layout = QtGui.QVBoxLayout(self);
- self.hlayout = QtGui.QHBoxLayout();
- self.layout.addLayout(self.hlayout);
-
- self.G = G;
- self.radio = radio;
-
- self._keymap = None
-
- # Create a combobox to set the type of statistic we want.
- self._statistic = "Instantaneous"
- self._statistics_table = {"Instantaneous": "",
- "Average": "avg ",
- "Variance": "var "}
- self.stattype = QtGui.QComboBox()
- self.stattype.addItem("Instantaneous")
- self.stattype.addItem("Average")
- self.stattype.addItem("Variance")
- self.stattype.setMaximumWidth(200)
- self.hlayout.addWidget(self.stattype);
- self.stattype.currentIndexChanged.connect(self.stat_changed)
-
- # Create a checkbox to toggle sorting of graphs
- self._sort = False
- self.checksort = QtGui.QCheckBox("Sort")
- self.checksort.setCheckState(self._sort)
- self.hlayout.addWidget(self.checksort);
- self.checksort.stateChanged.connect(self.checksort_changed)
-
- # set up table
- self.perfTable = Qt.QTableWidget();
- self.perfTable.setColumnCount(2)
- self.perfTable.verticalHeader().hide();
- self.perfTable.setHorizontalHeaderLabels( ["Block Name", "Percent
Runtime"] );
- self.perfTable.horizontalHeader().setStretchLastSection(True);
- self.perfTable.setSortingEnabled(True)
- nodes = self.G.nodes(data=True)
-
- # set up plot
- self.f = plt.figure(figsize=(10,8), dpi=90)
- self.sp = self.f.add_subplot(111);
- self.sp.autoscale_view(True,True,True);
- self.sp.set_autoscale_on(True)
- self.canvas = FigureCanvas(self.f)
-
- # set up tabs
- self.tabber = QtGui.QTabWidget();
- self.layout.addWidget(self.tabber);
- self.tabber.addTab(self.perfTable,"Table View");
- self.tabber.addTab(self.canvas, "Graph View");
-
- # set up timer
- self.timer = QtCore.QTimer()
- self.connect(self.timer, QtCore.SIGNAL('timeout()'), self.update)
- self.timer.start(500)
-
- for i in range(0,len(nodes)):
- self.perfTable.setItem(
- i,0,
- Qt.QTableWidgetItem(nodes[i][0]))
-
- def table_update(self,data):
- for k in data.keys():
- weight = data[k]
- existing =
self.perfTable.findItems(str(k),QtCore.Qt.MatchFixedString)
- if(len(existing) == 0):
- i = self.perfTable.rowCount();
- self.perfTable.setRowCount( i+1)
- self.perfTable.setItem( i,0, Qt.QTableWidgetItem(str(k)))
- self.perfTable.setItem( i,1, Qt.QTableWidgetItem(str(weight)))
- else:
- self.perfTable.setItem( self.perfTable.row(existing[0]),1,
Qt.QTableWidgetItem(str(weight)))
-
- def stat_changed(self, index):
- self._statistic = str(self.stattype.currentText())
-
- def checksort_changed(self, state):
- self._sort = state > 0
-
-class DataTableBuffers(DataTable):
- def __init__(self, radio, G):
- DataTable.__init__(self,radio,G)
- self.perfTable.setHorizontalHeaderLabels( ["Block Name", "Percent
Buffer Full"] );
-
- def update(self):
- nodes = self.G.nodes();
-
- # get buffer fullness for all blocks
- kl = map(lambda x: "%s::%soutput %% full" % \
- (x, self._statistics_table[self._statistic]),
- nodes);
- buf_knobs = self.radio.get(kl)
-
- # strip values out of ctrlport response
- buffer_fullness = dict(zip(
- map(lambda x: x.split("::")[0], buf_knobs.keys()),
- map(lambda x: x.value, buf_knobs.values())))
-
- blockport_fullness = {}
- for blk in buffer_fullness:
- for port in range(0,len(buffer_fullness[blk])):
- blockport_fullness["%s:%d"%(blk,port)] =
buffer_fullness[blk][port];
-
- self.table_update(blockport_fullness);
-
- if(self._sort):
- sorted_fullness = sorted(blockport_fullness.iteritems(),
key=operator.itemgetter(1))
- self._keymap = map(operator.itemgetter(0), sorted_fullness)
- else:
- if self._keymap:
- sorted_fullness = len(self._keymap)*['',]
- for b in blockport_fullness:
- sorted_fullness[self._keymap.index(b)] = (b,
blockport_fullness[b])
- else:
- sorted_fullness = blockport_fullness.items()
-
- self.sp.clear();
- plt.figure(self.f.number)
- plt.subplot(111);
- self.sp.bar(range(0,len(sorted_fullness)), map(lambda x: x[1],
sorted_fullness),
- alpha=0.5)
- self.sp.set_ylabel("% Buffers Full");
- self.sp.set_xticks( map(lambda x: x+0.5,
range(0,len(sorted_fullness))))
- self.sp.set_xticklabels( map(lambda x: " " + x, map(lambda x: x[0],
sorted_fullness)),
- rotation="vertical",
verticalalignment="bottom" )
- self.canvas.draw();
- self.canvas.show();
-
-class DataTableRuntimes(DataTable):
- def __init__(self, radio, G):
- DataTable.__init__(self,radio,G)
- #self.perfTable.setRowCount(len( self.G.nodes() ))
-
- def update(self):
- nodes = self.G.nodes();
-
- # get work time for all blocks
- kl = map(lambda x: "%s::%swork time" % \
- (x, self._statistics_table[self._statistic]),
- nodes);
- wrk_knobs = self.radio.get(kl)
-
- # strip values out of ctrlport response
- total_work = sum(map(lambda x: x.value, wrk_knobs.values()))
- if(total_work == 0):
- total_work = 1
- work_times = dict(zip(
- map(lambda x: x.split("::")[0], wrk_knobs.keys()),
- map(lambda x: x.value/total_work, wrk_knobs.values())))
-
- # update table view
- self.table_update(work_times)
-
- if(self._sort):
- sorted_work = sorted(work_times.iteritems(),
key=operator.itemgetter(1))
- self._keymap = map(operator.itemgetter(0), sorted_work)
- else:
- if self._keymap:
- sorted_work = len(self._keymap)*['',]
- for b in work_times:
- sorted_work[self._keymap.index(b)] = (b, work_times[b])
- else:
- sorted_work = work_times.items()
-
- self.sp.clear();
- plt.figure(self.f.number)
- plt.subplot(111);
- self.sp.bar(range(0,len(sorted_work)), map(lambda x: x[1],
sorted_work),
- alpha=0.5)
- self.sp.set_ylabel("% Runtime");
- self.sp.set_xticks( map(lambda x: x+0.5, range(0,len(sorted_work))))
- self.sp.set_xticklabels( map(lambda x: " " + x[0], sorted_work),
- rotation="vertical",
verticalalignment="bottom" )
-
- self.canvas.draw();
- self.canvas.show();
-
-class MForm(QtGui.QWidget):
- def update(self):
- try:
- try:
- # update current clock type
- self.prevent_clock_change = True;
- kl1 = None;
- if(self.clockKey == None):
- kl1 = self.radio.getRe([".*perfcounter_clock"])
- else:
- kl1 = self.radio.get([self.clockKey]);
- self.clockKey = kl1.keys()[0];
- self.currClock = kl1[self.clockKey].value;
- self.clockSelIdx = self.clocks.values().index(self.currClock);
- self.clockSel.setCurrentIndex(self.clockSelIdx);
- self.prevent_clock_change = False;
- except:
- print "WARNING: Failed to get current clock setting!"
-
- nodes_stream = self.G_stream.nodes();
- nodes_msg = self.G_msg.nodes();
-
- # get current buffer depths of all output buffers
- kl = map(lambda x: "%s::%soutput %% full" % \
- (x, self._statistics_table[self._statistic]),
- nodes_stream);
-
- st = time.time()
- buf_knobs = self.radio.get(kl)
- td1 = time.time() - st;
-
- # strip values out of ctrlport response
- buf_vals = dict(zip(
- map(lambda x: x.split("::")[0], buf_knobs.keys()),
- map(lambda x: x.value, buf_knobs.values())))
-
- # get work time for all blocks
- kl = map(lambda x: "%s::%swork time" % \
- (x, self._statistics_table[self._statistic]),
- nodes_stream);
- st = time.time()
- wrk_knobs = self.radio.get(kl)
- td2 = time.time() - st;
-
- # strip values out of ctrlport response
- total_work = sum(map(lambda x: x.value, wrk_knobs.values()))
- if(total_work == 0):
- total_work = 1
- work_times = dict(zip(
- map(lambda x: x.split("::")[0], wrk_knobs.keys()),
- map(lambda x: x.value/total_work, wrk_knobs.values())))
- work_times_padded = dict(zip(
- self.G.nodes(),
- [0.1]*len(self.G.nodes())))
- work_times_padded.update(work_times)
-
- for n in nodes_stream:
- # ne is the list of edges away from this node!
- ne = self.G.edges([n],True);
- #for e in ne: # iterate over edges from this block
- for e in ne: # iterate over edges from this block
- # get the right output buffer/port weight for each edge
- sourceport = e[2]["sourceport"];
- if(e[2]["type"] == "stream"):
- newweight = buf_vals[n][sourceport]
- e[2]["weight"] = newweight;
-
- for n in nodes_msg:
- ne = self.G.edges([n],True);
- for e in ne: # iterate over edges from this block
- sourceport = e[2]["sourceport"];
- if(e[2]["type"] == "msg"):
- #newweight = buf_vals[n][sourceport]
- newweight = 0.01;
- e[2]["weight"] = newweight;
-
- # set updated weights
- #self.node_weights = map(lambda x: 20+2000*work_times[x],
nodes_stream);
- self.node_weights = map(lambda x: 20+2000*work_times_padded[x],
self.G.nodes());
- self.edge_weights = map(lambda x: 100.0*x[2]["weight"],
self.G.edges(data=True));
-
- # draw graph updates
- self.updateGraph();
-
- latency = td1 + td2;
- self.parent.statusBar().showMessage("Current GNU Radio Control
Port Query Latency: %f ms"%\
- (latency*1000))
-
- except Exception, e:
- sys.stderr.write("ctrlport-monitor: radio.get threw exception
({0}).\n".format(e))
- if(type(self.parent) is MAINWindow):
- # Find window of connection
- remove = []
- for p in self.parent.mdiArea.subWindowList():
- if self.parent.conns[self.uid] == p.widget():
- remove.append(p)
-
- # Remove subwindows for connection and plots
- for r in remove:
- self.parent.mdiArea.removeSubWindow(r)
-
- # Clean up self
- self.close()
- else:
- sys.exit(1)
- return
-
- def rtt(self):
- self.parent.newSubWindow( DataTableRuntimes(self.radio,
self.G_stream), "Runtime Table" );
-
- def bpt(self):
- self.parent.newSubWindow( DataTableBuffers(self.radio,
self.G_stream), "Buffers Table" );
-
- def resetPCs(self):
- knob = GNURadio.KnobB()
- knob.value = False
- km = {}
- for b in self.blocks_list:
- km[b + "::reset_perf_counters"] = knob
- k = self.radio.set(km)
-
- def toggleFlowgraph(self):
- if self.pauseFGAct.isChecked():
- self.pauseFlowgraph()
- else:
- self.unpauseFlowgraph()
-
- def pauseFlowgraph(self):
- knob = GNURadio.KnobB()
- knob.value = False
- km = {}
- km[self.top_block + "::lock"] = knob
- km[self.top_block + "::stop"] = knob
- k = self.radio.set(km)
-
- def unpauseFlowgraph(self):
- knob = GNURadio.KnobB()
- knob.value = False
- km = {}
- km[self.top_block + "::unlock"] = knob
- k = self.radio.set(km)
-
- def stat_changed(self, index):
- self._statistic = str(self.stattype.currentText())
-
- def update_clock(self, clkidx):
- if(self.prevent_clock_change):
- return;
- idx = self.clockSel.currentIndex();
- clk = self.clocks.values()[idx]
-# print "UPDATE CLOCK!!! %d -> %d"%(idx,clk);
- k = self.radio.get([self.clockKey]);
- k[self.clockKey].value = clk;
- km = {};
- km[self.clockKey] = k[self.clockKey];
- self.radio.set(km);
-
- def __init__(self, radio=None, port=None, uid=0, parent=None):
-
- super(MForm, self).__init__()
-
- if(radio == None or port == None):
- askinfo = ConInfoDialog(self);
- if askinfo.exec_():
- host = str(askinfo.host.text());
- port = str(askinfo.port.text());
- radio = parent.interface.getRadio(host, port)
- else:
- self.radio = None
- return
-
-
- self.uid = uid
- self.parent = parent
-
- self.layoutTop = QtGui.QVBoxLayout(self)
- self.ctlBox = QtGui.QHBoxLayout();
- self.layout = QtGui.QHBoxLayout()
-
- self.layoutTop.addLayout(self.ctlBox);
- self.layoutTop.addLayout(self.layout);
-
- self.rttAct = QtGui.QAction("Runtime Table",
- self, statusTip="Runtime Table", triggered=self.rtt)
- self.rttBut = Qt.QToolButton()
- self.rttBut.setDefaultAction(self.rttAct);
- self.ctlBox.addWidget(self.rttBut);
-
- self.bptAct = QtGui.QAction("Buffer Table",
- self, statusTip="Buffer Table", triggered=self.bpt)
- self.bptBut = Qt.QToolButton()
- self.bptBut.setDefaultAction(self.bptAct);
- self.ctlBox.addWidget(self.bptBut);
-
- self.resetPCsAct = QtGui.QAction("Reset", self,
- statusTip="Reset all Performance Counters",
- triggered=self.resetPCs)
- self.resetPCsBut = Qt.QToolButton()
- self.resetPCsBut.setDefaultAction(self.resetPCsAct);
- self.ctlBox.addWidget(self.resetPCsBut);
-
- self.pauseFGAct = QtGui.QAction("Pause", self,
- statusTip="Pause the Flowgraph",
- triggered=self.toggleFlowgraph)
- self.pauseFGAct.setCheckable(True)
- self.pauseFGBut = Qt.QToolButton()
- self.pauseFGBut.setDefaultAction(self.pauseFGAct);
- self.ctlBox.addWidget(self.pauseFGBut);
-
- self.prevent_clock_change = True;
- self.clockKey = None;
- self.clocks = {"MONOTONIC":1, "THREAD":3};
- self.clockSel = QtGui.QComboBox(self);
- map(lambda x: self.clockSel.addItem(x), self.clocks.keys());
- self.ctlBox.addWidget(self.clockSel);
- self.clockSel.currentIndexChanged.connect(self.update_clock);
- self.prevent_clock_change = False;
-
- self._statistic = "Instantaneous"
- self._statistics_table = {"Instantaneous": "",
- "Average": "avg ",
- "Variance": "var "}
- self.stattype = QtGui.QComboBox()
- self.stattype.addItem("Instantaneous")
- self.stattype.addItem("Average")
- self.stattype.addItem("Variance")
- self.stattype.setMaximumWidth(200)
- self.ctlBox.addWidget(self.stattype);
- self.stattype.currentIndexChanged.connect(self.stat_changed)
-
-# self.setLayout(self.layout);
-
- self.radio = radio
- self.knobprops = self.radio.properties([])
- self.parent.knobprops.append(self.knobprops)
-
- self.timer = QtCore.QTimer()
- self.constupdatediv = 0
- self.tableupdatediv = 0
- plotsize=250
-
-
- # Set up the graph of blocks
- input_name = lambda x: x+"::avg input % full"
- output_name = lambda x: x+"::avg output % full"
- wtime_name = lambda x: x+"::avg work time"
- nout_name = lambda x: x+"::avg noutput_items"
- nprod_name = lambda x: x+"::avg nproduced"
-
- tmplist = []
- knobs = self.radio.get([])
- edgelist = None
- msgedgelist = None
- for k in knobs:
- propname = k.split("::")
- blockname = propname[0]
- keyname = propname[1]
- if(keyname == "edge list"):
- edgelist = knobs[k].value
- self.top_block = blockname
- elif(keyname == "msg edges list"):
- msgedgelist = knobs[k].value
- elif(blockname not in tmplist):
- # only take gr_blocks (no hier_block2)
- if(knobs.has_key(input_name(blockname))):
- tmplist.append(blockname)
-
-
- if not edgelist:
- sys.stderr.write("Could not find list of edges from flowgraph. " +
\
- "Make sure the option 'edges_list' is enabled
" + \
- "in the ControlPort configuration.\n\n")
- sys.exit(1)
-
- self.blocks_list = tmplist
- edges = edgelist.split("\n")[0:-1]
- msgedges = msgedgelist.split("\n")[0:-1]
-
- edgepairs_stream = [];
- edgepairs_msg = [];
-
- # add stream connections
- for e in edges:
- _e = e.split("->")
- edgepairs_stream.append( (_e[0].split(":")[0], _e[1].split(":")[0],
- {"type":"stream",
"sourceport":int(_e[0].split(":")[1])}) );
-
- # add msg connections
- for e in msgedges:
- _e = e.split("->")
- edgepairs_msg.append( (_e[0].split(":")[0], _e[1].split(":")[0],
- {"type":"msg",
"sourceport":_e[0].split(":")[1]}) );
-
- self.G = nx.MultiDiGraph();
- self.G_stream = nx.MultiDiGraph();
- self.G_msg = nx.MultiDiGraph();
-
- self.G.add_edges_from(edgepairs_stream);
- self.G.add_edges_from(edgepairs_msg);
-
- self.G_stream.add_edges_from(edgepairs_stream);
- self.G_msg.add_edges_from(edgepairs_msg);
-
- n_edges = self.G.edges(data=True);
- for e in n_edges:
- e[2]["weight"] = 5+random.random()*10;
-
- self.G.clear();
- self.G.add_edges_from(n_edges);
-
-
- self.f = plt.figure(figsize=(10,8), dpi=90)
- self.sp = self.f.add_subplot(111);
- self.sp.autoscale_view(True,True,True);
- self.sp.set_autoscale_on(True)
-
- self.canvas = FigureCanvas(self.f)
- self.layout.addWidget(self.canvas);
-
- self.pos = nx.graphviz_layout(self.G);
- #self.pos = nx.pygraphviz_layout(self.G);
- #self.pos = nx.spectral_layout(self.G);
- #self.pos = nx.circular_layout(self.G);
- #self.pos = nx.shell_layout(self.G);
- #self.pos = nx.spring_layout(self.G);
-
- # generate weights and plot
- self.update();
-
- # set up timer
- self.timer = QtCore.QTimer()
- self.connect(self.timer, QtCore.SIGNAL('timeout()'), self.update)
- self.timer.start(1000)
-
- # Set up mouse callback functions to move blocks around.
- self._grabbed = False
- self._current_block = ''
- self.f.canvas.mpl_connect('button_press_event',
- self.button_press)
- self.f.canvas.mpl_connect('motion_notify_event',
- self.mouse_move)
- self.f.canvas.mpl_connect('button_release_event',
- self.button_release)
-
- def button_press(self, event):
- x, y = event.xdata, event.ydata
- thrsh = 100
-
- if(x is not None and y is not None):
- nearby = map(lambda z: math.sqrt( math.pow(x-z[0],2) +
math.pow(y-z[1],2)), self.pos.values())
- i = nearby.index(min(nearby))
- if(abs(self.pos.values()[i][0] - x) < thrsh and
- abs(self.pos.values()[i][1]-y) < thrsh):
- self._current_block = self.pos.keys()[i]
- #print "MOVING BLOCK: ", self._current_block
- #print "CUR POS: ", self.pos.values()[i]
- self._grabbed = True
-
- def mouse_move(self, event):
- if self._grabbed:
- x, y = event.xdata, event.ydata
- if(x is not None and y is not None):
- #print "NEW POS: ", (x,y)
- self.pos[self._current_block] = (x,y)
- self.updateGraph();
-
- def button_release(self, event):
- self._grabbed = False
-
-
- def openMenu(self, pos):
- index = self.table.treeWidget.selectedIndexes()
- item = self.table.treeWidget.itemFromIndex(index[0])
- itemname = str(item.text(0))
- self.parent.propertiesMenu(itemname, self.radio, self.uid)
-
- def updateGraph(self):
-
- self.canvas.updateGeometry()
- self.sp.clear();
- plt.figure(self.f.number)
- plt.subplot(111);
- nx.draw(self.G, self.pos,
- edge_color=self.edge_weights,
- node_color='#A0CBE2',
- width=map(lambda x: 3+math.log(x), self.edge_weights),
- node_shape="s",
- node_size=self.node_weights,
- #edge_cmap=plt.cm.Blues,
- edge_cmap=plt.cm.Reds,
- ax=self.sp,
- arrows=False
- )
- nx.draw_networkx_labels(self.G, self.pos,
- font_size=12)
-
- self.canvas.draw();
- self.canvas.show();
-
-class MyClient(IceRadioClient):
- def __init__(self):
- IceRadioClient.__init__(self, MAINWindow)
-
-sys.exit(MyClient().main(sys.argv))
diff --git a/gnuradio-runtime/swig/CMakeLists.txt
b/gnuradio-runtime/swig/CMakeLists.txt
index 06ccc75..ca9ddd4 100644
--- a/gnuradio-runtime/swig/CMakeLists.txt
+++ b/gnuradio-runtime/swig/CMakeLists.txt
@@ -70,8 +70,6 @@ endif(ENABLE_GR_LOG)
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS -DGR_CTRLPORT)
- list(APPEND GR_SWIG_LIBRARIES ${ICE_LIBRARIES})
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/runtime_swig_doc.i)
diff --git a/gr-analog/lib/CMakeLists.txt b/gr-analog/lib/CMakeLists.txt
index 34a852f..8376cbf 100644
--- a/gr-analog/lib/CMakeLists.txt
+++ b/gr-analog/lib/CMakeLists.txt
@@ -37,7 +37,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-analog/swig/CMakeLists.txt b/gr-analog/swig/CMakeLists.txt
index 06f1cdf..38fef3a 100644
--- a/gr-analog/swig/CMakeLists.txt
+++ b/gr-analog/swig/CMakeLists.txt
@@ -34,7 +34,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/analog_swig_doc.i)
diff --git a/gr-atsc/swig/CMakeLists.txt b/gr-atsc/swig/CMakeLists.txt
index 2eb7047..8d02a00 100644
--- a/gr-atsc/swig/CMakeLists.txt
+++ b/gr-atsc/swig/CMakeLists.txt
@@ -35,7 +35,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/atsc_swig_doc.i)
diff --git a/gr-audio/lib/CMakeLists.txt b/gr-audio/lib/CMakeLists.txt
index 2ae7c41..e9e2de8 100644
--- a/gr-audio/lib/CMakeLists.txt
+++ b/gr-audio/lib/CMakeLists.txt
@@ -37,7 +37,6 @@ list(APPEND gr_audio_confs
${CMAKE_CURRENT_SOURCE_DIR}/gr-audio.conf)
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
index bc49f4a..f9dabfd 100644
--- a/gr-audio/swig/CMakeLists.txt
+++ b/gr-audio/swig/CMakeLists.txt
@@ -31,7 +31,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/audio_swig_doc.i)
@@ -54,4 +53,3 @@ install(
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
COMPONENT "audio_swig"
)
-
diff --git a/gr-blocks/grc/CMakeLists.txt b/gr-blocks/grc/CMakeLists.txt
index 9d38e3d..96a715a 100644
--- a/gr-blocks/grc/CMakeLists.txt
+++ b/gr-blocks/grc/CMakeLists.txt
@@ -23,8 +23,6 @@ file(GLOB xml_files "*.xml")
# Force out the controlport GRC blocks if we've disabled it.
if(NOT ENABLE_GR_CTRLPORT)
list(REMOVE_ITEM xml_files
- ${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_viewer.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/blocks_ctrlport_performance.xml
${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe_c.xml
${CMAKE_CURRENT_SOURCE_DIR}/ctrlport_probe2_c.xml
)
diff --git a/gr-blocks/grc/blocks_block_tree.xml
b/gr-blocks/grc/blocks_block_tree.xml
index b0d7ff0..78f615b 100644
--- a/gr-blocks/grc/blocks_block_tree.xml
+++ b/gr-blocks/grc/blocks_block_tree.xml
@@ -51,8 +51,6 @@
</cat>
<cat>
<name>Control Port</name>
- <block>blocks_ctrlport_monitor</block>
- <block>blocks_ctrlport_monitor_performance</block>
<block>blocks_ctrlport_probe2_x</block>
<block>blocks_ctrlport_probe2_c</block>
<block>blocks_ctrlport_probe_c</block>
diff --git a/gr-blocks/grc/blocks_ctrlport_performance.xml
b/gr-blocks/grc/blocks_ctrlport_performance.xml
deleted file mode 100644
index ae0fb91..0000000
--- a/gr-blocks/grc/blocks_ctrlport_performance.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Copyright 2012 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.
--->
-
-<block>
- <name>CtrlPort Performance Monitor</name>
- <key>blocks_ctrlport_monitor_performance</key>
- <import>from gnuradio.ctrlport.monitor import *</import>
- <make>not $en or monitor("gr-perf-monitorx")</make>
- <param>
- <name>Enabled</name>
- <key>en</key>
- <value></value>
- <type>enum</type>
- <option>
- <name>True</name>
- <key>True</key>
- </option>
- <option>
- <name>False</name>
- <key>False</key>
- </option>
- </param>
-
- <doc>
- Place this in a graph to launch a QtPy GR CtrlPort Performance Monitor app.
- </doc>
-
-</block>
-
diff --git a/gr-blocks/grc/blocks_ctrlport_viewer.xml
b/gr-blocks/grc/blocks_ctrlport_viewer.xml
deleted file mode 100644
index 2b69ae0..0000000
--- a/gr-blocks/grc/blocks_ctrlport_viewer.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Copyright 2012 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.
--->
-
-<block>
- <name>CtrlPort Monitor</name>
- <key>blocks_ctrlport_monitor</key>
- <import>from gnuradio.ctrlport.monitor import *</import>
- <make>not $en or monitor()</make>
- <param>
- <name>Enabled</name>
- <key>en</key>
- <value></value>
- <type>enum</type>
- <option>
- <name>True</name>
- <key>True</key>
- </option>
- <option>
- <name>False</name>
- <key>False</key>
- </option>
- </param>
-
- <doc>
- Place this in a graph to launch a QtPy GR CtrlPort Monitor app.
- </doc>
-
-</block>
-
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index 7702e4b..d1fad2e 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -137,7 +137,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding.py
b/gr-blocks/python/blocks/qa_cpp_py_binding.py
deleted file mode 100755
index 35e073d..0000000
--- a/gr-blocks/python/blocks/qa_cpp_py_binding.py
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012,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.
-#
-
-#
-# This program tests mixed python and c++ ctrlport exports in a single app
-#
-
-import Ice
-import sys, time, random, numpy
-from gnuradio import gr, gr_unittest, blocks
-
-from gnuradio.ctrlport import GNURadio
-from gnuradio import ctrlport
-import os
-
-def get1():
- return "success"
-
-def get2():
- return "failure"
-
-class inc_class:
- def __init__(self):
- self.val = 1
- def pp(self):
- self.val = self.val+1
- return self.val
-
-get3 = inc_class()
-
-def get4():
- random.seed(0)
- rv = random.random()
- return rv
-
-def get5():
- numpy.random.seed(0)
- samp_t = numpy.random.randn(24)+1j*numpy.random.randn(24);
- samp_f = numpy.fft.fft(samp_t);
- log_pow_f = 20*numpy.log10(numpy.abs(samp_f))
- rv = list(log_pow_f)
- return rv;
-
-def get6():
- numpy.random.seed(0)
- samp_t = numpy.random.randn(1024)+1j*numpy.random.randn(1024);
- rv = list(samp_t)
- return rv;
-
-class test_cpp_py_binding(gr_unittest.TestCase):
-
- def setUp(self):
- self.tb = gr.top_block()
- os.environ['GR_CONF_CONTROLPORT_ON'] = 'True'
-
- def tearDown(self):
- self.tb = None
-
- def test_001(self):
- v1 = gr.RPC_get_string("pyland", "v1", "unit_1_string",
- "Python Exported String", "", "", "",
- gr.DISPNULL)
- v1.activate(get1)
-
- v2 = gr.RPC_get_string("pyland", "v2", "unit_2_string",
- "Python Exported String", "", "", "",
- gr.DISPNULL)
- v2.activate(get2)
-
- v3 = gr.RPC_get_int("pyland", "v3", "unit_3_int",
- "Python Exported Int", 0, 100, 1,
- gr.DISPNULL)
- v3.activate(get3.pp)
-
- v4 = gr.RPC_get_double("pyland", "time", "unit_4_time_double",
- "Python Exported Double", 0, 1000, 1,
- gr.DISPNULL)
- v4.activate(get4)
-
- v5 = gr.RPC_get_vector_float("pyland", "fvec", "unit_5_float_vector",
- "Python Exported Float Vector", [], [],
[],
- gr.DISPTIME | gr.DISPOPTCPLX)
- v5.activate(get5)
-
- v6 = gr.RPC_get_vector_gr_complex("pyland", "cvec",
"unit_6_gr_complex_vector",
- "Python Exported Complex Vector",
[], [], [],
- gr.DISPXY | gr.DISPOPTSCATTER)
- v6.activate(get6)
-
- # print some variables locally
- val = get1()
- rval = v1.get()
- self.assertEqual(val, rval)
-
- val = get2()
- rval = v2.get()
- self.assertEqual(val, rval)
-
- val = get3.pp()
- rval = v3.get()
- self.assertEqual(val+1, rval)
-
- val = get4()
- rval = v4.get()
- self.assertEqual(val, rval)
-
- val = get5()
- rval = v5.get()
- self.assertComplexTuplesAlmostEqual(val, rval, 5)
-
- val = get6()
- rval = v6.get()
- self.assertComplexTuplesAlmostEqual(val, rval, 5)
-
- def test_002(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_c(data)
- self.p1 = blocks.ctrlport_probe_c("aaa","C++ exported variable")
- self.p2 = blocks.ctrlport_probe_c("bbb","C++ exported variable")
- probe_name = self.p2.alias()
-
- self.tb.connect(self.src, self.p1)
- self.tb.connect(self.src, self.p2)
- self.tb.start()
-
- # Probes return complex values as list of floats with re, im
- # Imaginary parts of this data set are 0.
- expected_result = [1, 0, 2, 0, 3, 0, 4, 0,
- 5, 0, 6, 0, 7, 0, 8, 0]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::bbb"])
- for name in ret.keys():
- result = ret[name].value
- self.assertEqual(result, expected_result)
-
- self.tb.stop()
-
-if __name__ == '__main__':
- gr_unittest.run(test_cpp_py_binding, "test_cpp_py_binding.xml")
-
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
deleted file mode 100755
index 69ed6d1..0000000
--- a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2012,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.
-#
-
-#
-# This program tests mixed python and c++ GRCP sets in a single app
-#
-
-import Ice
-import sys, time, random, numpy
-from gnuradio import gr, gr_unittest, blocks
-
-from gnuradio.ctrlport import GNURadio
-from gnuradio import ctrlport
-import os
-
-class inc_class:
- def __init__(self,val):
- self.val = val;
-
- def _get(self):
- #print "returning get (val = %s)"%(str(self.val));
- return self.val;
-
- def _set(self,val):
- #print "updating val to %s"%(str(val));
- self.val = val;
- return;
-
-getset1 = inc_class(10);
-getset2 = inc_class(100.0);
-getset3 = inc_class("test");
-
-class test_cpp_py_binding_set(gr_unittest.TestCase):
- def setUp(self):
- self.tb = gr.top_block()
- os.environ['GR_CONF_CONTROLPORT_ON'] = 'True'
-
- def tearDown(self):
- self.tb = None
-
- def test_001(self):
-
- g1 = gr.RPC_get_int("pyland", "v1", "unit_1_int",
- "Python Exported Int", 0, 100, 10,
- gr.DISPNULL)
- g1.activate(getset1._get)
- s1 = gr.RPC_get_int("pyland", "v1", "unit_1_int",
- "Python Exported Int", 0, 100, 10,
- gr.DISPNULL)
- s1.activate(getset1._set)
- time.sleep(0.01)
-
- # test int variables
- getset1._set(21)
- val = getset1._get()
- rval = g1.get()
- self.assertEqual(val, rval)
-
- g2 = gr.RPC_get_float("pyland", "v2", "unit_2_float",
- "Python Exported Float", -100, 1000.0, 100.0,
- gr.DISPNULL)
- g2.activate(getset2._get)
- s2 = gr.RPC_get_float("pyland", "v2", "unit_2_float",
- "Python Exported Float", -100, 1000.0, 100.0,
- gr.DISPNULL)
- s2.activate(getset2._set)
- time.sleep(0.01)
-
- # test float variables
- getset2._set(123.456)
- val = getset2._get()
- rval = g2.get()
- self.assertAlmostEqual(val, rval, 4)
-
- g3 = gr.RPC_get_string("pyland", "v3", "unit_3_string",
- "Python Exported String", "", "", "",
- gr.DISPNULL)
- g3.activate(getset3._get)
- s3 = gr.RPC_get_string("pyland", "v3", "unit_3_string",
- "Python Exported String", "", "", "",
- gr.DISPNULL)
- s3.activate(getset3._set)
- time.sleep(0.01)
-
- # test string variables
- getset3._set("third test")
- val = getset3._get()
- rval = g3.get()
- self.assertEqual(val, rval)
-
-
- def test_002(self):
- data = range(1, 10)
-
- self.src = blocks.vector_source_c(data, True)
- self.p = blocks.nop(gr.sizeof_gr_complex)
- self.p.set_ctrlport_test(0);
- probe_info = self.p.alias()
-
- self.tb.connect(self.src, self.p)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- self.tb.start()
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get all exported knobs
- key_name_test = probe_info+"::test"
- ret = radio.get([key_name_test,])
-
- ret[key_name_test].value = 10
- radio.set({key_name_test: ret[key_name_test]})
-
- ret = radio.get([])
- result_test = ret[key_name_test].value
- self.assertEqual(result_test, 10)
-
- self.tb.stop()
- self.tb.wait()
-
-if __name__ == '__main__':
- gr_unittest.run(test_cpp_py_binding_set, "test_cpp_py_binding_set.xml")
-
diff --git a/gr-blocks/python/blocks/qa_ctrlport_probes.py
b/gr-blocks/python/blocks/qa_ctrlport_probes.py
index b31934f..91d9601 100644
--- a/gr-blocks/python/blocks/qa_ctrlport_probes.py
+++ b/gr-blocks/python/blocks/qa_ctrlport_probes.py
@@ -20,12 +20,9 @@
# Boston, MA 02110-1301, USA.
#
-import Ice
import sys, time, random, numpy
from gnuradio import gr, gr_unittest, blocks
-from gnuradio.ctrlport import GNURadio
-from gnuradio import ctrlport
import os, struct
class test_ctrlport_probes(gr_unittest.TestCase):
@@ -37,193 +34,21 @@ class test_ctrlport_probes(gr_unittest.TestCase):
def tearDown(self):
self.tb = None
- def test_001(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_c(data, True)
- self.probe = blocks.ctrlport_probe2_c("samples","Complex",
- len(data), gr.DISPNULL)
- probe_name = self.probe.alias()
-
- self.tb.connect(self.src, self.probe)
- self.tb.start()
-
- # Probes return complex values as list of floats with re, im
- # Imaginary parts of this data set are 0.
- expected_result = [1, 0, 2, 0, 3, 0, 4, 0,
- 5, 0, 6, 0, 7, 0, 8, 0]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::samples"])
- for name in ret.keys():
- # Get data in probe, which might be offset; find the
- # beginning and unwrap.
- result = ret[name].value
- i = result.index(1.0)
- result = result[i:] + result[0:i]
- self.assertEqual(expected_result, result)
-
- self.tb.stop()
-
+ def xtest_001(self):
+ pass
def test_002(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_f(data, True)
- self.probe = blocks.ctrlport_probe2_f("samples","Floats",
- len(data), gr.DISPNULL)
- probe_name = self.probe.alias()
-
- self.tb.connect(self.src, self.probe)
- self.tb.start()
-
- expected_result = [1, 2, 3, 4, 5, 6, 7, 8,]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::samples"])
- for name in ret.keys():
- # Get data in probe, which might be offset; find the
- # beginning and unwrap.
- result = ret[name].value
- i = result.index(1.0)
- result = result[i:] + result[0:i]
- self.assertEqual(expected_result, result)
-
- self.tb.stop()
+ pass
def test_003(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_i(data, True)
- self.probe = blocks.ctrlport_probe2_i("samples","Integers",
- len(data), gr.DISPNULL)
- probe_name = self.probe.alias()
-
- self.tb.connect(self.src, self.probe)
- self.tb.start()
-
- expected_result = [1, 2, 3, 4, 5, 6, 7, 8,]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::samples"])
- for name in ret.keys():
- # Get data in probe, which might be offset; find the
- # beginning and unwrap.
- result = ret[name].value
- i = result.index(1.0)
- result = result[i:] + result[0:i]
- self.assertEqual(expected_result, result)
-
- self.tb.stop()
-
+ pass
def test_004(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_s(data, True)
- self.probe = blocks.ctrlport_probe2_s("samples","Shorts",
- len(data), gr.DISPNULL)
- probe_name = self.probe.alias()
-
- self.tb.connect(self.src, self.probe)
- self.tb.start()
-
- expected_result = [1, 2, 3, 4, 5, 6, 7, 8,]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::samples"])
- for name in ret.keys():
- # Get data in probe, which might be offset; find the
- # beginning and unwrap.
- result = ret[name].value
- i = result.index(1.0)
- result = result[i:] + result[0:i]
- self.assertEqual(expected_result, result)
-
- self.tb.stop()
+ pass
def test_005(self):
- data = range(1,9)
-
- self.src = blocks.vector_source_b(data, True)
- self.probe = blocks.ctrlport_probe2_b("samples","Bytes",
- len(data), gr.DISPNULL)
- probe_name = self.probe.alias()
-
- self.tb.connect(self.src, self.probe)
- self.tb.start()
-
- expected_result = [1, 2, 3, 4, 5, 6, 7, 8,]
-
- # Make sure we have time for flowgraph to run
- time.sleep(0.1)
-
- # Get available endpoint
- ep = gr.rpcmanager_get().endpoints()[0]
-
- # Initialize a simple Ice client from endpoint
- ic = Ice.initialize(sys.argv)
- base = ic.stringToProxy(ep)
- radio = GNURadio.ControlPortPrx.checkedCast(base)
-
- # Get all exported knobs
- ret = radio.get([probe_name + "::samples"])
- for name in ret.keys():
- # Get data in probe, which might be offset; find the
- # beginning and unwrap.
- result = ret[name].value
- result = list(struct.unpack(len(result)*'b', result))
- i = result.index(1)
- result = result[i:] + result[0:i]
- self.assertEqual(expected_result, result)
-
- self.tb.stop()
+ pass
if __name__ == '__main__':
gr_unittest.run(test_ctrlport_probes, "test_ctrlport_probes.xml")
-
diff --git a/gr-blocks/swig/CMakeLists.txt b/gr-blocks/swig/CMakeLists.txt
index f4c428c..c128a9b 100644
--- a/gr-blocks/swig/CMakeLists.txt
+++ b/gr-blocks/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
configure_file(
diff --git a/gr-channels/lib/CMakeLists.txt b/gr-channels/lib/CMakeLists.txt
index c74e338..390eb63 100644
--- a/gr-channels/lib/CMakeLists.txt
+++ b/gr-channels/lib/CMakeLists.txt
@@ -35,7 +35,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-channels/swig/CMakeLists.txt b/gr-channels/swig/CMakeLists.txt
index 5f5091f..3a85626 100644
--- a/gr-channels/swig/CMakeLists.txt
+++ b/gr-channels/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/channels_swig_doc.i)
diff --git a/gr-comedi/lib/CMakeLists.txt b/gr-comedi/lib/CMakeLists.txt
index 206ddb3..efd1bf7 100644
--- a/gr-comedi/lib/CMakeLists.txt
+++ b/gr-comedi/lib/CMakeLists.txt
@@ -36,7 +36,6 @@ link_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-comedi/swig/CMakeLists.txt b/gr-comedi/swig/CMakeLists.txt
index 0c275cc..b31e4e8 100644
--- a/gr-comedi/swig/CMakeLists.txt
+++ b/gr-comedi/swig/CMakeLists.txt
@@ -31,7 +31,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
# Setup swig docs to depend on includes and pull in from build directory
diff --git a/gr-digital/lib/CMakeLists.txt b/gr-digital/lib/CMakeLists.txt
index 73b8bc3..2c03f6d 100644
--- a/gr-digital/lib/CMakeLists.txt
+++ b/gr-digital/lib/CMakeLists.txt
@@ -38,7 +38,6 @@ link_directories(${LOG4CPP_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-digital/swig/CMakeLists.txt b/gr-digital/swig/CMakeLists.txt
index 3797c65..d87b7e9 100644
--- a/gr-digital/swig/CMakeLists.txt
+++ b/gr-digital/swig/CMakeLists.txt
@@ -35,7 +35,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
# Setup swig docs to depend on includes and pull in from build directory
diff --git a/gr-fcd/lib/CMakeLists.txt b/gr-fcd/lib/CMakeLists.txt
index 9364c3d..cc89679 100644
--- a/gr-fcd/lib/CMakeLists.txt
+++ b/gr-fcd/lib/CMakeLists.txt
@@ -41,7 +41,6 @@ link_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
include_directories(${LOG4CPP_INCLUDE_DIRS})
diff --git a/gr-fcd/swig/CMakeLists.txt b/gr-fcd/swig/CMakeLists.txt
index 48fce65..b91cf92 100644
--- a/gr-fcd/swig/CMakeLists.txt
+++ b/gr-fcd/swig/CMakeLists.txt
@@ -35,7 +35,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fcd_swig_doc.i)
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index 8af27db..40b8299 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -38,7 +38,6 @@ include_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
link_directories(
diff --git a/gr-fec/swig/CMakeLists.txt b/gr-fec/swig/CMakeLists.txt
index d1dc556..fdc5f2f 100644
--- a/gr-fec/swig/CMakeLists.txt
+++ b/gr-fec/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fec_swig_doc.i)
diff --git a/gr-fft/lib/CMakeLists.txt b/gr-fft/lib/CMakeLists.txt
index 51fecbe..c1c58f3 100644
--- a/gr-fft/lib/CMakeLists.txt
+++ b/gr-fft/lib/CMakeLists.txt
@@ -34,7 +34,6 @@ link_directories(${FFTW3F_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-fft/swig/CMakeLists.txt b/gr-fft/swig/CMakeLists.txt
index 476e343..74a4a25 100644
--- a/gr-fft/swig/CMakeLists.txt
+++ b/gr-fft/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/fft_swig_doc.i)
diff --git a/gr-filter/lib/CMakeLists.txt b/gr-filter/lib/CMakeLists.txt
index 17867f8..5f1dd56 100644
--- a/gr-filter/lib/CMakeLists.txt
+++ b/gr-filter/lib/CMakeLists.txt
@@ -108,7 +108,6 @@ link_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-filter/swig/CMakeLists.txt b/gr-filter/swig/CMakeLists.txt
index a35d816..b7bf203 100644
--- a/gr-filter/swig/CMakeLists.txt
+++ b/gr-filter/swig/CMakeLists.txt
@@ -33,7 +33,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
# FIXME: rename to filter_swig_doc.i when gnuradio-runtime is updated
diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt
index 49310ec..ef75789 100644
--- a/gr-noaa/lib/CMakeLists.txt
+++ b/gr-noaa/lib/CMakeLists.txt
@@ -32,7 +32,6 @@ link_directories(${LOG4CPP_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-noaa/swig/CMakeLists.txt b/gr-noaa/swig/CMakeLists.txt
index 3a6db36..8d39b67 100644
--- a/gr-noaa/swig/CMakeLists.txt
+++ b/gr-noaa/swig/CMakeLists.txt
@@ -31,7 +31,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/noaa_swig_doc.i)
diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt
index 7fae2c9..f59d770 100644
--- a/gr-pager/lib/CMakeLists.txt
+++ b/gr-pager/lib/CMakeLists.txt
@@ -29,7 +29,6 @@ include_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
link_directories(${Boost_LIBRARY_DIRS})
diff --git a/gr-pager/swig/CMakeLists.txt b/gr-pager/swig/CMakeLists.txt
index b63c45c..fc71394 100644
--- a/gr-pager/swig/CMakeLists.txt
+++ b/gr-pager/swig/CMakeLists.txt
@@ -31,7 +31,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/pager_swig_doc.i)
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 2dc73a9..22f7bda 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -134,7 +134,6 @@ include_directories(${PYTHON_INCLUDE_PATH}) #deprecated for
dirs (cmake 2.6)
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-qtgui/swig/CMakeLists.txt b/gr-qtgui/swig/CMakeLists.txt
index 5207318..44b5c2f 100644
--- a/gr-qtgui/swig/CMakeLists.txt
+++ b/gr-qtgui/swig/CMakeLists.txt
@@ -38,7 +38,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/qtgui_swig_doc.i)
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index 67a339d..2cc53c6 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -34,7 +34,6 @@ link_directories(${LOG4CXX_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
#######################################################################
diff --git a/gr-trellis/swig/CMakeLists.txt b/gr-trellis/swig/CMakeLists.txt
index 81c3e87..d03d099 100644
--- a/gr-trellis/swig/CMakeLists.txt
+++ b/gr-trellis/swig/CMakeLists.txt
@@ -34,7 +34,6 @@ set(GR_SWIG_LIBRARIES gnuradio-trellis gnuradio-digital)
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
# Setup swig docs to depend on includes and pull in from build directory
diff --git a/gr-uhd/lib/CMakeLists.txt b/gr-uhd/lib/CMakeLists.txt
index 9121dd4..e0a9db8 100644
--- a/gr-uhd/lib/CMakeLists.txt
+++ b/gr-uhd/lib/CMakeLists.txt
@@ -37,7 +37,6 @@ link_directories(
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
include_directories(${LOG4CPP_INCLUDE_DIRS})
diff --git a/gr-uhd/swig/CMakeLists.txt b/gr-uhd/swig/CMakeLists.txt
index 4084bc0..ef54761 100644
--- a/gr-uhd/swig/CMakeLists.txt
+++ b/gr-uhd/swig/CMakeLists.txt
@@ -34,7 +34,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/uhd_swig_doc.i)
diff --git a/gr-video-sdl/lib/CMakeLists.txt b/gr-video-sdl/lib/CMakeLists.txt
index 8c992f9..c431382 100644
--- a/gr-video-sdl/lib/CMakeLists.txt
+++ b/gr-video-sdl/lib/CMakeLists.txt
@@ -33,7 +33,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-video-sdl/swig/CMakeLists.txt b/gr-video-sdl/swig/CMakeLists.txt
index df64cb3..4634374 100644
--- a/gr-video-sdl/swig/CMakeLists.txt
+++ b/gr-video-sdl/swig/CMakeLists.txt
@@ -33,7 +33,6 @@ set(GR_SWIG_LIBRARIES gnuradio-video-sdl)
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
# Setup swig docs to depend on includes and pull in from build directory
diff --git a/gr-vocoder/lib/CMakeLists.txt b/gr-vocoder/lib/CMakeLists.txt
index 61c973b..4c373fd 100644
--- a/gr-vocoder/lib/CMakeLists.txt
+++ b/gr-vocoder/lib/CMakeLists.txt
@@ -88,7 +88,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
include_directories(${LOG4CPP_INCLUDE_DIRS})
diff --git a/gr-vocoder/swig/CMakeLists.txt b/gr-vocoder/swig/CMakeLists.txt
index 2c2a7a6..2662396 100644
--- a/gr-vocoder/swig/CMakeLists.txt
+++ b/gr-vocoder/swig/CMakeLists.txt
@@ -31,7 +31,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/vocoder_swig_doc.i)
diff --git a/gr-wavelet/lib/CMakeLists.txt b/gr-wavelet/lib/CMakeLists.txt
index 99c32aa..4bb85dc 100644
--- a/gr-wavelet/lib/CMakeLists.txt
+++ b/gr-wavelet/lib/CMakeLists.txt
@@ -40,7 +40,6 @@ add_definitions(${GSL_DEFINITIONS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
include_directories(${LOG4CPP_INCLUDE_DIRS})
diff --git a/gr-wavelet/swig/CMakeLists.txt b/gr-wavelet/swig/CMakeLists.txt
index c539898..1f31497 100644
--- a/gr-wavelet/swig/CMakeLists.txt
+++ b/gr-wavelet/swig/CMakeLists.txt
@@ -33,7 +33,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/wavelet_swig_doc.i)
diff --git a/gr-wxgui/lib/CMakeLists.txt b/gr-wxgui/lib/CMakeLists.txt
index 02b2e94..2a263d3 100644
--- a/gr-wxgui/lib/CMakeLists.txt
+++ b/gr-wxgui/lib/CMakeLists.txt
@@ -34,7 +34,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-wxgui/swig/CMakeLists.txt b/gr-wxgui/swig/CMakeLists.txt
index f02f1f1..034036e 100644
--- a/gr-wxgui/swig/CMakeLists.txt
+++ b/gr-wxgui/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/wxgui_swig_doc.i)
diff --git a/gr-zeromq/lib/CMakeLists.txt b/gr-zeromq/lib/CMakeLists.txt
index 07ac36b..952561b 100644
--- a/gr-zeromq/lib/CMakeLists.txt
+++ b/gr-zeromq/lib/CMakeLists.txt
@@ -31,7 +31,6 @@ link_directories(${Boost_LIBRARY_DIRS})
if(ENABLE_GR_CTRLPORT)
ADD_DEFINITIONS(-DGR_CTRLPORT)
- include_directories(${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
########################################################################
diff --git a/gr-zeromq/swig/CMakeLists.txt b/gr-zeromq/swig/CMakeLists.txt
index 529cb0d..5c2aff2 100644
--- a/gr-zeromq/swig/CMakeLists.txt
+++ b/gr-zeromq/swig/CMakeLists.txt
@@ -32,7 +32,6 @@ set(GR_SWIG_INCLUDE_DIRS
if(ENABLE_GR_CTRLPORT)
list(APPEND GR_SWIG_FLAGS "-DGR_CTRLPORT")
- list(APPEND GR_SWIG_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
endif(ENABLE_GR_CTRLPORT)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/zeromq_swig_doc.i)