KITProsthesisIceDriverExample.cpp
Go to the documentation of this file.
1 #include <Ice/Ice.h>
3 #include <RobotAPI/interface/units/KITProstheticHandInterface.h>
4 #include <QCoreApplication>
5 #include <thread>
6 int main(int argc, char* argv[])
7 {
8  for (int i = 0; i < argc; ++i)
9  {
10  if (std::string(argv[i]) == "-h" ||
11  std::string(argv[i]) == "--print-options") // needed for ArmarX Doc generation
12  {
13  // TODO: print help
14  return 0;
15  }
16  }
17 
18  QCoreApplication a(argc, argv);
19  try
20  {
21  Ice::CommunicatorHolder iceServer(argc, argv);
22  Ice::ObjectAdapterPtr adapter = iceServer->createObjectAdapterWithEndpoints("KITProsthesisControlAdapter", "default -h localhost -p 10000");
23  KITProsthesis::KITProstheticHandInterfacePtr object = new KITProsthesisIceDriver;
24  Ice::ObjectPrx prx = adapter->add(object, Ice::stringToIdentity("KITProsthesisControl"));
25  std::cout << prx->ice_toString() << std::endl;
26  adapter->activate();
27  iceServer->waitForShutdown();
28  }
29  catch (const std::exception& e)
30  {
31  std::cerr << e.what() << std::endl;
32  return 1;
33  }
34  return 0;
35 }
IceInternal::Handle< ::Ice::ObjectAdapter >
KITProsthesisIceDriver.h
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
main
int main(int argc, char *argv[])
Definition: KITProsthesisIceDriverExample.cpp:6
KITProsthesisIceDriver
Definition: KITProsthesisIceDriver.h:36