Created
December 23, 2013 07:15
-
-
Save ahappyforest/8092882 to your computer and use it in GitHub Desktop.
这是蘑菇项目的message定义
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __MESSAGE__H__ | |
#define __MESSAGE__H__ | |
#include <inttypes.h> | |
const static char HEADER[] = "MUSHROOM"; | |
const static char END = 0x13; | |
struct message_s { | |
char header[sizeof(HEADER)]; | |
int32_t pb_len; // 4 bytes | |
int32_t pb_type; // 4 bytes | |
void *pb_data; | |
int32_t crc; // 4 bytes | |
char end; | |
}; | |
typedef struct message_s message_t; | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment