File: configServerRobot.cpp

package info (click to toggle)
libaria 2.8.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,628 kB
  • ctags: 16,574
  • sloc: cpp: 135,490; makefile: 925; python: 597; java: 570; ansic: 182
file content (30 lines) | stat: -rw-r--r-- 555 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Aria.h"
#include "ArNetworking.h"

int main(int argc, char **argv)
{
  Aria::init();
  ArServerBase server;
  
  //ArLog::init(ArLog::StdOut, ArLog::Verbose);
  ArConfig *config;
  config = Aria::getConfig();

  ArRobotP3DX dx;
  //dx.writeFile("dx.txt");
  *Aria::getConfig() = dx;
  //Aria::getConfig()->writeFile("dxcopy.txt");

  if (!server.open(7272))
  {
    printf("Could not open server port\n");
    exit(1);
  }

  ArServerHandlerConfig configHandler(&server, Aria::getConfig());
  server.run();
  
  Aria::shutdown();

  return 0;
}