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::protocol::TimeSync Class Reference

#include <protocol.hpp>

Inheritance diagram for painlessmesh::protocol::TimeSync:
Inheritance graph
[legend]
Collaboration diagram for painlessmesh::protocol::TimeSync:
Collaboration graph
[legend]

Public Member Functions

 TimeSync ()
 
 TimeSync (uint32_t fromID, uint32_t destID)
 
 TimeSync (uint32_t fromID, uint32_t destID, uint32_t t0)
 
 TimeSync (uint32_t fromID, uint32_t destID, uint32_t t0, uint32_t t1)
 
 TimeSync (uint32_t fromID, uint32_t destID, uint32_t t0, uint32_t t1, uint32_t t2)
 
 TimeSync (JsonObject jsonObj)
 
JsonObject addTo (JsonObject &&jsonObj) const
 
void reply (uint32_t newT0)
 
void reply (uint32_t newT1, uint32_t newT2)
 
size_t jsonObjectSize () const
 
- Public Member Functions inherited from painlessmesh::protocol::PackageInterface
virtual ~PackageInterface ()=default
 

Public Attributes

int type = TIME_SYNC
 
uint32_t dest = 0
 
uint32_t from = 0
 
time_sync_msg_t msg
 

Detailed Description

TimeSync package

Constructor & Destructor Documentation

◆ TimeSync() [1/6]

painlessmesh::protocol::TimeSync::TimeSync ( )
inline

◆ TimeSync() [2/6]

painlessmesh::protocol::TimeSync::TimeSync ( uint32_t  fromID,
uint32_t  destID 
)
inline

◆ TimeSync() [3/6]

painlessmesh::protocol::TimeSync::TimeSync ( uint32_t  fromID,
uint32_t  destID,
uint32_t  t0 
)
inline

◆ TimeSync() [4/6]

painlessmesh::protocol::TimeSync::TimeSync ( uint32_t  fromID,
uint32_t  destID,
uint32_t  t0,
uint32_t  t1 
)
inline

◆ TimeSync() [5/6]

painlessmesh::protocol::TimeSync::TimeSync ( uint32_t  fromID,
uint32_t  destID,
uint32_t  t0,
uint32_t  t1,
uint32_t  t2 
)
inline

◆ TimeSync() [6/6]

painlessmesh::protocol::TimeSync::TimeSync ( JsonObject  jsonObj)
inline

Member Function Documentation

◆ addTo()

JsonObject painlessmesh::protocol::TimeSync::addTo ( JsonObject &&  jsonObj) const
inlinevirtual

◆ jsonObjectSize()

size_t painlessmesh::protocol::TimeSync::jsonObjectSize ( ) const
inlinevirtual

◆ reply() [1/2]

void painlessmesh::protocol::TimeSync::reply ( uint32_t  newT0)
inline

Create a reply to the current message with the new time set

◆ reply() [2/2]

void painlessmesh::protocol::TimeSync::reply ( uint32_t  newT1,
uint32_t  newT2 
)
inline

Create a reply to the current message with the new time set

Member Data Documentation

◆ dest

uint32_t painlessmesh::protocol::TimeSync::dest = 0

◆ from

uint32_t painlessmesh::protocol::TimeSync::from = 0

◆ msg

time_sync_msg_t painlessmesh::protocol::TimeSync::msg

◆ type

int painlessmesh::protocol::TimeSync::type = TIME_SYNC

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