28 #include <Ice/Communicator.h>
29 #include <Ice/Endpoint.h>
37 widget.finderLayout->addWidget(finder);
40 widget.pushButtonFinder, SIGNAL(clicked()),
this, SLOT(on_pushButtonFinder_clicked()));
42 widget.pushButtonString, SIGNAL(clicked()),
this, SLOT(on_pushButtonString_clicked()));
56 std::string
str{
"-----"};
59 str = prx->ice_getAdapterId();
61 catch (Ice::Exception& e)
63 ARMARX_ERROR <<
"Error while reading data for the current proxy "
64 "(ice_getAdapterId):\n what:\n"
67 widget.labelAdapterId->setText(QString::fromStdString(
str));
70 std::string
str{
"-----"};
73 str = prx->ice_toString();
75 catch (Ice::Exception& e)
78 <<
"Error while reading data for the current proxy (ice_toString):\n what:\n"
81 widget.labelAsString->setText(QString::fromStdString(
str));
84 std::string
str{
"-----"};
87 str = prx->ice_getIdentity().category +
" / " + prx->ice_getIdentity().name;
89 catch (Ice::Exception& e)
92 <<
"Error while reading data for the current proxy (ice_getIdentity):\n what:\n"
95 widget.labelIdentity->setText(QString::fromStdString(
str));
98 std::string
str{
"-----"};
101 std::stringstream ssend;
102 auto ends = prx->ice_getEndpoints();
103 for (
const auto& end : ends)
105 ssend << end->toString() <<
"\n";
112 catch (Ice::Exception& e)
114 ARMARX_ERROR <<
"Error while reading data for the current proxy "
115 "(ice_getEndpoints):\n what:\n"
118 widget.labelEndpoints->setText(QString::fromStdString(
str));
121 std::string
str{
"-----"};
124 std::stringstream ssctx;
125 auto ctxs = prx->ice_getContext();
126 for (
const auto& ctx : ctxs)
128 ssctx << ctx.first <<
"\t" << ctx.second <<
"\n";
135 catch (Ice::Exception& e)
138 <<
"Error while reading data for the current proxy (ice_getContext):\n what:\n"
141 widget.labelContext->setText(QString::fromStdString(
str));
144 std::string
str{
"-----"};
147 std::stringstream ssids;
148 auto ids = prx->ice_ids();
149 for (
const auto&
id : ids)
158 catch (Ice::Exception& e)
161 <<
"Error while reading data for the current proxy (ice_ids):\n what:\n"
164 widget.labelIds->setText(QString::fromStdString(
str));
167 std::string
str{
"-----"};
170 auto start = std::chrono::high_resolution_clock::now();
172 auto end = std::chrono::high_resolution_clock::now();
173 str =
to_string(std::chrono::duration_cast<std::chrono::milliseconds>(end - start)
177 catch (Ice::Exception& e)
180 <<
"Error while reading data for the current proxy (ice_ping):\n what:\n"
183 widget.labelPing->setText(QString::fromStdString(
str));
188 armarx::IceProxyWidgetController::on_pushButtonFinder_clicked()
192 loadProxy(getIceManager()->getProxy<Ice::ObjectPrx>(
193 finder->getSelectedProxyName().toStdString()));
198 << finder->getSelectedProxyName().toStdString() <<
"' for Ice::ObjectPrx";
203 armarx::IceProxyWidgetController::on_pushButtonString_clicked()
208 loadProxy(getIceManager()->getCommunicator()->stringToProxy(
209 widget.lineEdit->text().toStdString()));
213 ARMARX_ERROR <<
"Can't convert '" << finder->getSelectedProxyName().toStdString()
214 <<
"' to Ice::ObjectPrx";