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.
Fork of mbed-os by
AbstractMesh Class Reference
Abstract Mesh networking interface. More...
#include <AbstractMesh.h>
Inherits AbstractNetworkInterface.
Inherited by Mesh6LoWPAN_ND, and MeshThread.
Public Types | |
typedef FunctionPointer1< void, mesh_connection_status_t > | mesh_network_handler_t |
Typedef for network callback. | |
Public Member Functions | |
AbstractMesh (mesh_network_type_t type) | |
Constructor. | |
virtual mesh_error_t | init (int8_t registered_device_id, mesh_network_handler_t callbackHandler) |
Initialization of the interface. | |
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. | |
virtual bool | getOwnIpAddress (char *address, int8_t len)=0 |
Read own global IP address. |
Detailed Description
Abstract Mesh networking interface.
This class can't be instantiated directly.
Definition at line 33 of file AbstractMesh.h.
Member Typedef Documentation
typedef FunctionPointer1<void, mesh_connection_status_t> mesh_network_handler_t |
Typedef for network callback.
Definition at line 42 of file AbstractMesh.h.
Constructor & Destructor Documentation
AbstractMesh | ( | mesh_network_type_t | type ) |
Member Function Documentation
void callback | ( | mesh_connection_status_t | state ) |
Callback from C-layer.
- Parameters:
-
state state of the network
Definition at line 135 of file AbstractMesh.cpp.
mesh_error_t connect | ( | ) | [virtual] |
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 DISABLE_GCC_OPT disconnect | ( | ) | [virtual] |
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.
virtual bool getOwnIpAddress | ( | char * | address, |
int8_t | len | ||
) | [pure virtual, inherited] |
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
Implemented in Mesh6LoWPAN_ND, and MeshThread.
mesh_error_t init | ( | int8_t | registered_device_id, |
mesh_network_handler_t | callbackHandler | ||
) | [virtual] |
Initialization of the interface.
- Parameters:
-
registered device is physical device registered callbackHandler is callback that is called when network state changes
- Returns:
- MESH_ERROR_NONE on success.
- MESH_ERROR_PARAM when input parameters are illegal (also in case when RF device is already associated to other interface)
- MESH_ERROR_MEMORY in case of memory error
- MESH_ERROR_UNKNOWN in other error cases
Reimplemented in MeshThread.
Definition at line 49 of file AbstractMesh.cpp.
Generated on Tue Jul 12 2022 13:16:38 by
