sysdis-project/plane/plane.h

63 lines
1.3 KiB
C
Raw Normal View History

/**************************
* Plane *
***************************
* Designed & Developed by *
* Adrien Marquès *
* <xdrm-brackets> *
***************************
* doowap31@gmail.com *
**************************/
2017-04-03 16:04:57 +00:00
#ifndef _PLANE_H_
#define _PLANE_H_
#include <time.h>
#include <math.h>
2017-04-03 16:04:57 +00:00
#include "lib/header.h"
2017-04-18 08:36:32 +00:00
#include "lib/network/udp/server.h"
#include "lib/network/tcp/client.h"
2017-04-03 16:04:57 +00:00
#define ALTMAX 20000
#define ALTMIN 0
#define VITMAX 1000
#define VITMIN 200
#define PAUSE 2
struct coord {
int x;
int y;
int z;
};
struct control {
int cap;
int speed;
};
#define PLANE_DATA_LEN (sizeof(char)*6+sizeof(int)*5)
struct plane_data{
char code[6];
int x;
int y;
int z;
int cap;
int spd;
};
#define BINDHDR_LEN ( sizeof(char)*(1+INET_ADDRSTRLEN)+sizeof(unsigned short) )
#define BINDHEAD_CTL 0x01 // is command terminal (else: view terminal)
#define BINDHEAD_SCK 0x02 // ask for com socket
#define BINDHEAD_TCP 0x04 // ask TCP instead of UDP
struct bind_header{
char flags;
char addr[INET_ADDRSTRLEN];
unsigned short port;
};
2017-04-03 16:04:57 +00:00
#endif