|
Adafruit IO Arduino Library
|
Class for interacting with Adafruit IO Grouped Feeds https://io.adafruit.com/api/docs/mqtt.html#group-topics. More...
#include <AdafruitIO_Group.h>
Public Member Functions | |
| AdafruitIO_Group (AdafruitIO *io, const char *name) | |
| Creates a new instance of an Adafruit IO Group. More... | |
| ~AdafruitIO_Group () | |
| Adafruit IO Group destructor. | |
| void | set (const char *feed, char *value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, bool value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, String value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, int value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, unsigned int value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, long value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, unsigned long value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, float value) |
| Sets value of Adafruit IO Group. More... | |
| void | set (const char *feed, double value) |
| Sets value of Adafruit IO Group. More... | |
| bool | save () |
| Updates value of Adafruit IO Group. More... | |
| bool | get () |
| Publishes null value ("\0") to Adafruit IO Group https://io.adafruit.com/api/docs/mqtt.html#retained-values. More... | |
| void | setLocation (double lat=0, double lon=0, double ele=0) |
| Sets up locational metadata. More... | |
| bool | exists () |
| Checks if Adafruit IO Group exists. https://io.adafruit.com/api/docs/#get-group. More... | |
| bool | create () |
| Creates new Adafruit IO Group. https://io.adafruit.com/api/docs/#create-group. More... | |
| void | onMessage (AdafruitIODataCallbackType cb) |
| Sets up Adafruit IO callback to monitor incoming new data in group. More... | |
| void | onMessage (const char *feed, AdafruitIODataCallbackType cb) |
| Sets up Adafruit IO callback to monitor incoming new data in group's feed, feed. More... | |
| void | subCallback (char *val, uint16_t len) |
| Checks for new value within Adafruit IO group. More... | |
| void | call (AdafruitIO_Data *d) |
| Adafruit IO Group subscription function callback. More... | |
| AdafruitIO_Data * | getFeed (const char *feed) |
| Obtains data from feed within group. More... | |
Public Attributes | |
| const char * | name |
| const char * | owner |
| AdafruitIO_Data * | data |
Friends | |
| class | AdafruitIO_Group |
| AdafruitIO_Group addition. | |
Class for interacting with Adafruit IO Grouped Feeds https://io.adafruit.com/api/docs/mqtt.html#group-topics.
| AdafruitIO_Group::AdafruitIO_Group | ( | AdafruitIO * | io, |
| const char * | n | ||
| ) |
Creates a new instance of an Adafruit IO Group.
| *io | Reference to AdafruitIO. |
| *n | Valid group name. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| char * | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| bool | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| String | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| int | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| unsigned int | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| long | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| unsigned long | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| float | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| void AdafruitIO_Group::set | ( | const char * | feed, |
| double | value | ||
| ) |
Sets value of Adafruit IO Group.
| feed | Adafruit IO feed name. |
| value | Adafruit IO feed value. |
| bool AdafruitIO_Group::save | ( | ) |
Updates value of Adafruit IO Group.
| bool AdafruitIO_Group::get | ( | ) |
Publishes null value ("\0") to Adafruit IO Group https://io.adafruit.com/api/docs/mqtt.html#retained-values.
| void AdafruitIO_Group::setLocation | ( | double | lat = 0, |
| double | lon = 0, |
||
| double | ele = 0 |
||
| ) |
Sets up locational metadata.
| lat | Desired latitude. |
| lon | Desired longitude. |
| ele | Desired elevation. |
| bool AdafruitIO_Group::exists | ( | ) |
Checks if Adafruit IO Group exists. https://io.adafruit.com/api/docs/#get-group.
| bool AdafruitIO_Group::create | ( | ) |
Creates new Adafruit IO Group. https://io.adafruit.com/api/docs/#create-group.
| void AdafruitIO_Group::onMessage | ( | AdafruitIODataCallbackType | cb | ) |
Sets up Adafruit IO callback to monitor incoming new data in group.
| cb | An function to be called if group receives new data. |
| void AdafruitIO_Group::onMessage | ( | const char * | feed, |
| AdafruitIODataCallbackType | cb | ||
| ) |
Sets up Adafruit IO callback to monitor incoming new data in group's feed, feed.
| feed | An Adafruit IO Feed within Group. |
| cb | An function to be called if group receives new data. |
|
virtual |
Checks for new value within Adafruit IO group.
| val | Value to send to Adafruit IO group. |
| len | Length of Adafruit IO value. |
Implements AdafruitIO_MQTT.
| void AdafruitIO_Group::call | ( | AdafruitIO_Data * | d | ) |
Adafruit IO Group subscription function callback.
| d | Name of feed within group. |
| AdafruitIO_Data * AdafruitIO_Group::getFeed | ( | const char * | feed | ) |
Obtains data from feed within group.
| feed | Existing Adafruit IO Feed. |
| const char* AdafruitIO_Group::name |
Adafruit IO group name.
| const char* AdafruitIO_Group::owner |
Adafruit IO username of group owner.
| AdafruitIO_Data* AdafruitIO_Group::data |
Adafruit IO data record.
1.8.13