iCub-main
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(int argc, char *argv[])
Definition:
main.cpp:31
scripting.argc
argc
Definition:
scripting.py:184
yarp
Copyright (C) 2008 RobotCub Consortium.
Definition:
DebugInterfaces.h:51
Generated on Wed Nov 13 2024 21:11:40 for iCub-main by
1.9.1