Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
sitewhere.pb.h
00001 /* Automatically generated nanopb header */ 00002 /* Generated by nanopb-0.2.5 at Wed May 28 15:52:00 2014. */ 00003 00004 #ifndef _PB_SITEWHERE_PB_H_ 00005 #define _PB_SITEWHERE_PB_H_ 00006 #include <pb.h> 00007 00008 #ifdef __cplusplus 00009 extern "C" { 00010 #endif 00011 00012 /* Enum definitions */ 00013 typedef enum _SiteWhere_Command { 00014 SiteWhere_Command_REGISTER = 1, 00015 SiteWhere_Command_ACKNOWLEDGE = 2, 00016 SiteWhere_Command_DEVICELOCATION = 3, 00017 SiteWhere_Command_DEVICEALERT = 4, 00018 SiteWhere_Command_DEVICEMEASUREMENT = 5 00019 } SiteWhere_Command; 00020 00021 typedef enum _Device_Command { 00022 Device_Command_REGISTER_ACK = 1 00023 } Device_Command; 00024 00025 typedef enum _Device_RegistrationAckState { 00026 Device_RegistrationAckState_NEW_REGISTRATION = 1, 00027 Device_RegistrationAckState_ALREADY_REGISTERED = 2, 00028 Device_RegistrationAckState_REGISTRATION_ERROR = 3 00029 } Device_RegistrationAckState; 00030 00031 typedef enum _Device_RegistrationAckError { 00032 Device_RegistrationAckError_INVALID_SPECIFICATION = 1, 00033 Device_RegistrationAckError_SITE_TOKEN_REQUIRED = 2 00034 } Device_RegistrationAckError; 00035 00036 /* Struct definitions */ 00037 typedef struct _Device { 00038 uint8_t dummy_field; 00039 } Device; 00040 00041 typedef struct _SiteWhere { 00042 uint8_t dummy_field; 00043 } SiteWhere; 00044 00045 typedef struct _Device_Header { 00046 Device_Command command; 00047 bool has_originator; 00048 char originator[30]; 00049 bool has_nestedPath; 00050 char nestedPath[50]; 00051 bool has_nestedSpec; 00052 char nestedSpec[40]; 00053 } Device_Header; 00054 00055 typedef struct _Device_RegistrationAck { 00056 Device_RegistrationAckState state; 00057 bool has_errorType; 00058 Device_RegistrationAckError errorType; 00059 bool has_errorMessage; 00060 char errorMessage[70]; 00061 } Device_RegistrationAck; 00062 00063 typedef struct _SiteWhere_Acknowledge { 00064 char hardwareId[40]; 00065 bool has_message; 00066 char message[70]; 00067 } SiteWhere_Acknowledge; 00068 00069 typedef struct _SiteWhere_DeviceAlert { 00070 char hardwareId[40]; 00071 char alertType[40]; 00072 char alertMessage[70]; 00073 bool has_eventDate; 00074 uint64_t eventDate; 00075 } SiteWhere_DeviceAlert; 00076 00077 typedef struct _SiteWhere_DeviceLocation { 00078 char hardwareId[40]; 00079 uint64_t latitude; 00080 uint64_t longitude; 00081 bool has_elevation; 00082 uint64_t elevation; 00083 bool has_eventDate; 00084 uint64_t eventDate; 00085 } SiteWhere_DeviceLocation; 00086 00087 typedef struct _SiteWhere_Header { 00088 SiteWhere_Command command; 00089 bool has_originator; 00090 char originator[30]; 00091 } SiteWhere_Header; 00092 00093 typedef struct _SiteWhere_Measurement { 00094 char measurementId[30]; 00095 uint64_t measurementValue; 00096 } SiteWhere_Measurement; 00097 00098 typedef struct _SiteWhere_RegisterDevice { 00099 char hardwareId[40]; 00100 char specificationToken[40]; 00101 } SiteWhere_RegisterDevice; 00102 00103 typedef struct _SiteWhere_DeviceMeasurements { 00104 char hardwareId[40]; 00105 size_t measurement_count; 00106 SiteWhere_Measurement measurement[5]; 00107 bool has_eventDate; 00108 uint64_t eventDate; 00109 } SiteWhere_DeviceMeasurements; 00110 00111 /* Default values for struct fields */ 00112 00113 /* Field tags (for use in manual encoding/decoding) */ 00114 #define Device_Header_command_tag 1 00115 #define Device_Header_originator_tag 2 00116 #define Device_Header_nestedPath_tag 3 00117 #define Device_Header_nestedSpec_tag 4 00118 #define Device_RegistrationAck_state_tag 1 00119 #define Device_RegistrationAck_errorType_tag 2 00120 #define Device_RegistrationAck_errorMessage_tag 3 00121 #define SiteWhere_Acknowledge_hardwareId_tag 1 00122 #define SiteWhere_Acknowledge_message_tag 2 00123 #define SiteWhere_DeviceAlert_hardwareId_tag 1 00124 #define SiteWhere_DeviceAlert_alertType_tag 2 00125 #define SiteWhere_DeviceAlert_alertMessage_tag 3 00126 #define SiteWhere_DeviceAlert_eventDate_tag 4 00127 #define SiteWhere_DeviceLocation_hardwareId_tag 1 00128 #define SiteWhere_DeviceLocation_latitude_tag 2 00129 #define SiteWhere_DeviceLocation_longitude_tag 3 00130 #define SiteWhere_DeviceLocation_elevation_tag 4 00131 #define SiteWhere_DeviceLocation_eventDate_tag 5 00132 #define SiteWhere_Header_command_tag 1 00133 #define SiteWhere_Header_originator_tag 2 00134 #define SiteWhere_Measurement_measurementId_tag 2 00135 #define SiteWhere_Measurement_measurementValue_tag 3 00136 #define SiteWhere_RegisterDevice_hardwareId_tag 1 00137 #define SiteWhere_RegisterDevice_specificationToken_tag 2 00138 #define SiteWhere_DeviceMeasurements_hardwareId_tag 1 00139 #define SiteWhere_DeviceMeasurements_measurement_tag 2 00140 #define SiteWhere_DeviceMeasurements_eventDate_tag 3 00141 00142 /* Struct field encoding specification for nanopb */ 00143 extern const pb_field_t SiteWhere_fields[1]; 00144 extern const pb_field_t SiteWhere_Header_fields[3]; 00145 extern const pb_field_t SiteWhere_RegisterDevice_fields[3]; 00146 extern const pb_field_t SiteWhere_Acknowledge_fields[3]; 00147 extern const pb_field_t SiteWhere_DeviceLocation_fields[6]; 00148 extern const pb_field_t SiteWhere_DeviceAlert_fields[5]; 00149 extern const pb_field_t SiteWhere_Measurement_fields[3]; 00150 extern const pb_field_t SiteWhere_DeviceMeasurements_fields[4]; 00151 extern const pb_field_t Device_fields[1]; 00152 extern const pb_field_t Device_Header_fields[5]; 00153 extern const pb_field_t Device_RegistrationAck_fields[4]; 00154 00155 /* Maximum encoded size of messages (where known) */ 00156 #define SiteWhere_size 0 00157 #define SiteWhere_Header_size 38 00158 #define SiteWhere_RegisterDevice_size 84 00159 #define SiteWhere_Acknowledge_size 114 00160 #define SiteWhere_DeviceLocation_size 78 00161 #define SiteWhere_DeviceAlert_size 165 00162 #define SiteWhere_Measurement_size 41 00163 #define SiteWhere_DeviceMeasurements_size 266 00164 #define Device_size 0 00165 #define Device_Header_size 132 00166 #define Device_RegistrationAck_size 84 00167 00168 #ifdef __cplusplus 00169 } /* extern "C" */ 00170 #endif 00171 00172 #endif
Generated on Thu Jul 14 2022 02:43:24 by
1.7.2