|
AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
|
#include <ota.hpp>


Public Member Functions | |
| Announce () | |
| Announce (JsonObject jsonObj) | |
| JsonObject | addTo (JsonObject &&jsonObj) const |
| size_t | jsonObjectSize () const |
Public Member Functions inherited from painlessmesh::plugin::BroadcastPackage | |
| BroadcastPackage (int type) | |
| BroadcastPackage (JsonObject jsonObj) | |
| JsonObject | addTo (JsonObject &&jsonObj) const |
Public Member Functions inherited from painlessmesh::protocol::PackageInterface | |
| virtual | ~PackageInterface ()=default |
Public Attributes | |
| TSTRING | md5 |
| TSTRING | hardware |
| TSTRING | role |
| The type of node the firmware is meant for. | |
| bool | forced = false |
| bool | broadcasted = false |
| bool | compressed = false |
| size_t | noPart = 0 |
Public Attributes inherited from painlessmesh::plugin::BroadcastPackage | |
| uint32_t | from = 0 |
| router::Type | routing = router::BROADCAST |
| int | type = 0 |
| int | noJsonFields = 3 |
Protected Member Functions | |
| Announce (int type, router::Type routing) | |
Package used by the firmware distribution node to announce new version available
This is based on the general BroadcastPackage to ensure it is being broadcasted. It is possible to define a Announce::role, which defines the node role the firmware is meant for.
The package type/identifier is set to 10.
|
inline |
|
inline |
|
inlineprotected |
|
inlinevirtual |
Implements painlessmesh::protocol::PackageInterface.
Reimplemented in painlessmesh::plugin::ota::DataRequest, and painlessmesh::plugin::ota::Data.
|
inlinevirtual |
Implements painlessmesh::protocol::PackageInterface.
Reimplemented in painlessmesh::plugin::ota::DataRequest, and painlessmesh::plugin::ota::Data.
| bool painlessmesh::plugin::ota::Announce::broadcasted = false |
Receive broadcast chunks. The default behavior is to have each node request and receive each of its firwmare payload chunks, however this can in some cases create a lot of additional network traffic. If broadcasted is true, the root node will act on behalf of all other nodes in leading the request for packets.
| bool painlessmesh::plugin::ota::Announce::compressed = false |
Enable firmware compression to reduce transfer time and bandwidth.
When compressed is true, the firmware data will be transmitted in compressed form, reducing network bandwidth usage by 40-60% typically. Nodes will decompress the data during flash write.
| bool painlessmesh::plugin::ota::Announce::forced = false |
Force an update even if the node already has this firmware version
Mainly usefull when testing updates etc.
| TSTRING painlessmesh::plugin::ota::Announce::hardware |
| TSTRING painlessmesh::plugin::ota::Announce::md5 |
| size_t painlessmesh::plugin::ota::Announce::noPart = 0 |
| TSTRING painlessmesh::plugin::ota::Announce::role |
The type of node the firmware is meant for.
Nodes can fulfill different roles, which require specific firmware. E.g a node can be a sensor and therefore needs the firmware meant for sensor nodes. This allows one to set the type of node (role) this firmware is aimed at.
Note that the role should not contain underscores or dots.