00001 #ifndef __CFRAME_H__ 00002 #define __CFRAME_H__ 00003 00004 #include <stdio.h> 00005 00007 typedef struct cframe { 00009 long seqno; 00011 long timestamp; 00012 00014 double cmd_irad; 00016 double cur_irad; 00018 char steer_limit_error[10]; 00019 00021 double cmd_speed; 00023 double cur_speed; 00025 double cur_throttle; 00027 char speed_limit_error[10]; 00028 00030 double gps_lat; 00032 double gps_lon; 00034 double gps_speed_east; 00036 double gps_speed_north; 00038 double gps_epe; 00040 char gps_status[10]; 00041 00043 char status[10]; 00045 char cmd_mode[10]; 00047 char cur_mode[10]; 00049 int error_code; 00050 00052 size_t msg_len; 00054 unsigned char checksum; 00055 } cframe_t; 00056 00057 int cartcomm_decode_msg(cframe_t *cf, char *inMsg); 00058 int cartcomm_encode_msg(cframe_t *cf, char *outMsg); 00059 void print_cframe(FILE *file, cframe_t *cf); 00060 00061 #endif