Station API

Dependents:   GMCStation

Embed: (wiki syntax)

« Back to documentation index

Ether Class Reference

A wrapper class for EthernetNetIf to create an instance from a config file. More...

#include <Ether.h>

Public Member Functions

 Ether (bool verbose=false)
 creates Ether instance
 Ether (IpAddr ip, IpAddr subnet, IpAddr gateway, IpAddr dns, bool verbose=false)
 creates Ether instance
void setup ()
 sets up Ethernet interface
bool isActive ()
 returns Ethernet status
char * getIpAddress ()
 returns its IP address in bytes

Static Public Member Functions

static Ether create (IpAddr ip, IpAddr subnet, IpAddr gateway, IpAddr dns, bool verbose=false)
 creates Ether instance
static Ether create (char *filename=0, bool verbose=false)
 creates Ether instance

Detailed Description

A wrapper class for EthernetNetIf to create an instance from a config file.

Definition at line 29 of file Ether.h.


Constructor & Destructor Documentation

Ether ( bool  verbose = false )

creates Ether instance

Parameters:
verboseif true display debug info

Definition at line 36 of file Ether.h.

Ether ( IpAddr  ip,
IpAddr  subnet,
IpAddr  gateway,
IpAddr  dns,
bool  verbose = false 
)

creates Ether instance

Parameters:
ipIP address
subnetsubnet mask
gatewaygateway address
dnsDNS server address
verboseif true display debug info

Definition at line 49 of file Ether.h.


Member Function Documentation

static Ether create ( IpAddr  ip,
IpAddr  subnet,
IpAddr  gateway,
IpAddr  dns,
bool  verbose = false 
) [static]

creates Ether instance

Parameters:
ipIP address
subnetsubnet mask
gatewaygateway address
dnsDNS server address
verboseif true display debug info

Definition at line 62 of file Ether.h.

static Ether create ( char *  filename = 0,
bool  verbose = false 
) [static]

creates Ether instance

Parameters:
filenameconfiguration file containing IP address, subnet mask, gateway and DNS address
verboseif true display debug info

Definition at line 72 of file Ether.h.

char* getIpAddress (  )

returns its IP address in bytes

Returns:
IP address in byte array

Definition at line 123 of file Ether.h.

bool isActive (  )

returns Ethernet status

Returns:
true if setup succeeded

Definition at line 114 of file Ether.h.

void setup (  )

sets up Ethernet interface

Definition at line 101 of file Ether.h.