Skip to content

Commit a39a9b7

Browse files
Merge pull request TheThingsNetwork#170 from TheThingsNetwork/feature/change-proto-fields
changed/removed fields name
2 parents 88ebcda + b922f11 commit a39a9b7

File tree

5 files changed

+14
-24
lines changed

5 files changed

+14
-24
lines changed

src/api/appData.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ package api;
44

55
message AppData {
66
optional bool light = 1;
7-
optional bool activation_limit = 2;
8-
optional bool switch_state = 3;
9-
optional float deactivation_limit = 4;
7+
optional bool activate = 2;
108
}

src/appData.pb.c

Lines changed: 3 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.3.7 at Fri Dec 9 17:11:33 2016. */
2+
/* Generated by nanopb-0.3.7 at Fri Dec 16 16:49:49 2016. */
33

44
#include "appData.pb.h"
55

@@ -10,11 +10,9 @@
1010

1111

1212

13-
const pb_field_t api_AppData_fields[5] = {
13+
const pb_field_t api_AppData_fields[3] = {
1414
PB_FIELD( 1, BOOL , OPTIONAL, STATIC , FIRST, api_AppData, light, light, 0),
15-
PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, api_AppData, activation_limit, light, 0),
16-
PB_FIELD( 3, BOOL , OPTIONAL, STATIC , OTHER, api_AppData, switch_state, activation_limit, 0),
17-
PB_FIELD( 4, FLOAT , OPTIONAL, STATIC , OTHER, api_AppData, deactivation_limit, switch_state, 0),
15+
PB_FIELD( 2, BOOL , OPTIONAL, STATIC , OTHER, api_AppData, activate, light, 0),
1816
PB_LAST_FIELD
1917
};
2018

src/appData.pb.h

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated nanopb header */
2-
/* Generated by nanopb-0.3.7 at Fri Dec 9 17:11:33 2016. */
2+
/* Generated by nanopb-0.3.7 at Fri Dec 16 16:49:49 2016. */
33

44
#ifndef PB_API_APPDATA_PB_H_INCLUDED
55
#define PB_API_APPDATA_PB_H_INCLUDED
@@ -18,32 +18,26 @@ extern "C" {
1818
typedef struct _api_AppData {
1919
bool has_light;
2020
bool light;
21-
bool has_activation_limit;
22-
bool activation_limit;
23-
bool has_switch_state;
24-
bool switch_state;
25-
bool has_deactivation_limit;
26-
float deactivation_limit;
21+
bool has_activate;
22+
bool activate;
2723
/* @@protoc_insertion_point(struct:api_AppData) */
2824
} api_AppData;
2925

3026
/* Default values for struct fields */
3127

3228
/* Initializer values for message structs */
33-
#define api_AppData_init_default {false, 0, false, 0, false, 0, false, 0}
34-
#define api_AppData_init_zero {false, 0, false, 0, false, 0, false, 0}
29+
#define api_AppData_init_default {false, 0, false, 0}
30+
#define api_AppData_init_zero {false, 0, false, 0}
3531

3632
/* Field tags (for use in manual encoding/decoding) */
3733
#define api_AppData_light_tag 1
38-
#define api_AppData_activation_limit_tag 2
39-
#define api_AppData_switch_state_tag 3
40-
#define api_AppData_deactivation_limit_tag 4
34+
#define api_AppData_activate_tag 2
4135

4236
/* Struct field encoding specification for nanopb */
43-
extern const pb_field_t api_AppData_fields[5];
37+
extern const pb_field_t api_AppData_fields[3];
4438

4539
/* Maximum encoded size of messages (where known) */
46-
#define api_AppData_size 11
40+
#define api_AppData_size 4
4741

4842
/* Message IDs (where set with "msgid" option) */
4943
#ifdef PB_MSGID

src/deviceData.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.3.7 at Fri Dec 9 17:11:33 2016. */
2+
/* Generated by nanopb-0.3.7 at Fri Dec 16 16:49:49 2016. */
33

44
#include "deviceData.pb.h"
55

src/deviceData.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.3.7 at Fri Dec 9 17:11:33 2016. */
2+
/* Generated by nanopb-0.3.7 at Fri Dec 16 16:49:49 2016. */
33

44
#ifndef PB_API_DEVICEDATA_PB_H_INCLUDED
55
#define PB_API_DEVICEDATA_PB_H_INCLUDED

0 commit comments

Comments
 (0)