iCub-main
Loading...
Searching...
No Matches
icub-tutorials
src
rpcIdl
src
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
19
int
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
}
RpcServerImpl.h
RpcServerImpl
Definition
RpcServerImpl.h:4
RpcServerImpl::is_running
virtual bool is_running()
Check is service is running.
Definition
RpcServerImpl.cpp:49
main
int main()
Definition
main.cpp:67
yarp
Copyright (C) 2008 RobotCub Consortium.
Definition
DebugInterfaces.h:51
Generated on Wed Dec 18 2024 16:34:46 for iCub-main by
1.9.8