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

Class for interfacing with an Adafruit FONA Ceullar Module. More...

#include <AdafruitIO_FONA.h>

Inheritance diagram for AdafruitIO_FONA:
AdafruitIO

Public Member Functions

 AdafruitIO_FONA (const char *user, const char *key)
 Initializes a new AdafruitIO_FONA instance. More...
 
void setAPN (FONAFlashStringPtr apn, FONAFlashStringPtr username=0, FONAFlashStringPtr password=0)
 Sets Adafruit Fona APN name. More...
 
aio_status_t networkStatus ()
 Returns network connection status. More...
 
const char * connectionType ()
 Returns 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 ()
 Establishes a connection to Adafruit IO.
 
void _disconnect ()
 Disconnects from Adafruit IO and the cellular network.
 

Protected Attributes

uint16_t _mqtt_port = 1883
 
SoftwareSerial * _serial
 
Adafruit_FONA * _fona
 
- 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 an Adafruit FONA Ceullar Module.

Constructor & Destructor Documentation

◆ AdafruitIO_FONA()

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

Initializes a new AdafruitIO_FONA instance.

Parameters
userGRPS APN username
keyGPRS APN password

Member Function Documentation

◆ setAPN()

void AdafruitIO_FONA::setAPN ( FONAFlashStringPtr  apn,
FONAFlashStringPtr  username = 0,
FONAFlashStringPtr  password = 0 
)
inline

Sets Adafruit Fona APN name.

Parameters
apnGPRS APN name.
usernameGPRS APN username.
passwordGRPS APN password.

◆ networkStatus()

aio_status_t AdafruitIO_FONA::networkStatus ( )
inlinevirtual

Returns network connection status.

Returns
Adafruit IO Network status, aio_status_t

Implements AdafruitIO.

◆ connectionType()

const char* AdafruitIO_FONA::connectionType ( )
inlinevirtual

Returns network module type.

Returns
Network module name, "fona"

Implements AdafruitIO.

Member Data Documentation

◆ _mqtt_port

uint16_t AdafruitIO_FONA::_mqtt_port = 1883
protected

Adafruit IO insecure MQTT port.

◆ _serial

SoftwareSerial* AdafruitIO_FONA::_serial
protected

an instance of SoftwareSerial.

◆ _fona

Adafruit_FONA* AdafruitIO_FONA::_fona
protected

an instance of Adafruit_FONA.


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