RasPi/CopterController/v2Parser.h

32 lines
500 B
C++

/*
* v2Parser.h
*/
#include <netinet/in.h>
#include <sys/socket.h>
#include "helper_3dmath.h"
#ifndef V2PARSER_H
#define V2PARSER_H
class v2Parser
{
public:
v2Parser();
v2Parser( int port);
bool setup( int portNum );
bool recieve();
void send();
bool motorsEnabled;
int motorValues[ 4 ];
int controlValues[ 6 ];
Quaternion q;
private:
int sockfd, newsockfd;
char buffer[256];
struct sockaddr_in serv_addr, cli_addr;
socklen_t clilen;
};
#endif