orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
orca::Pinger Interface ReferenceAn interface which provides the well-known ping service.
More...
|
Public Member Functions | |
double | ping (string hostname) throws PingException |
This is provided as an Ice interface because calling Unix 'ping' requires root priveliges, so it's hard to do from within a large C++ program (assuming you don't want to run the entire executable as super user). This interface allows a small component to be run with root priveliges, and provide this service to other non-superuser components.
AlexB: Seems like a bit of a heavy-handed approach, but I'm not sure how else to do it... An obvious possibility is system("ping") and use some sed/grep magic to pull out the numbers and write to a file, then read the file. This might work but (a) it's brittle and a pain in the arse, and (b) it's hard to get meaningful errors if something goes wrong.
|
Returns:
|
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)