[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 33/50: controlport: more cleanup and conven
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 33/50: controlport: more cleanup and conveniences |
Date: |
Wed, 15 Apr 2015 21:07:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 158b0b462cd7868c1a2e6133a995e996ea4aba86
Author: Tom Rondeau <address@hidden>
Date: Thu Mar 5 19:37:02 2015 -0500
controlport: more cleanup and conveniences
---
gnuradio-runtime/include/gnuradio/thrift_application_base.h | 8 +++-----
gnuradio-runtime/include/gnuradio/thrift_server_template.h | 3 +++
.../lib/controlport/thrift/rpcserver_booter_thrift.cc | 5 +----
gnuradio-runtime/python/gnuradio/ctrlport/monitor.py | 2 +-
4 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/gnuradio-runtime/include/gnuradio/thrift_application_base.h
b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
index b957c5e..65cd83e 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_application_base.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_application_base.h
@@ -103,10 +103,8 @@ template<typename TserverBase, typename TserverClass>
thrift_application_base<TserverBase,
TserverClass>::thrift_application_base(TserverClass* _this)
{
gr::configure_default_loggers(d_logger, d_debug_logger, "controlport");
- GR_LOG_DEBUG(d_debug_logger, "thrift_application_base: ctor");
-
- //std::cerr << "thrift_application_base: ctor" << std::endl;
d_this = _this;
+ //GR_LOG_DEBUG(d_debug_logger, "thrift_application_base: ctor");
}
template<typename TserverBase, typename TserverClass>
@@ -131,9 +129,9 @@ void thrift_application_base<TserverBase,
TserverClass>::kickoff()
::nanosleep(&timer_ts, &rem_ts);
#endif
if(!d_this->application_started())
- std::cout << "@";
+ std::cerr << "@";
if(iter++ > 100) {
- std::cout << "thrift_application_base::kickoff(), timeout waiting to
port number might have failed?!" << std::endl;;
+ std::cerr << "thrift_application_base::kickoff(), timeout waiting to
port number might have failed?" << std::endl;
break;
}
}
diff --git a/gnuradio-runtime/include/gnuradio/thrift_server_template.h
b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
index 1635642..35dbe59 100644
--- a/gnuradio-runtime/include/gnuradio/thrift_server_template.h
+++ b/gnuradio-runtime/include/gnuradio/thrift_server_template.h
@@ -107,6 +107,9 @@ thrift_server_template<TserverBase, TserverClass,
TImplClass, TThriftClass>::thr
gr::prefs::singleton()->add_config_file(thrift_config_file);
}
+ // Collect configuration options from the Thrift config file;
+ // defaults if the config file doesn't exist or list the specific
+ // options.
port = static_cast<unsigned int>(gr::prefs::singleton()->get_long("thrift",
"port",
thrift_application_base<TserverBase,
TImplClass>::d_default_thrift_port));
nthreads = static_cast<unsigned
int>(gr::prefs::singleton()->get_long("thrift", "nthreads",
diff --git a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
index 095db2e..874df5b 100644
--- a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
+++ b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc
@@ -96,10 +96,7 @@ void thrift_application_base<TserverBase,
TserverClass>::start_thrift()
// main(0, argv);
//}
- //std::cerr << "thrift_application_base: start_thrift" << std::endl;
- GR_LOG_DEBUG(d_debug_logger, "thrift_application_base: start server");
d_thriftserver->serve();
- GR_LOG_DEBUG(d_debug_logger, "thrift_application_base: server started");
}
@@ -125,7 +122,7 @@ bool thrift_application_base<TserverBase,
TserverClass>::application_started()
//std::cout << "Thrift endpoint: " << endpoint << " boost hostname: " <<
boost_hostname << std::endl;
set_endpoint(endpoint);
- GR_LOG_INFO(logger, "Apache Thrift: " + endpoint);
+ GR_LOG_INFO(d_logger, "Apache Thrift: " + endpoint);
d_is_running = true;
result = true;
}
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
index 712137f..f651be2 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py
@@ -48,7 +48,7 @@ class monitor:
print "monitor::endpoints() = %s" % (gr.rpcmanager_get().endpoints())
try:
cmd = map(lambda a: [self.tool,
- re.search("\d+\.\d+\.\d+\.\d+",a).group(0),
+ re.search("-h
(\S+|\d+\.\d+\.\d+\.\d+)",a).group(1),
re.search("-p (\d+)",a).group(1)],
gr.rpcmanager_get().endpoints())[0]
print "running: %s"%(str(cmd))
- [Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift., (continued)
- [Commit-gnuradio] [gnuradio] 34/50: controlport: replacement of nanosleep() with boost::sleep() in startup thread. Fix of merge error in booter_thrift., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 28/50: controlport: more cleaning up., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 31/50: controlport: moving the logger call that publishes Thrift's endpoint to i_impl()., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 24/50: controlport: adding performance and controlport monitor GRC blocks., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 29/50: controlport: changing the default port number on the Thrift interface to zero., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 21/50: controlport: Adds ability to configure Thrift through a config file, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 30/50: controlport: ephemeral / unused port number selection by OS working., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 13/50: controlport: using threaded server for multiple connections., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 39/50: controlport: documentation cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 35/50: controlport: cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 33/50: controlport: more cleanup and conveniences,
git <=
- [Commit-gnuradio] [gnuradio] 11/50: controlport: more work on the translation layer; properties and setting parameters in gr-ctrlport-monitor now working., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 45/50: controlport: ensure proper ctrlport shutdown., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 08/50: controlport: adding abstraction layer for the controlport backends; support thrift currently., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 25/50: controlport: fixing up some issues; generate thrift sources into thrift subdir., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 16/50: controlport: switching rpcpmtconverter::to_pmt() to To_PMT singleton, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 40/50: controlport: documentation cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 10/50: controlport: more cleanup of python code to help generalize the interface, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 38/50: controlport: cleanup, git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 41/50: controlport: cmake fixes to FindThrift for when thrift is not installed., git, 2015/04/16
- [Commit-gnuradio] [gnuradio] 43/50: controlport: more documentation and linking info., git, 2015/04/16