#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "debug.h"
#include <cartcomm/cframe.h>
#include <cartcomm/nmea.h>
#include <cartcomm/comm.h>
Include dependency graph for cframe.c:
Go to the source code of this file.
Defines | |
#define | DEBUG_LEVEL 1 |
#define | APPEND(fmt, val) sprintf(field, fmt, val); strcat(msg, field); |
#define | PRINT() fprintf(file, "\t" __VA_ARGS__); fputc('\n', file); |
Functions | |
int | parse_msg (cframe_t *cf, char *msg) |
int | cartcomm_encode_msg (cframe_t *cf, char *outMsg) |
Encode the control frame as a message string. | |
int | cartcomm_decode_msg (cframe_t *cf, char *inMsg) |
Decode the message into a control frame. | |
void | print_cframe (FILE *file, cframe_t *cf) |
Print a control frame in a human readable form. |
|
Referenced by cartcomm_encode_msg(). |
|
|
|
Referenced by print_cframe(). |
|
Decode the message into a control frame.
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:
|
Encode the control frame as a message string.
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:
|
Definition at line 1741 of file cframe_parser.c. References cframe_delete_buffer(), cframe_scan_string(), cframe_t, YY_BUFFER_STATE, and yyparse. Referenced by cartcomm_decode_msg(). |
Here is the call graph for this function:
|
Print a control frame in a human readable form.
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. |