... | ... | @@ -25,6 +25,10 @@ Initialize the mesh network. This routine does the following things. |
|
|
`port` = the TCP port that you want the mesh server to run on. Defaults to 5555 if not specified.
|
|
|
[`connectMode`](https://gitlab.com/BlackEdder/painlessMesh/wikis/connect-mode:-ap_only,-sta_only,-sta_ap-mode) = switch between AP_ONLY, STA_ONLY and STA_AP (default) mode
|
|
|
|
|
|
### void painlessMesh::stop()
|
|
|
|
|
|
Stop the node. This will cause the node to disconnect from all other nodes and stop/sending messages.
|
|
|
|
|
|
### void painlessMesh::update( void )
|
|
|
|
|
|
Add this to your loop() function
|
... | ... | @@ -76,7 +80,7 @@ This fires when a time delay masurement response is received, after a request wa |
|
|
|
|
|
`nodeId` The node that originated response.
|
|
|
|
|
|
`delay` One way network trip delay in nanoseconds.
|
|
|
`delay` One way network trip delay in microseconds.
|
|
|
|
|
|
### bool painlessMesh::sendBroadcast( String &msg)
|
|
|
|
... | ... | @@ -112,4 +116,4 @@ Nodes try to keep a common time base synchronizing to each other using [an SNTP |
|
|
|
|
|
Sends a node a packet to measure network trip delay to that node. Returns true if nodeId is connected to the mesh, false otherwise. After calling this function, user program have to wait to the response in the form of a callback specified by `void painlessMesh::onNodeDelayReceived(nodeDelayCallback_t onDelayReceived)`.
|
|
|
|
|
|
nodeDelayCallback_t is a funtion in the form of `void (uint32_t nodeId, int32_t delay)`. |
|
|
\ No newline at end of file |
|
|
nodeDelayCallback_t is a funtion in the form of `void (uint32_t nodeId, int32_t delay)`. |