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

#include <layout.hpp>

Inheritance diagram for painlessmesh::layout::Neighbour:
Inheritance graph
[legend]
Collaboration diagram for painlessmesh::layout::Neighbour:
Collaboration graph
[legend]

Public Member Functions

bool validSubs (protocol::NodeTree tree)
 
bool updateSubs (protocol::NodeTree tree)
 
protocol::NodeSyncRequest request (NodeTree &&layout)
 
protocol::NodeSyncReply reply (NodeTree &&layout)
 
- Public Member Functions inherited from painlessmesh::protocol::NodeTree
 NodeTree ()
 
virtual ~NodeTree ()=default
 
 NodeTree (uint32_t nodeID, bool iAmRoot, bool timeAuthority=false)
 
 NodeTree (JsonObject jsonObj)
 
JsonObject addTo (JsonObject &&jsonObj) const
 
bool operator== (const NodeTree &b) const
 
bool operator!= (const NodeTree &b) const
 
TSTRING toString (bool pretty=false)
 
size_t jsonObjectSize () const
 
void clear ()
 
- Public Member Functions inherited from painlessmesh::protocol::PackageInterface
virtual ~PackageInterface ()=default
 

Public Attributes

uint32_t presented = 0
 
- Public Attributes inherited from painlessmesh::protocol::NodeTree
uint32_t nodeId = 0
 
bool root = false
 
bool hasTimeAuthority = false
 
std::list< NodeTree > subs
 

Member Function Documentation

◆ reply()

protocol::NodeSyncReply painlessmesh::layout::Neighbour::reply ( NodeTree &&  layout)
inline

Create a reply

◆ request()

protocol::NodeSyncRequest painlessmesh::layout::Neighbour::request ( NodeTree &&  layout)
inline

Create a request

◆ updateSubs()

bool painlessmesh::layout::Neighbour::updateSubs ( protocol::NodeTree  tree)
inline

Update subs with the new subs

Parameters
treeThe possible new tree with this node as base

Generally one probably wants to call validSubs before calling this function.

Returns
Whether we adopted the new tree

◆ validSubs()

bool painlessmesh::layout::Neighbour::validSubs ( protocol::NodeTree  tree)
inline

Is the passed nodesync valid

If not then the caller of this function should probably disconnect this neighbour.

Member Data Documentation

◆ presented

uint32_t painlessmesh::layout::Neighbour::presented = 0

fingerprint() of the tree this neighbour presented last, 0 before its first sync. A sync that restates it carries nothing the cached tree does not already reflect, however the cache has since been pruned.


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