Adafruit IO Arduino Library
|
Class that contains functions for interacting with the Adafruit IO Time Service. More...
#include <AdafruitIO_Time.h>
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. | |
Class that contains functions for interacting with the Adafruit IO Time Service.
AdafruitIO_Time::AdafruitIO_Time | ( | AdafruitIO * | io, |
aio_time_format_t | f | ||
) |
Sets up a Adafruit IO Time Service helper.
io | Reference to AdafruitIO. |
f | Adafruit IO time format, either AIO_TIME_SECONDS, AIO_TIME_MILLIS, or AIO_TIME_ISO. |
void AdafruitIO_Time::onMessage | ( | AdafruitIOTimeCallbackType | cb | ) |
Sets up a MQTT message callback.
cb | MQTT callback type. |
|
virtual |
Sets up a MQTT subscription callback. Calls data callback with data.
val | Data from MQTT topic. |
len | Length of MQTT topic data. |
Implements AdafruitIO_MQTT.
char* AdafruitIO_Time::data |
Data sent by Adafruit IO's time service.
aio_time_format_t AdafruitIO_Time::format |
Adafruit IO time format, TIME_SECONDS/TIME_MILLIS/TIME_ISO.