Main Page | Data Structures | Directories | File List | Data Fields | Globals

cframe.h File Reference

#include <stdio.h>

Include dependency graph for cframe.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  cframe
 A structure for containing communication frames. More...

Typedefs

typedef cframe cframe_t
 A structure for containing communication frames.

Functions

int cartcomm_decode_msg (cframe_t *cf, char *inMsg)
 Decode the message into a control frame.
int cartcomm_encode_msg (cframe_t *cf, char *outMsg)
 Encode the control frame as a message string.
void print_cframe (FILE *file, cframe_t *cf)
 Print a control frame in a human readable form.


Typedef Documentation

typedef struct cframe cframe_t
 

A structure for containing communication frames.

Referenced by cartcomm_decode_msg(), cartcomm_encode_msg(), cartcomm_synchronize(), drive(), driver_eight(), driver_null(), driver_rosetta(), driver_square(), driver_straight(), parse_avpair(), parse_msg(), print_cframe(), recorder_add(), and recorder_export().


Function Documentation

int cartcomm_decode_msg cframe_t cf,
char *  inMsg
 

Decode the message into a control frame.

Parameters:
cf control frame to decode into
inMsg buffer to decode
Return values:
0 success
-1 failure

Definition at line 126 of file cframe.c.

References cframe_t, cframe::checksum, DEBUG2, DEBUG3, cframe::msg_len, and parse_msg().

Referenced by cartcomm_encode_msg(), cartcomm_synchronize(), and drive().

Here is the call graph for this function:

int cartcomm_encode_msg cframe_t cf,
char *  outMsg
 

Encode the control frame as a message string.

Parameters:
cf control frame to encode
outMsg buffer to encode into
Return values:
0 success
-1 failure

Definition at line 43 of file cframe.c.

References APPEND, ASSERT_EQUAL, cartcomm_decode_msg(), cframe_t, cframe::cmd_irad, cframe::cmd_mode, cframe::cmd_speed, cframe::cur_irad, cframe::cur_mode, cframe::cur_speed, cframe::cur_throttle, DEBUG3, deg_to_nmea(), cframe::error_code, cframe::gps_epe, cframe::gps_lat, cframe::gps_lon, cframe::gps_speed_east, cframe::gps_speed_north, cframe::gps_status, cframe::seqno, cframe::speed_limit_error, cframe::status, cframe::steer_limit_error, and cframe::timestamp.

Referenced by drive().

Here is the call graph for this function:

void print_cframe FILE *  file,
cframe_t cf
 

Print a control frame in a human readable form.

Parameters:
file file handle to output towards
cf control frame to output

Definition at line 161 of file cframe.c.

References cframe_t, cframe::cmd_irad, cframe::cmd_mode, cframe::cmd_speed, cframe::cur_irad, cframe::cur_mode, cframe::cur_speed, cframe::cur_throttle, cframe::error_code, cframe::gps_epe, cframe::gps_lat, cframe::gps_lon, cframe::gps_speed_east, cframe::gps_speed_north, cframe::gps_status, PRINT, cframe::seqno, cframe::speed_limit_error, cframe::status, cframe::steer_limit_error, and cframe::timestamp.


Generated on Thu Sep 6 13:13:12 2007 for driver by  doxygen 1.3.9.1