-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArduinoCloudTCP: Separate the logic of the device and the logic of the thing in two different state machines #425
Closed
mirkokurt
wants to merge
15
commits into
arduino-libraries:master
from
mirkokurt:mirkokurt/arduino-iot-infra
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a0729e1
First draft
mirkokurt fd6cb03
Fixes
mirkokurt a0ce58e
Fixes
mirkokurt 8e3a4d0
Compile
mirkokurt dab4e4b
Fix handle message
mirkokurt 361b6df
Move the thing property container in the thing class
mirkokurt 9a2966f
Add events callbacks and refactor
mirkokurt 2adb653
Fix LPWAN class
mirkokurt 1ebad66
Fix order in members initialization
mirkokurt 7b125f4
Remove internal deprecation warning
mirkokurt 5675efc
Remove internal calls to deprecated addPropertyReal
mirkokurt ce9d815
Refactor addPropertyInternal
mirkokurt 4bf736c
Fix use AddPropertyInternal
mirkokurt d26a9f6
Revert addProperty refactor
mirkokurt 63ff024
Clean classes
mirkokurt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,51 @@ | ||||||
/* | ||||||
This file is part of ArduinoIoTCloud. | ||||||
|
||||||
Copyright 2020 ARDUINO SA (http://www.arduino.cc/) | ||||||
|
||||||
This software is released under the GNU General Public License version 3, | ||||||
which covers the main part of arduino-cli. | ||||||
The terms of this license can be found at: | ||||||
https://www.gnu.org/licenses/gpl-3.0.en.html | ||||||
|
||||||
You can be released from the requirements of the above licenses by purchasing | ||||||
a commercial license. Buying such a license is mandatory if you want to modify or | ||||||
otherwise use the software for commercial activities involving the Arduino | ||||||
software without disclosing the source code of your own applications. To purchase | ||||||
a commercial license, send an email to [email protected]. | ||||||
*/ | ||||||
|
||||||
#ifndef ARDUINO_AIOTC_TYPES_H_ | ||||||
#define ARDUINO_AIOTC_TYPES_H_ | ||||||
|
||||||
/****************************************************************************** | ||||||
TYPEDEF | ||||||
******************************************************************************/ | ||||||
|
||||||
typedef enum | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
We don't need and entire int32 to represent the R/W modes |
||||||
{ | ||||||
READ = 0x01, | ||||||
WRITE = 0x02, | ||||||
READWRITE = READ | WRITE | ||||||
} permissionType; | ||||||
|
||||||
enum class ArduinoIoTConnectionStatus | ||||||
{ | ||||||
IDLE, | ||||||
CONNECTING, | ||||||
CONNECTED, | ||||||
DISCONNECTED, | ||||||
RECONNECTING, | ||||||
ERROR, | ||||||
}; | ||||||
|
||||||
enum class ArduinoIoTCloudEvent | ||||||
{ | ||||||
SYNC = 0, CONNECT = 1, DISCONNECT = 2 | ||||||
}; | ||||||
|
||||||
typedef void (*OnCloudEventCallback)(void); | ||||||
|
||||||
typedef void (*ExecCloudEventCallback)(ArduinoIoTCloudEvent); | ||||||
|
||||||
#endif /* ARDUINO_AIOTC_TYPES_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.