Skip to content

Commit 03dff9e

Browse files
committed
Updating protobuf wrappers
1 parent 6a1a4f3 commit 03dff9e

File tree

8 files changed

+43
-131
lines changed

8 files changed

+43
-131
lines changed

src/wippersnapper/description/v1/description.pb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb constant definitions */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#include "wippersnapper/description/v1/description.pb.h"
55
#if PB_PROTO_HEADER_VERSION != 40

src/wippersnapper/description/v1/description.pb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb header */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#ifndef PB_WIPPERSNAPPER_DESCRIPTION_V1_WIPPERSNAPPER_DESCRIPTION_V1_DESCRIPTION_PB_H_INCLUDED
55
#define PB_WIPPERSNAPPER_DESCRIPTION_V1_WIPPERSNAPPER_DESCRIPTION_V1_DESCRIPTION_PB_H_INCLUDED

src/wippersnapper/i2c/v1/i2c.pb.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb constant definitions */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#include "wippersnapper/i2c/v1/i2c.pb.h"
55
#if PB_PROTO_HEADER_VERSION != 40
@@ -45,13 +45,10 @@ PB_BIND(wippersnapper_i2c_v1_DPS310InitRequest, wippersnapper_i2c_v1_DPS310InitR
4545
PB_BIND(wippersnapper_i2c_v1_DPS310DeinitRequest, wippersnapper_i2c_v1_DPS310DeinitRequest, AUTO)
4646

4747

48-
PB_BIND(wippersnapper_i2c_v1_SensorDetails, wippersnapper_i2c_v1_SensorDetails, AUTO)
49-
50-
5148
PB_BIND(wippersnapper_i2c_v1_SensorEvent, wippersnapper_i2c_v1_SensorEvent, AUTO)
5249

5350

54-
PB_BIND(wippersnapper_i2c_v1_I2CSensorEvent, wippersnapper_i2c_v1_I2CSensorEvent, AUTO)
51+
PB_BIND(wippersnapper_i2c_v1_I2CDeviceEvent, wippersnapper_i2c_v1_I2CDeviceEvent, AUTO)
5552

5653

5754

src/wippersnapper/i2c/v1/i2c.pb.h

Lines changed: 26 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb header */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#ifndef PB_WIPPERSNAPPER_I2C_V1_WIPPERSNAPPER_I2C_V1_I2C_PB_H_INCLUDED
55
#define PB_WIPPERSNAPPER_I2C_V1_WIPPERSNAPPER_I2C_V1_I2C_PB_H_INCLUDED
@@ -86,37 +86,18 @@ typedef struct _wippersnapper_i2c_v1_I2CDeviceDeinitResponse {
8686
uint32_t i2c_address;
8787
} wippersnapper_i2c_v1_I2CDeviceDeinitResponse;
8888

89+
typedef struct _wippersnapper_i2c_v1_I2CDeviceEvent {
90+
uint32_t sensor_address;
91+
pb_callback_t sensor_event;
92+
} wippersnapper_i2c_v1_I2CDeviceEvent;
93+
8994
typedef struct _wippersnapper_i2c_v1_I2CDeviceInitResponse {
9095
bool is_success;
9196
} wippersnapper_i2c_v1_I2CDeviceInitResponse;
9297

93-
typedef struct _wippersnapper_i2c_v1_SensorDetails {
94-
pb_callback_t name;
95-
int32_t version;
96-
int32_t id;
97-
wippersnapper_i2c_v1_SensorType type;
98-
float max_value;
99-
float min_value;
100-
float resolution;
101-
int32_t min_delay;
102-
} wippersnapper_i2c_v1_SensorDetails;
103-
10498
typedef struct _wippersnapper_i2c_v1_SensorEvent {
105-
int32_t version;
106-
int32_t sensor_id;
10799
wippersnapper_i2c_v1_SensorType type;
108-
int32_t timestamp;
109-
pb_size_t which_event_data;
110-
union {
111-
float temperature;
112-
float distance;
113-
float light;
114-
float pressure;
115-
float relative_humidity;
116-
float current;
117-
float voltage;
118-
uint32_t raw_value;
119-
} event_data;
100+
float value;
120101
} wippersnapper_i2c_v1_SensorEvent;
121102

122103
typedef struct _wippersnapper_i2c_v1_I2CDeviceDeinitRequest {
@@ -138,12 +119,6 @@ typedef struct _wippersnapper_i2c_v1_I2CDeviceInitRequest {
138119
wippersnapper_i2c_v1_DPS310InitRequest dps310_init;
139120
} wippersnapper_i2c_v1_I2CDeviceInitRequest;
140121

141-
typedef struct _wippersnapper_i2c_v1_I2CSensorEvent {
142-
uint32_t sensor_address;
143-
bool has_event;
144-
wippersnapper_i2c_v1_SensorEvent event;
145-
} wippersnapper_i2c_v1_I2CSensorEvent;
146-
147122

148123
/* Helper constants for enums */
149124
#define _wippersnapper_i2c_v1_SensorType_MIN wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_UNSPECIFIED
@@ -169,9 +144,8 @@ extern "C" {
169144
#define wippersnapper_i2c_v1_AHTDeinitRequest_init_default {0, 0}
170145
#define wippersnapper_i2c_v1_DPS310InitRequest_init_default {0, 0, 0, 0}
171146
#define wippersnapper_i2c_v1_DPS310DeinitRequest_init_default {0, 0}
172-
#define wippersnapper_i2c_v1_SensorDetails_init_default {{{NULL}, NULL}, 0, 0, _wippersnapper_i2c_v1_SensorType_MIN, 0, 0, 0, 0}
173-
#define wippersnapper_i2c_v1_SensorEvent_init_default {0, 0, _wippersnapper_i2c_v1_SensorType_MIN, 0, 0, {0}}
174-
#define wippersnapper_i2c_v1_I2CSensorEvent_init_default {0, false, wippersnapper_i2c_v1_SensorEvent_init_default}
147+
#define wippersnapper_i2c_v1_SensorEvent_init_default {_wippersnapper_i2c_v1_SensorType_MIN, 0}
148+
#define wippersnapper_i2c_v1_I2CDeviceEvent_init_default {0, {{NULL}, NULL}}
175149
#define wippersnapper_i2c_v1_I2CBusInitRequest_init_zero {0, 0, 0, 0}
176150
#define wippersnapper_i2c_v1_I2CBusInitResponse_init_zero {0}
177151
#define wippersnapper_i2c_v1_I2CBusSetFrequency_init_zero {0, 0}
@@ -185,9 +159,8 @@ extern "C" {
185159
#define wippersnapper_i2c_v1_AHTDeinitRequest_init_zero {0, 0}
186160
#define wippersnapper_i2c_v1_DPS310InitRequest_init_zero {0, 0, 0, 0}
187161
#define wippersnapper_i2c_v1_DPS310DeinitRequest_init_zero {0, 0}
188-
#define wippersnapper_i2c_v1_SensorDetails_init_zero {{{NULL}, NULL}, 0, 0, _wippersnapper_i2c_v1_SensorType_MIN, 0, 0, 0, 0}
189-
#define wippersnapper_i2c_v1_SensorEvent_init_zero {0, 0, _wippersnapper_i2c_v1_SensorType_MIN, 0, 0, {0}}
190-
#define wippersnapper_i2c_v1_I2CSensorEvent_init_zero {0, false, wippersnapper_i2c_v1_SensorEvent_init_zero}
162+
#define wippersnapper_i2c_v1_SensorEvent_init_zero {_wippersnapper_i2c_v1_SensorType_MIN, 0}
163+
#define wippersnapper_i2c_v1_I2CDeviceEvent_init_zero {0, {{NULL}, NULL}}
191164

192165
/* Field tags (for use in manual encoding/decoding) */
193166
#define wippersnapper_i2c_v1_AHTDeinitRequest_disable_temperature_tag 1
@@ -213,27 +186,11 @@ extern "C" {
213186
#define wippersnapper_i2c_v1_I2CBusSetFrequency_bus_id_tag 2
214187
#define wippersnapper_i2c_v1_I2CDeviceDeinitResponse_is_success_tag 1
215188
#define wippersnapper_i2c_v1_I2CDeviceDeinitResponse_i2c_address_tag 2
189+
#define wippersnapper_i2c_v1_I2CDeviceEvent_sensor_address_tag 1
190+
#define wippersnapper_i2c_v1_I2CDeviceEvent_sensor_event_tag 2
216191
#define wippersnapper_i2c_v1_I2CDeviceInitResponse_is_success_tag 1
217-
#define wippersnapper_i2c_v1_SensorDetails_name_tag 1
218-
#define wippersnapper_i2c_v1_SensorDetails_version_tag 2
219-
#define wippersnapper_i2c_v1_SensorDetails_id_tag 3
220-
#define wippersnapper_i2c_v1_SensorDetails_type_tag 4
221-
#define wippersnapper_i2c_v1_SensorDetails_max_value_tag 5
222-
#define wippersnapper_i2c_v1_SensorDetails_min_value_tag 6
223-
#define wippersnapper_i2c_v1_SensorDetails_resolution_tag 7
224-
#define wippersnapper_i2c_v1_SensorDetails_min_delay_tag 8
225-
#define wippersnapper_i2c_v1_SensorEvent_version_tag 1
226-
#define wippersnapper_i2c_v1_SensorEvent_sensor_id_tag 2
227-
#define wippersnapper_i2c_v1_SensorEvent_type_tag 3
228-
#define wippersnapper_i2c_v1_SensorEvent_timestamp_tag 4
229-
#define wippersnapper_i2c_v1_SensorEvent_temperature_tag 5
230-
#define wippersnapper_i2c_v1_SensorEvent_distance_tag 6
231-
#define wippersnapper_i2c_v1_SensorEvent_light_tag 7
232-
#define wippersnapper_i2c_v1_SensorEvent_pressure_tag 8
233-
#define wippersnapper_i2c_v1_SensorEvent_relative_humidity_tag 9
234-
#define wippersnapper_i2c_v1_SensorEvent_current_tag 10
235-
#define wippersnapper_i2c_v1_SensorEvent_voltage_tag 11
236-
#define wippersnapper_i2c_v1_SensorEvent_raw_value_tag 12
192+
#define wippersnapper_i2c_v1_SensorEvent_type_tag 1
193+
#define wippersnapper_i2c_v1_SensorEvent_value_tag 2
237194
#define wippersnapper_i2c_v1_I2CDeviceDeinitRequest_i2c_port_number_tag 1
238195
#define wippersnapper_i2c_v1_I2CDeviceDeinitRequest_i2c_address_tag 2
239196
#define wippersnapper_i2c_v1_I2CDeviceDeinitRequest_detach_device_tag 3
@@ -243,8 +200,6 @@ extern "C" {
243200
#define wippersnapper_i2c_v1_I2CDeviceInitRequest_i2c_address_tag 2
244201
#define wippersnapper_i2c_v1_I2CDeviceInitRequest_aht_init_tag 3
245202
#define wippersnapper_i2c_v1_I2CDeviceInitRequest_dps310_init_tag 4
246-
#define wippersnapper_i2c_v1_I2CSensorEvent_sensor_address_tag 1
247-
#define wippersnapper_i2c_v1_I2CSensorEvent_event_tag 2
248203

249204
/* Struct field encoding specification for nanopb */
250205
#define wippersnapper_i2c_v1_I2CBusInitRequest_FIELDLIST(X, a) \
@@ -336,40 +291,18 @@ X(a, STATIC, SINGULAR, BOOL, disable_temperature, 2)
336291
#define wippersnapper_i2c_v1_DPS310DeinitRequest_CALLBACK NULL
337292
#define wippersnapper_i2c_v1_DPS310DeinitRequest_DEFAULT NULL
338293

339-
#define wippersnapper_i2c_v1_SensorDetails_FIELDLIST(X, a) \
340-
X(a, CALLBACK, SINGULAR, STRING, name, 1) \
341-
X(a, STATIC, SINGULAR, INT32, version, 2) \
342-
X(a, STATIC, SINGULAR, INT32, id, 3) \
343-
X(a, STATIC, SINGULAR, UENUM, type, 4) \
344-
X(a, STATIC, SINGULAR, FLOAT, max_value, 5) \
345-
X(a, STATIC, SINGULAR, FLOAT, min_value, 6) \
346-
X(a, STATIC, SINGULAR, FLOAT, resolution, 7) \
347-
X(a, STATIC, SINGULAR, INT32, min_delay, 8)
348-
#define wippersnapper_i2c_v1_SensorDetails_CALLBACK pb_default_field_callback
349-
#define wippersnapper_i2c_v1_SensorDetails_DEFAULT NULL
350-
351294
#define wippersnapper_i2c_v1_SensorEvent_FIELDLIST(X, a) \
352-
X(a, STATIC, SINGULAR, INT32, version, 1) \
353-
X(a, STATIC, SINGULAR, INT32, sensor_id, 2) \
354-
X(a, STATIC, SINGULAR, UENUM, type, 3) \
355-
X(a, STATIC, SINGULAR, INT32, timestamp, 4) \
356-
X(a, STATIC, ONEOF, FLOAT, (event_data,temperature,event_data.temperature), 5) \
357-
X(a, STATIC, ONEOF, FLOAT, (event_data,distance,event_data.distance), 6) \
358-
X(a, STATIC, ONEOF, FLOAT, (event_data,light,event_data.light), 7) \
359-
X(a, STATIC, ONEOF, FLOAT, (event_data,pressure,event_data.pressure), 8) \
360-
X(a, STATIC, ONEOF, FLOAT, (event_data,relative_humidity,event_data.relative_humidity), 9) \
361-
X(a, STATIC, ONEOF, FLOAT, (event_data,current,event_data.current), 10) \
362-
X(a, STATIC, ONEOF, FLOAT, (event_data,voltage,event_data.voltage), 11) \
363-
X(a, STATIC, ONEOF, UINT32, (event_data,raw_value,event_data.raw_value), 12)
295+
X(a, STATIC, SINGULAR, UENUM, type, 1) \
296+
X(a, STATIC, SINGULAR, FLOAT, value, 2)
364297
#define wippersnapper_i2c_v1_SensorEvent_CALLBACK NULL
365298
#define wippersnapper_i2c_v1_SensorEvent_DEFAULT NULL
366299

367-
#define wippersnapper_i2c_v1_I2CSensorEvent_FIELDLIST(X, a) \
300+
#define wippersnapper_i2c_v1_I2CDeviceEvent_FIELDLIST(X, a) \
368301
X(a, STATIC, SINGULAR, UINT32, sensor_address, 1) \
369-
X(a, STATIC, OPTIONAL, MESSAGE, event, 2)
370-
#define wippersnapper_i2c_v1_I2CSensorEvent_CALLBACK NULL
371-
#define wippersnapper_i2c_v1_I2CSensorEvent_DEFAULT NULL
372-
#define wippersnapper_i2c_v1_I2CSensorEvent_event_MSGTYPE wippersnapper_i2c_v1_SensorEvent
302+
X(a, CALLBACK, REPEATED, MESSAGE, sensor_event, 2)
303+
#define wippersnapper_i2c_v1_I2CDeviceEvent_CALLBACK pb_default_field_callback
304+
#define wippersnapper_i2c_v1_I2CDeviceEvent_DEFAULT NULL
305+
#define wippersnapper_i2c_v1_I2CDeviceEvent_sensor_event_MSGTYPE wippersnapper_i2c_v1_SensorEvent
373306

374307
extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CBusInitRequest_msg;
375308
extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CBusInitResponse_msg;
@@ -384,9 +317,8 @@ extern const pb_msgdesc_t wippersnapper_i2c_v1_AHTInitRequest_msg;
384317
extern const pb_msgdesc_t wippersnapper_i2c_v1_AHTDeinitRequest_msg;
385318
extern const pb_msgdesc_t wippersnapper_i2c_v1_DPS310InitRequest_msg;
386319
extern const pb_msgdesc_t wippersnapper_i2c_v1_DPS310DeinitRequest_msg;
387-
extern const pb_msgdesc_t wippersnapper_i2c_v1_SensorDetails_msg;
388320
extern const pb_msgdesc_t wippersnapper_i2c_v1_SensorEvent_msg;
389-
extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CSensorEvent_msg;
321+
extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CDeviceEvent_msg;
390322

391323
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
392324
#define wippersnapper_i2c_v1_I2CBusInitRequest_fields &wippersnapper_i2c_v1_I2CBusInitRequest_msg
@@ -402,9 +334,8 @@ extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CSensorEvent_msg;
402334
#define wippersnapper_i2c_v1_AHTDeinitRequest_fields &wippersnapper_i2c_v1_AHTDeinitRequest_msg
403335
#define wippersnapper_i2c_v1_DPS310InitRequest_fields &wippersnapper_i2c_v1_DPS310InitRequest_msg
404336
#define wippersnapper_i2c_v1_DPS310DeinitRequest_fields &wippersnapper_i2c_v1_DPS310DeinitRequest_msg
405-
#define wippersnapper_i2c_v1_SensorDetails_fields &wippersnapper_i2c_v1_SensorDetails_msg
406337
#define wippersnapper_i2c_v1_SensorEvent_fields &wippersnapper_i2c_v1_SensorEvent_msg
407-
#define wippersnapper_i2c_v1_I2CSensorEvent_fields &wippersnapper_i2c_v1_I2CSensorEvent_msg
338+
#define wippersnapper_i2c_v1_I2CDeviceEvent_fields &wippersnapper_i2c_v1_I2CDeviceEvent_msg
408339

409340
/* Maximum encoded size of messages (where known) */
410341
#define wippersnapper_i2c_v1_I2CBusInitRequest_size 39
@@ -420,9 +351,8 @@ extern const pb_msgdesc_t wippersnapper_i2c_v1_I2CSensorEvent_msg;
420351
#define wippersnapper_i2c_v1_AHTDeinitRequest_size 4
421352
#define wippersnapper_i2c_v1_DPS310InitRequest_size 14
422353
#define wippersnapper_i2c_v1_DPS310DeinitRequest_size 4
423-
/* wippersnapper_i2c_v1_SensorDetails_size depends on runtime parameters */
424-
#define wippersnapper_i2c_v1_SensorEvent_size 41
425-
#define wippersnapper_i2c_v1_I2CSensorEvent_size 49
354+
#define wippersnapper_i2c_v1_SensorEvent_size 7
355+
/* wippersnapper_i2c_v1_I2CDeviceEvent_size depends on runtime parameters */
426356

427357
#ifdef __cplusplus
428358
} /* extern "C" */

src/wippersnapper/pin/v1/pin.pb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb constant definitions */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#include "wippersnapper/pin/v1/pin.pb.h"
55
#if PB_PROTO_HEADER_VERSION != 40

src/wippersnapper/pin/v1/pin.pb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb header */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#ifndef PB_WIPPERSNAPPER_PIN_V1_WIPPERSNAPPER_PIN_V1_PIN_PB_H_INCLUDED
55
#define PB_WIPPERSNAPPER_PIN_V1_WIPPERSNAPPER_PIN_V1_PIN_PB_H_INCLUDED

src/wippersnapper/signal/v1/signal.pb.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb constant definitions */
2-
/* Generated by nanopb-0.4.5-dev at Fri Oct 15 20:43:36 2021. */
2+
/* Generated by nanopb-0.4.5-dev at Mon Oct 25 13:37:21 2021. */
33

44
#include "wippersnapper/signal/v1/signal.pb.h"
55
#if PB_PROTO_HEADER_VERSION != 40
@@ -12,9 +12,6 @@ PB_BIND(wippersnapper_signal_v1_I2CRequest, wippersnapper_signal_v1_I2CRequest,
1212
PB_BIND(wippersnapper_signal_v1_I2CResponse, wippersnapper_signal_v1_I2CResponse, 2)
1313

1414

15-
PB_BIND(wippersnapper_signal_v1_SensorEvent, wippersnapper_signal_v1_SensorEvent, AUTO)
16-
17-
1815
PB_BIND(wippersnapper_signal_v1_CreateSignalRequest, wippersnapper_signal_v1_CreateSignalRequest, AUTO)
1916

2017

0 commit comments

Comments
 (0)