AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
Classes | Functions
painlessmesh::ntp Namespace Reference

Classes

class  MeshTime
 

Functions

int32_t clockOffset (uint32_t time0, uint32_t time1, uint32_t time2, uint32_t time3)
 
int32_t tripDelay (uint32_t time0, uint32_t time1, uint32_t time2, uint32_t time3)
 
bool adopt (protocol::NodeTree mesh, protocol::NodeTree connection)
 
template<class T >
void initTimeSync (protocol::NodeTree mesh, std::shared_ptr< T > connection, uint32_t nodeTime)
 
template<class T , class U >
void handleTimeSync (T &mesh, painlessmesh::protocol::TimeSync timeSync, std::shared_ptr< U > conn, uint32_t receivedAt)
 
template<class T , class U >
void handleTimeDelay (T &mesh, painlessmesh::protocol::TimeDelay timeDelay, std::shared_ptr< U > conn, uint32_t receivedAt)
 
template<class T , typename U >
void addPackageCallback (callback::MeshPackageCallbackList< U > &callbackList, T &mesh)
 

Function Documentation

◆ addPackageCallback()

template<class T , typename U >
void painlessmesh::ntp::addPackageCallback ( callback::MeshPackageCallbackList< U > &  callbackList,
T &  mesh 
)

◆ adopt()

bool painlessmesh::ntp::adopt ( protocol::NodeTree  mesh,
protocol::NodeTree  connection 
)
inline

◆ clockOffset()

int32_t painlessmesh::ntp::clockOffset ( uint32_t  time0,
uint32_t  time1,
uint32_t  time2,
uint32_t  time3 
)
inline

Calculate the offset of the local clock using the ntp algorithm

See ntp overview for more information

◆ handleTimeDelay()

template<class T , class U >
void painlessmesh::ntp::handleTimeDelay ( T &  mesh,
painlessmesh::protocol::TimeDelay  timeDelay,
std::shared_ptr< U >  conn,
uint32_t  receivedAt 
)

◆ handleTimeSync()

template<class T , class U >
void painlessmesh::ntp::handleTimeSync ( T &  mesh,
painlessmesh::protocol::TimeSync  timeSync,
std::shared_ptr< U >  conn,
uint32_t  receivedAt 
)

◆ initTimeSync()

template<class T >
void painlessmesh::ntp::initTimeSync ( protocol::NodeTree  mesh,
std::shared_ptr< T >  connection,
uint32_t  nodeTime 
)

◆ tripDelay()

int32_t painlessmesh::ntp::tripDelay ( uint32_t  time0,
uint32_t  time1,
uint32_t  time2,
uint32_t  time3 
)
inline

Calculate the time it took to get reply from other node

See ntp algorithm for more information