Nanopb (lightweight version of googles protobuf) test. It is not working as it should yet.

Dependencies:   MODSERIAL mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers threeaxis.pb.h Source File

threeaxis.pb.h

00001 /* Automatically generated nanopb header */
00002 /* Generated by nanopb-0.2.5 at Wed Feb 05 22:39:14 2014. */
00003 
00004 #ifndef _PB_THREEAXIS_PB_H_
00005 #define _PB_THREEAXIS_PB_H_
00006 #include <pb.h>
00007 
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011 
00012 /* Enum definitions */
00013 /* Struct definitions */
00014 typedef struct _acc_message {
00015     float X;
00016     float Y;
00017     float Z;
00018 } acc_message;
00019 
00020 typedef struct _gyro_message {
00021     float X;
00022     float Y;
00023     float Z;
00024 } gyro_message;
00025 
00026 typedef struct _imu_message {
00027     float X;
00028     float Y;
00029     float Z;
00030 } imu_message;
00031 
00032 typedef struct _motor_message {
00033     int32_t m1;
00034     int32_t m2;
00035     int32_t m3;
00036     int32_t m4;
00037     int32_t m5;
00038     int32_t m6;
00039 } motor_message;
00040 
00041 typedef struct _status_message {
00042     float BatteryLevel;
00043     int32_t Frequency;
00044     int32_t Mode;
00045 } status_message;
00046 
00047 /* Default values for struct fields */
00048 
00049 /* Field tags (for use in manual encoding/decoding) */
00050 #define acc_message_X_tag                        1
00051 #define acc_message_Y_tag                        2
00052 #define acc_message_Z_tag                        3
00053 #define gyro_message_X_tag                       1
00054 #define gyro_message_Y_tag                       2
00055 #define gyro_message_Z_tag                       3
00056 #define imu_message_X_tag                        1
00057 #define imu_message_Y_tag                        2
00058 #define imu_message_Z_tag                        3
00059 #define motor_message_m1_tag                     1
00060 #define motor_message_m2_tag                     2
00061 #define motor_message_m3_tag                     3
00062 #define motor_message_m4_tag                     4
00063 #define motor_message_m5_tag                     5
00064 #define motor_message_m6_tag                     6
00065 #define status_message_BatteryLevel_tag          1
00066 #define status_message_Frequency_tag             2
00067 #define status_message_Mode_tag                  3
00068 
00069 /* Struct field encoding specification for nanopb */
00070 extern const pb_field_t status_message_fields[4];
00071 extern const pb_field_t imu_message_fields[4];
00072 extern const pb_field_t gyro_message_fields[4];
00073 extern const pb_field_t acc_message_fields[4];
00074 extern const pb_field_t motor_message_fields[7];
00075 
00076 /* Maximum encoded size of messages (where known) */
00077 #define status_message_size                      27
00078 #define imu_message_size                         15
00079 #define gyro_message_size                        15
00080 #define acc_message_size                         15
00081 #define motor_message_size                       66
00082 
00083 #ifdef __cplusplus
00084 } /* extern "C" */
00085 #endif
00086 
00087 #endif
00088