Detect if I am connect with a remote device #2580
Replies: 2 comments
-
|
I don't think that there is a generic way to do this... yarp::os::Network yarp;
if (!yarp::os::NetworkBase::checkNetwork()) {
yError() << "yarp server does not seem available";
return EXIT_FAILURE;
}If you know the name of the remote port(s) that are used by the device (i.e. if (!yarp::os::NetworkBase::exists("/grabber/rpc")) {
yError() << "Error: the remote port is not open";
return EXIT_FAILURE;
}If you are dealing with a synchronization among processes issue, you can also use the |
Beta Was this translation helpful? Give feedback.
-
Ok Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With the following code:
I face the following problem if the remote device is not running (yarpdev with grabberDual):
To me the correct behaviour should be:
I'm not able to understand if I am really connected to the remote device.
Am I miss something?
Beta Was this translation helpful? Give feedback.
All reactions