Adafruit IO Arduino Library
Public Member Functions | Public Attributes | Friends | List of all members
AdafruitIO_Time Class Reference

Class that contains functions for interacting with the Adafruit IO Time Service. More...

#include <AdafruitIO_Time.h>

Inheritance diagram for AdafruitIO_Time:
AdafruitIO_MQTT

Public Member Functions

 AdafruitIO_Time (AdafruitIO *io, aio_time_format_t f)
 Sets up a Adafruit IO Time Service helper. More...
 
 ~AdafruitIO_Time ()
 Deconstructor for Adafruit IO time service.
 
void onMessage (AdafruitIOTimeCallbackType cb)
 Sets up a MQTT message callback. More...
 
void subCallback (char *val, uint16_t len)
 Sets up a MQTT subscription callback. Calls data callback with data. More...
 

Public Attributes

char * data
 
aio_time_format_t format
 

Friends

class AdafruitIO_Time
 AdafruitIO_Time addition.
 

Detailed Description

Class that contains functions for interacting with the Adafruit IO Time Service.

Constructor & Destructor Documentation

◆ AdafruitIO_Time()

AdafruitIO_Time::AdafruitIO_Time ( AdafruitIO io,
aio_time_format_t  f 
)

Sets up a Adafruit IO Time Service helper.

Parameters
ioReference to AdafruitIO.
fAdafruit IO time format, either AIO_TIME_SECONDS, AIO_TIME_MILLIS, or AIO_TIME_ISO.

Member Function Documentation

◆ onMessage()

void AdafruitIO_Time::onMessage ( AdafruitIOTimeCallbackType  cb)

Sets up a MQTT message callback.

Parameters
cbMQTT callback type.

◆ subCallback()

void AdafruitIO_Time::subCallback ( char *  val,
uint16_t  len 
)
virtual

Sets up a MQTT subscription callback. Calls data callback with data.

Parameters
valData from MQTT topic.
lenLength of MQTT topic data.

Implements AdafruitIO_MQTT.

Member Data Documentation

◆ data

char* AdafruitIO_Time::data

Data sent by Adafruit IO's time service.

◆ format

aio_time_format_t AdafruitIO_Time::format

Adafruit IO time format, TIME_SECONDS/TIME_MILLIS/TIME_ISO.


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