File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1616
1717#include <stdint.h>
1818#include <stddef.h>
19+ #include <interfaces/message.h>
1920
2021/******************************************************************************
2122 * DEFINE
2223 ******************************************************************************/
2324
25+
26+ // FIXME make this constants into an enum
27+ // TODO remove provisioning constants
2428#define THING_ID_SIZE 37
2529#define SHA256_SIZE 32
2630#define URL_SIZE 256
3135 TYPEDEF
3236 ******************************************************************************/
3337
34- enum CommandId : uint32_t {
38+ enum CommandId : MessageId {
3539
3640 /* Device commands */
37- DeviceBeginCmdId ,
41+ DeviceBeginCmdId = ArduinoIOTCloudStartMessageId ,
3842 ThingBeginCmdId ,
3943 ThingUpdateCmdId ,
4044 ThingDetachCmdId ,
@@ -60,14 +64,10 @@ enum CommandId: uint32_t {
6064 TimezoneCommandDownId ,
6165
6266 /* Unknown command id */
63- UnknownCmdId
64- };
65-
66- struct Command {
67- CommandId id ;
67+ UnknownCmdId ,
6868};
6969
70- typedef Command Message ;
70+ typedef Message Command ;
7171
7272struct DeviceBeginCmd {
7373 Command c ;
@@ -149,7 +149,7 @@ struct TimezoneCommandDown {
149149};
150150
151151union CommandDown {
152- struct Command c ;
152+ Command c ;
153153 struct OtaUpdateCmdDown otaUpdateCmdDown ;
154154 struct ThingUpdateCmd thingUpdateCmd ;
155155 struct ThingDetachCmd thingDetachCmd ;
You can’t perform that action at this time.
0 commit comments