File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#include <stdint.h>
18
18
#include <stddef.h>
19
+ #include <interfaces/message.h>
19
20
20
21
/******************************************************************************
21
22
* DEFINE
22
23
******************************************************************************/
23
24
25
+
26
+ // FIXME make this constants into an enum
27
+ // TODO remove provisioning constants
24
28
#define THING_ID_SIZE 37
25
29
#define SHA256_SIZE 32
26
30
#define URL_SIZE 256
31
35
TYPEDEF
32
36
******************************************************************************/
33
37
34
- enum CommandId : uint32_t {
38
+ enum CommandId : MessageId {
35
39
36
40
/* Device commands */
37
- DeviceBeginCmdId ,
41
+ DeviceBeginCmdId = ArduinoIOTCloudStartMessageId ,
38
42
ThingBeginCmdId ,
39
43
ThingUpdateCmdId ,
40
44
ThingDetachCmdId ,
@@ -60,14 +64,10 @@ enum CommandId: uint32_t {
60
64
TimezoneCommandDownId ,
61
65
62
66
/* Unknown command id */
63
- UnknownCmdId
64
- };
65
-
66
- struct Command {
67
- CommandId id ;
67
+ UnknownCmdId ,
68
68
};
69
69
70
- typedef Command Message ;
70
+ typedef Message Command ;
71
71
72
72
struct DeviceBeginCmd {
73
73
Command c ;
@@ -149,7 +149,7 @@ struct TimezoneCommandDown {
149
149
};
150
150
151
151
union CommandDown {
152
- struct Command c ;
152
+ Command c ;
153
153
struct OtaUpdateCmdDown otaUpdateCmdDown ;
154
154
struct ThingUpdateCmd thingUpdateCmd ;
155
155
struct ThingDetachCmd thingDetachCmd ;
You can’t perform that action at this time.
0 commit comments