Skip to content

Commit 6bc1aa8

Browse files
andreagilardonipennam
authored andcommitted
Add commands definitions
1 parent 059b318 commit 6bc1aa8

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/message/Commands.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
This file is part of the ArduinoIoTCloud library.
3+
4+
Copyright (c) 2024 Arduino SA
5+
6+
This Source Code Form is subject to the terms of the Mozilla Public
7+
License, v. 2.0. If a copy of the MPL was not distributed with this
8+
file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+
*/
10+
11+
#pragma once
12+
13+
/******************************************************************************
14+
* INCLUDE
15+
******************************************************************************/
16+
17+
#include <stdint.h>
18+
#include <stddef.h>
19+
20+
/******************************************************************************
21+
* TYPEDEF
22+
******************************************************************************/
23+
24+
enum CommandId : uint16_t {
25+
26+
/* Device commands */
27+
DeviceBeginCmdId,
28+
ThingBeginCmdId,
29+
ThingUpdateCmdId,
30+
DeviceRegisteredCmdId,
31+
DeviceAttachedCmdId,
32+
DeviceDetachedCmdId,
33+
34+
/* Thing commands */
35+
LastValuesBeginCmdId,
36+
LastValuesUpdateCmdId,
37+
PropertiesUpdateCmdId,
38+
39+
/* Generic commands */
40+
ResetCmdId,
41+
42+
/* Unknown command id */
43+
UnknownCmdId
44+
};
45+
46+
struct Command {
47+
CommandId id;
48+
};
49+
50+
typedef Command Message;

0 commit comments

Comments
 (0)