joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

WiFiInterface Class Reference

WiFiInterface Class Reference

WiFiInterface class. More...

#include <WiFiInterface.h>

Inherits NetworkInterface.

Public Member Functions

virtual int connect (const char *ssid, const char *pass, nsapi_security_t security=NSAPI_SECURITY_NONE)=0
 Start the interface.
virtual int disconnect ()=0
 Stop the interface.
virtual const char * get_mac_address ()=0
 Get the local MAC address.
virtual const char * get_ip_address ()=0
 Get the local IP address.

Protected Member Functions

virtual NetworkStackget_stack ()=0
 Provide access to the NetworkStack object.

Friends

class Socket
class UDPSocket
class TCPSocket
class TCPServer
class SocketAddress

Detailed Description

WiFiInterface class.

Common interface that is shared between WiFi devices

Definition at line 41 of file WiFiInterface.h.


Member Function Documentation

virtual int connect ( const char *  ssid,
const char *  pass,
nsapi_security_t  security = NSAPI_SECURITY_NONE 
) [pure virtual]

Start the interface.

Attempts to connect to a WiFi network. If passphrase is invalid, NSAPI_ERROR_AUTH_ERROR is returned.

Parameters:
ssidName of the network to connect to
passSecurity passphrase to connect to the network
securityType of encryption for connection
Returns:
0 on success, negative error code on failure
virtual int disconnect (  ) [pure virtual]

Stop the interface.

Returns:
0 on success, negative error code on failure
virtual const char* get_ip_address (  ) [pure virtual, inherited]

Get the local IP address.

Returns:
Null-terminated representation of the local IP address or null if not yet connected

Implemented in EthernetInterface.

virtual const char* get_mac_address (  ) [pure virtual]

Get the local MAC address.

Returns:
Null-terminated representation of the local MAC address
virtual NetworkStack* get_stack (  ) [protected, pure virtual, inherited]

Provide access to the NetworkStack object.

Returns:
The underlying NetworkStack object

Implemented in EthernetInterface.