joey shelton / LED_Demo2

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by joey shelton

Embed: (wiki syntax)

« Back to documentation index

Mesh6LoWPAN_ND Class Reference

Mesh6LoWPAN_ND Class Reference

6LoWPAN ND mesh networking class. More...

#include <Mesh6LoWPAN_ND.h>

Inherits AbstractMesh.

Public Types

typedef FunctionPointer1< void,
mesh_connection_status_t > 
mesh_network_handler_t
 Typedef for network callback.

Public Member Functions

bool getOwnIpAddress (char *address, int8_t len)
 Read own global IP address.
bool getRouterIpAddress (char *address, int8_t len)
 Read border router IP address.
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.

Friends

class MeshInterfaceFactory

Detailed Description

6LoWPAN ND mesh networking class.

Definition at line 26 of file Mesh6LoWPAN_ND.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:
statestate 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 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:
addressis where the IP address will be copied
lenis 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 42 of file Mesh6LoWPAN_ND.cpp.

bool getRouterIpAddress ( char *  address,
int8_t  len 
)

Read border router IP address.

Parameters:
addressis where the IP address will be copied
lenis the length of the address buffer, must be at least 40 bytes
Returns:
true if address is read successfully, false otherwise

Definition at line 51 of file Mesh6LoWPAN_ND.cpp.

mesh_error_t init ( int8_t  registered_device_id,
mesh_network_handler_t  callbackHandler 
) [virtual, inherited]

Initialization of the interface.

Parameters:
registereddevice is physical device registered
callbackHandleris 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.