erkin yucel / mbed-os

Dependents:   BLE_file_test BLE_Blink ExternalEncoder

Embed: (wiki syntax)

« Back to documentation index

AbstractNetworkInterface Class Reference

AbstractNetworkInterface Class Reference

Abstract base class for network interfaces. More...

#include <AbstractNetworkInterface.h>

Inherited by AbstractMesh.

Public Member Functions

virtual ~AbstractNetworkInterface ()
 Virtual destructor.
virtual mesh_error_t connect ()=0
 Connect the interface to the network.
virtual mesh_error_t disconnect ()=0
 Disconnect the interface from the network.
virtual bool getOwnIpAddress (char *address, int8_t len)=0
 Read own global IP address.

Detailed Description

Abstract base class for network interfaces.

This is a pure virtual class; it can't instantiated directly, but it provides common functionality for derived classes.

Note! This class will be replaced by connection manager when it is available.

Definition at line 31 of file AbstractNetworkInterface.h.


Constructor & Destructor Documentation

~AbstractNetworkInterface (  ) [virtual]

Virtual destructor.

Definition at line 23 of file AbstractNetworkInterface.cpp.


Member Function Documentation

virtual mesh_error_t connect (  ) [pure virtual]

Connect the interface to the network.

Implemented in AbstractMesh.

virtual mesh_error_t disconnect (  ) [pure virtual]

Disconnect the interface from the network.

Implemented in AbstractMesh.

virtual bool getOwnIpAddress ( char *  address,
int8_t  len 
) [pure 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

Implemented in Mesh6LoWPAN_ND, and MeshThread.