orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

pinger.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDROPING_PINGER_H
00012 #define HYDROPING_PINGER_H
00013 
00014 #include <sys/types.h> // required because oping doesn't include it.
00015 extern "C" {
00016 #include <oping.h>
00017 }
00018 #include <string>
00019 #include <gbxsickacfr/gbxutilacfr/exceptions.h>
00020 
00021 namespace hydroping {
00022 
00026 class PingException : public gbxsickacfr::gbxutilacfr::Exception
00027 { 
00028 public:
00030     PingException(const char *file, const char *line, const char *message)
00031         : gbxsickacfr::gbxutilacfr::Exception(file,line,message) {}
00033     PingException(const char *file, const char *line, const std::string &message)
00034         : gbxsickacfr::gbxutilacfr::Exception(file,line,message) {}
00035     ~PingException()throw(){}
00036 };
00037 
00041 class Pinger
00042 {
00043 
00044 public: 
00046     Pinger( double maxTimeoutSec=1 );
00047     ~Pinger();
00048 
00055     double ping( const std::string &host );
00056 
00057 private: 
00058 
00059     pingobj_t *pingObj_;
00060 };
00061 
00062 }
00063 
00064 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5