Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MeshThread Class Reference
6LoWPAN Thread mesh networking class. More...
#include <MeshThread.h>
Inherits AbstractMesh.
Public Types | |
| typedef FunctionPointer1< void, mesh_connection_status_t > | mesh_network_handler_t |
| Typedef for network callback. | |
Public Member Functions | |
| virtual mesh_error_t | init (int8_t registered_device_id, mesh_network_handler_t callbackHandler) |
| Overriding initialization of the base class. | |
| bool | getOwnIpAddress (char *address, int8_t len) |
| Read own global IP address. | |
| virtual mesh_error_t | data_poll_rate_set (uint32_t pollrate) |
| Set device data polling rate to value given in parameter pollrate. | |
| virtual mesh_error_t | connect () |
| Connect interface to the mesh network. | |
| virtual mesh_error_t | disconnect () |
| Disconnect interface from the mesh network. | |
| void | callback (mesh_connection_status_t state) |
| Callback from C-layer. | |
Friends | |
| class | MeshInterfaceFactory |
Detailed Description
6LoWPAN Thread mesh networking class.
Definition at line 26 of file MeshThread.h.
Member Typedef Documentation
typedef FunctionPointer1<void, mesh_connection_status_t> mesh_network_handler_t [inherited] |
Typedef for network callback.
Definition at line 42 of file AbstractMesh.h.
Member Function Documentation
| void callback | ( | mesh_connection_status_t | state ) | [inherited] |
Callback from C-layer.
- Parameters:
-
state state of the network
Definition at line 135 of file AbstractMesh.cpp.
| mesh_error_t connect | ( | ) | [virtual, inherited] |
Connect interface to the mesh network.
- Returns:
- MESH_ERROR_NONE on success.
- MESH_ERROR_PARAM in case of illegal parameters.
- MESH_ERROR_MEMORY in case of memory error.
- MESH_ERROR_STATE if interface is already connected to network.
- MESH_ERROR_UNKNOWN in case of unspecified error.
Implements AbstractNetworkInterface.
Definition at line 80 of file AbstractMesh.cpp.
| mesh_error_t data_poll_rate_set | ( | uint32_t | pollrate ) | [virtual] |
Set device data polling rate to value given in parameter pollrate.
Data polling will be disabled if pollrate value is 0.
- Parameters:
-
pollrate data polling rate in seconds. Setting this to 0 disables data polling.
- Returns:
- MESH_ERROR_NONE on success.
- MESH_ERROR_PARAM in case timeout value is bigger than 864001.
- MESH_ERROR_UNKNOWN in case of other error.
Definition at line 74 of file MeshThread.cpp.
| mesh_error_t DISABLE_GCC_OPT disconnect | ( | ) | [virtual, inherited] |
Disconnect interface from the mesh network.
- Returns:
- MESH_ERROR_NONE on success.
- MESH_ERROR_UNKNOWN in case of error.
Implements AbstractNetworkInterface.
Definition at line 118 of file AbstractMesh.cpp.
| bool getOwnIpAddress | ( | char * | address, |
| int8_t | len | ||
| ) | [virtual] |
Read own global IP address.
- Parameters:
-
address is where the IP address will be copied len is the length of the address buffer, must be at least 40 bytes
- Returns:
- true if address is read successfully, false otherwise
Implements AbstractNetworkInterface.
Definition at line 65 of file MeshThread.cpp.
| mesh_error_t init | ( | int8_t | registered_device_id, |
| mesh_network_handler_t | callbackHandler | ||
| ) | [virtual] |
Overriding initialization of the base class.
Use method init(int8_t, MeshNetworkHandler_t, uint8_t*, char*)
Reimplemented from AbstractMesh.
Definition at line 59 of file MeshThread.cpp.
Generated on Tue Jul 12 2022 18:19:41 by
1.7.2