23 #include "eclipse_debugger.h" 25 #include <utils/system/argparser.h> 26 #include <blackboard/remote.h> 27 #include <netcomm/fawkes/client.h> 29 #include <gui_utils/logview.h> 30 #include <gui_utils/service_chooser_dialog.h> 31 #include <gui_utils/interface_dispatcher.h> 53 const Glib::RefPtr<Gtk::Builder> &builder)
57 connection_dispatcher.signal_connected().connect(sigc::mem_fun(*
this, &EclipseDebugger::on_connect));
58 connection_dispatcher.signal_disconnected().connect(sigc::mem_fun(*
this, &EclipseDebugger::on_disconnect));
60 establish_connection();
70 EclipseDebugger::establish_connection()
72 if ( ! connection_dispatcher.get_client()->connected() ) {
76 connection_dispatcher.get_client()->disconnect();
82 EclipseDebugger::on_connect()
89 __debugger_if->msgq_enqueue(cm);
91 __debugger_if->read();
92 char* host = __debugger_if->host();
93 unsigned int port = __debugger_if->port();
94 std::stringstream portstr;
96 execlp(
"tktools-clp",
"tktools-clp",
"-h", host,
"-p", portstr.str().c_str(), (
char *) 0);
100 Glib::ustring message = *(e.
begin());
101 Gtk::MessageDialog md(*
this, message,
false,
102 Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK,
104 md.set_title(
"BlackBoard connection failed");
108 connection_dispatcher.get_client()->disconnect();
115 EclipseDebugger::on_disconnect()
122 EclipseDebugger::close_bb()
Fawkes library namespace.
EclipseDebugger(BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder)
Constructor.
Base class for exceptions in Fawkes.
EclipseDebuggerInterface Fawkes BlackBoard Interface.
void run_and_connect()
Run dialog and try to connect.
iterator begin()
Get iterator for messages.
ConnectionMessage Fawkes BlackBoard Interface Message.
~EclipseDebugger()
Destructor.
virtual Interface * open_for_reading(const char *interface_type, const char *identifier, const char *owner=NULL)
Open interface for reading.