|
Adafruit IO Arduino Library
|
Class that provides methods for interfacing with Adafruit IO feed topics. https://io.adafruit.com/api/docs/mqtt.html#mqtt-topics. More...
#include <AdafruitIO_Feed.h>
Public Member Functions | |
| AdafruitIO_Feed (AdafruitIO *io, const char *name) | |
| Creates a new instance of an Adafruit IO Feed. More... | |
| AdafruitIO_Feed (AdafruitIO *io, const char *name, const char *owner) | |
| Creates a new instance of an Adafruit IO Feed. More... | |
| ~AdafruitIO_Feed () | |
| Adafruit IO Feed destructor. | |
| bool | save (char *value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (bool value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (String value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (int value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (unsigned int value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (long value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (unsigned long value, double lat=0, double lon=0, double ele=0) |
| Updates Adafruit IO Feed. More... | |
| bool | save (float value, double lat=0, double lon=0, double ele=0, int precision=6) |
| Updates Adafruit IO Feed. More... | |
| bool | save (double value, double lat=0, double lon=0, double ele=0, int precision=6) |
| Updates Adafruit IO Feed. More... | |
| bool | get () |
| Publishes a null character to an Adafruit IO /get topic. https://io.adafruit.com/api/docs/mqtt.html#using-the-get-topic. More... | |
| bool | exists () |
| Checks if Adafruit IO Feed exists and belongs to username. https://io.adafruit.com/api/docs/#get-feed. More... | |
| bool | create () |
| Creates a new Adafruit IO Feed https://io.adafruit.com/api/docs/#create-feed. More... | |
| void | setLocation (double lat, double lon, double ele=0) |
| Sets Adafruit IO feed location metadata. More... | |
| void | onMessage (AdafruitIODataCallbackType cb) |
| Creates a new onMessage callback. More... | |
| void | subCallback (char *val, uint16_t len) |
| Calls _datacallback if new data is avaliable on feed. More... | |
| AdafruitIO_Data * | lastValue () |
| Retrieves the most recent value published to a feed. https://io.adafruit.com/api/docs/mqtt.html#using-the-get-topic. More... | |
Public Attributes | |
| const char * | name |
| const char * | owner |
| AdafruitIO_Data * | data |
Friends | |
| class | AdafruitIO_Feed |
| AdafruitIO_Feed addition. | |
Class that provides methods for interfacing with Adafruit IO feed topics. https://io.adafruit.com/api/docs/mqtt.html#mqtt-topics.
| AdafruitIO_Feed::AdafruitIO_Feed | ( | AdafruitIO * | io, |
| const char * | n | ||
| ) |
Creates a new instance of an Adafruit IO Feed.
| *io | Reference to AdafruitIO. |
| *n | Valid feed name. |
| AdafruitIO_Feed::AdafruitIO_Feed | ( | AdafruitIO * | io, |
| const char * | n, | ||
| const char * | un | ||
| ) |
Creates a new instance of an Adafruit IO Feed.
| *io | Reference to AdafruitIO. |
| *n | Valid feed name. |
| *un | Feed owner's Adafruit IO username. |
| bool AdafruitIO_Feed::save | ( | char * | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | bool | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | String | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | int | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | unsigned int | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | long | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | unsigned long | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| bool AdafruitIO_Feed::save | ( | float | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0, |
||
| int | precision = 6 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| precision | Desired amount of decimal precision. |
| bool AdafruitIO_Feed::save | ( | double | value, |
| double | lat = 0, |
||
| double | lon = 0, |
||
| double | ele = 0, |
||
| int | precision = 6 |
||
| ) |
Updates Adafruit IO Feed.
| value | Value to publish to feed. |
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| precision | Desired amount of decimal precision. |
| bool AdafruitIO_Feed::get | ( | ) |
Publishes a null character to an Adafruit IO /get topic. https://io.adafruit.com/api/docs/mqtt.html#using-the-get-topic.
| bool AdafruitIO_Feed::exists | ( | ) |
Checks if Adafruit IO Feed exists and belongs to username. https://io.adafruit.com/api/docs/#get-feed.
| bool AdafruitIO_Feed::create | ( | ) |
Creates a new Adafruit IO Feed https://io.adafruit.com/api/docs/#create-feed.
| void AdafruitIO_Feed::setLocation | ( | double | lat, |
| double | lon, | ||
| double | ele = 0 |
||
| ) |
Sets Adafruit IO feed location metadata.
| lat | Latitude metadata. |
| lon | Longitudinal metadata. |
| ele | Elevation metadata. |
| void AdafruitIO_Feed::onMessage | ( | AdafruitIODataCallbackType | cb | ) |
Creates a new onMessage callback.
| cb | Adafruit IO callback. |
|
virtual |
Calls _datacallback if new data is avaliable on feed.
| val | Value to publish to Adafruit IO feed. |
| len | Feed length. |
Implements AdafruitIO_MQTT.
| AdafruitIO_Data * AdafruitIO_Feed::lastValue | ( | ) |
Retrieves the most recent value published to a feed. https://io.adafruit.com/api/docs/mqtt.html#using-the-get-topic.
Last value sent to Adafruit IO feed.
| const char* AdafruitIO_Feed::name |
Adafruit IO feed name.
| const char* AdafruitIO_Feed::owner |
Adafruit IO feed owner.
| AdafruitIO_Data* AdafruitIO_Feed::data |
Adafruit IO feed data record.
1.8.13