MBot Software Library  v1.0
An API documentation to mbot_firmware repository
Macros | Functions
Common

global IO structs, common definitions, common functions ROS Serial depends on More...

Collaboration diagram for Common:

Macros

#define SYNC_FLAG   0xff
 
#define VERSION_FLAG   0xfe
 
#define ROS_HEADER_LENGTH   7
 
#define ROS_FOOTER_LENGTH   1
 
#define ROS_PKG_LENGTH   (ROS_HEADER_LENGTH + ROS_FOOTER_LENGTH)
 

Functions

uint8_t checksum (uint8_t *addends, int len)
 
int32_t bytes_to_int32 (uint8_t bytes[4])
 
uint8_t * int32_to_bytes (int32_t i32t)
 
int decode_rospkt (uint8_t *ROSPKT, int rospkt_len, uint16_t *TOPIC, uint8_t *MSG, int msg_len)
 
int encode_msg (uint8_t *MSG, int msg_len, uint16_t TOPIC, uint8_t *ROSPKT, int rospkt_len)
 

Detailed Description

global IO structs, common definitions, common functions ROS Serial depends on

<comms/common.h>