33 lines
671 B
C++
33 lines
671 B
C++
#ifndef _OWLPS_POSITIONING_OUTPUTSOCKET_HH_
|
|
#define _OWLPS_POSITIONING_OUTPUTSOCKET_HH_
|
|
#include "outputmedium.hh"
|
|
#include <string>
|
|
#include <stdint.h> // <cstdint> is not C++ 98 compliant
|
|
|
|
//#include <netinet/in.h>
|
|
//#include <unistd.h>
|
|
|
|
/// Send a result to socket
|
|
class OutputSocket: public OutputMedium
|
|
{
|
|
private:
|
|
int socketDescriptor ;
|
|
unsigned short int serverPort ;
|
|
|
|
public:
|
|
OutputSocket() {}
|
|
|
|
void write(const Result &result) ;
|
|
|
|
std::string float2string(float f) ;
|
|
std::string uint2string(uint64_t f) ;
|
|
std::string int2string(int f) ;
|
|
void init_socket() ;
|
|
void send_data(std::string msg) ;
|
|
} ;
|
|
|
|
|
|
|
|
#endif // _OWLPS_POSITIONING_OUTPUTSOCKET_HH_
|
|
|