Adafruit IO Arduino Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AdafruitIO_Ethernet Class Reference

Class for interfacing with the Adafruit Ethernet FeatherWing. More...

#include <AdafruitIO_Ethernet.h>

Inheritance diagram for AdafruitIO_Ethernet:
AdafruitIO

Public Member Functions

 AdafruitIO_Ethernet (const char *user, const char *key)
 Instanciates an Adafruit Ethernet FeatherWing. More...
 
aio_status_t networkStatus ()
 Checks the connection status between the Ethernet FeatherWing and Adafruit IO. More...
 
const char * connectionType ()
 Defines network module type. More...
 
- Public Member Functions inherited from AdafruitIO
 AdafruitIO (const char *user, const char *key)
 Instantiate the AIO object. More...
 
virtual ~AdafruitIO ()
 Destructor to end the AIO object.
 
void connect ()
 Connects to AIO, setting up using parameters set when the class is instantiated.
 
void wifi_disconnect ()
 Disconnects from WiFi.
 
aio_status_t run (uint16_t busywait_ms=0, bool fail_fast=false)
 Must be called frequently to keep AIO connections alive. When called with no arguments run() will try to repair MQTT and WiFi connections before returning. To avoid potentially long timeout delays, sketches can use the busywait_ms and fail_fast arguments to return an imperfect status quickly. The calling sketch will then need to respond appropriately to that status. More...
 
AdafruitIO_Feedfeed (const char *name)
 Create a new AIO feed. More...
 
AdafruitIO_Feedfeed (const char *name, const char *owner)
 Create a new AIO feed. More...
 
AdafruitIO_Groupgroup (const char *name)
 Create a new AIO group. More...
 
AdafruitIO_Dashboarddashboard (const char *name)
 Create a new AIO dashboard. More...
 
AdafruitIO_Timetime (aio_time_format_t format)
 Create a new AIO time. More...
 
const __FlashStringHelper * statusText ()
 Provide status explanation strings. More...
 
aio_status_t status ()
 Status check. More...
 
aio_status_t mqttStatus (bool fail_fast=false)
 Returns MQTT connection status. More...
 
char * boardID ()
 Identify the board. More...
 
const char * boardType ()
 Identify the board type. More...
 
char * version ()
 Identify the software version. More...
 
char * userAgent ()
 Identify the user agent. More...
 

Protected Member Functions

void _connect ()
 Attempts to connect Ethernet FeatherWing to Adafruit IO.
 
void _disconnect ()
 Disconnect the ethernet connection.
 

Protected Attributes

byte _mac [6]
 
EthernetClient * _client
 
- Protected Attributes inherited from AdafruitIO
aio_status_t _status = AIO_IDLE
 
uint32_t _last_ping
 
uint32_t _last_mqtt_connect = 0
 
Adafruit_MQTT * _mqtt
 
HttpClient * _http
 
char _version [10]
 
const char * _host = "io.adafruit.com"
 
uint16_t _mqtt_port = 8883
 
uint16_t _mqtt_eth_port
 
uint16_t _http_port = 443
 
uint16_t _packetread_timeout
 
const char * _username
 
const char * _key
 
char * _err_topic
 
char * _throttle_topic
 
char * _user_agent
 
Adafruit_MQTT_Subscribe * _err_sub
 
Adafruit_MQTT_Subscribe * _throttle_sub
 

Detailed Description

Class for interfacing with the Adafruit Ethernet FeatherWing.

Constructor & Destructor Documentation

◆ AdafruitIO_Ethernet()

AdafruitIO_Ethernet::AdafruitIO_Ethernet ( const char *  user,
const char *  key 
)
inline

Instanciates an Adafruit Ethernet FeatherWing.

Parameters
*userReference to a valid Adafruit IO Username.
*keyReference to a valid Adafruit IO Key.

Member Function Documentation

◆ networkStatus()

aio_status_t AdafruitIO_Ethernet::networkStatus ( )
inlinevirtual

Checks the connection status between the Ethernet FeatherWing and Adafruit IO.

Returns
True if connected to Adafruit IO, otherwise False.

Implements AdafruitIO.

◆ connectionType()

const char* AdafruitIO_Ethernet::connectionType ( )
inlinevirtual

Defines network module type.

Returns
String "ethernet_wing"

Implements AdafruitIO.

Member Data Documentation

◆ _mac

byte AdafruitIO_Ethernet::_mac[6]
protected
Initial value:
= {0xDE, 0xAD, 0xBE,
0xEF, 0xFE, 0xED}

Ethernet FeatherWing MAC Address

◆ _client

EthernetClient* AdafruitIO_Ethernet::_client
protected

Reference to EthernetClient, _client


The documentation for this class was generated from the following file: