owlps/owlps-positioning/src/outputudpsocket.hh

38 lines
726 B
C++
Raw Normal View History

#ifndef _OWLPS_POSITIONING_OUTPUTUDPSOCKET_HH_
#define _OWLPS_POSITIONING_OUTPUTUDPSOCKET_HH_
2011-03-15 15:27:42 +01:00
#include "outputmedium.hh"
2011-03-15 15:27:42 +01:00
#include <string>
/// Sends results to an UDP socket
class OutputUDPSocket: public OutputMedium
2011-03-15 15:27:42 +01:00
{
private:
int socketDescriptor ;
std::string remote_ip ;
2011-03-15 15:27:42 +01:00
unsigned short int serverPort ;
/** @name Operations */
//@{
/// Initialises the socket
void init_socket(void) ;
void kill_socket(void) ;
void send_data(std::string msg) ;
//@}
2011-03-15 15:27:42 +01:00
public:
OutputUDPSocket(const std::string &_remote_ip) ;
~OutputUDPSocket(void) ;
2011-03-15 15:27:42 +01:00
/** @name Operations */
//@{
/// Initialises the socket
2011-03-15 15:27:42 +01:00
void write(const Result &result) ;
//@}
2011-03-15 15:27:42 +01:00
} ;
#endif // _OWLPS_POSITIONING_OUTPUTUDPSOCKET_HH_