AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
painlessmesh::plugin::ota::Announce Class Reference

#include <ota.hpp>

Inheritance diagram for painlessmesh::plugin::ota::Announce:
Inheritance graph
[legend]
Collaboration diagram for painlessmesh::plugin::ota::Announce:
Collaboration graph
[legend]

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Announce() [1/3]

painlessmesh::plugin::ota::Announce::Announce ( )
inline

◆ Announce() [2/3]

painlessmesh::plugin::ota::Announce::Announce ( JsonObject  jsonObj)
inline

◆ Announce() [3/3]

painlessmesh::plugin::ota::Announce::Announce ( int  type,
router::Type  routing 
)
inlineprotected

Member Function Documentation

◆ addTo()

JsonObject painlessmesh::plugin::ota::Announce::addTo ( JsonObject &&  jsonObj) const
inlinevirtual

◆ jsonObjectSize()

size_t painlessmesh::plugin::ota::Announce::jsonObjectSize ( ) const
inlinevirtual

Member Data Documentation

◆ broadcasted

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.

◆ compressed

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.

◆ forced

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.

◆ hardware

TSTRING painlessmesh::plugin::ota::Announce::hardware

◆ md5

TSTRING painlessmesh::plugin::ota::Announce::md5

◆ noPart

size_t painlessmesh::plugin::ota::Announce::noPart = 0

◆ role

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.


The documentation for this class was generated from the following file: