#include #define DEBUG /* Lenght of string algo */ #define ALGO_STRLEN 15 /* Error codes */ #define ERR_BAD_USAGE 1 // Bad program call (bad number of arguments) /* Number of packets to send */ #define DEFAULT_NBPKT_CALIB 20 // 20 packets when calibrating #define DEFAULT_NBPKT_NORMAL 10 // 10 packets when requesting the position /* Delay between two packet transmissions (in microseconds) */ #define DEFAULT_DELAY_CALIB 50000 // Calibration request #define DEFAULT_DELAY_NORMAL 25000 // Localisation request /* Program arguments (getopt string) */ #define OPTIONS "d:hi:l::n:p:t:" /* Function headers */ void parse_command_line(int argc, char **argv) ; void parse_main_options(int argc, char **argv) ; void check_destination_ip(void) ; void parse_calibration_data(int argc, char **argv) ; void check_configuration(void) ; #ifdef DEBUG void print_configuration(void) ; #endif // DEBUG void create_socket(void) ; void make_packet(void) ; void send_request(void) ; void receive_position(void) ; void print_usage(void) ; void send_labview(char*) ; void string2data(char*) ; void* thread_send(void*) ; void print_error(char*) ; typedef struct result result; /* Struct */ struct result { char algo[ALGO_STRLEN]; float x; float y; float z; };