00001 #ifndef __COMM_H__ 00002 #define __COMM_H__ 00003 00004 #define MAX_RETRIES 3 00005 #define MAX_MSG_SIZE 1024 00006 00007 #define COMM_PERIOD_MS 50 00008 #define COMM_PERIOD_US (COMM_PERIOD_MS*1000) 00009 00010 int cartcomm_connect(char *host, int port); 00011 void cartcomm_disconnect(int sockfd); 00012 int cartcomm_synchronize(int sockfd); 00013 int cartcomm_connect_sync(char *host, int port); 00014 int cartcomm_send_msg(int sockfd, char *buf); 00015 int cartcomm_read_msg(int sockfd, char *buf, int bufsize); 00016 00017 #endif