iCub-main
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
13#include "RpcServerImpl.h"
14
15#include <yarp/os/Network.h>
16#include <yarp/os/Port.h>
17#include <yarp/os/Time.h>
18
19int main(int argc, char *argv[]) {
20 yarp::os::Network yarp;
21
22 RpcServerImpl server;
23 yarp::os::Port port;
24 server.yarp().attachAsServer(port);
25 if (!port.open("/server")) { return 1; }
26
27 while (true) {
28 printf("Server is %s\n",server.is_running()?"running":"stopped");
29 yarp::os::Time::delay(10);
30 }
31 port.close();
32 return 0;
33}
virtual bool is_running()
Check is service is running.
int main()
Definition main.cpp:67
Copyright (C) 2008 RobotCub Consortium.