commit-gnuradio
[Top][All Lists]
Advanced

[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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]