owlps/owlps-positioning/src/outputudpsocket.hh

38 lines
726 B
C++

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