29
29
#define ESP32_GPIO0 -1 // Not connected
30
30
#endif
31
31
32
+ /* ***************************************************************************/
33
+ /* !
34
+ @brief Class that stores functions for interacting with AirLift Devices
35
+ */
36
+ /* ***************************************************************************/
32
37
class AdafruitIO_AIRLIFT : public AdafruitIO {
33
38
34
39
public:
40
+ /* *************************************************************************/
41
+ /* !
42
+ @brief Initializes the Adafruit IO class for AirLift devices.
43
+ @param user
44
+ A reference to the Adafruit IO user, shared by AdafruitIO.
45
+ @param key
46
+ A reference to the Adafruit IO Key, shared by AdafruitIO.
47
+ @param ssid
48
+ A reference to the WiFi network SSID.
49
+ @param pass
50
+ A reference to the WiFi network password.
51
+ */
52
+ /* *************************************************************************/
35
53
AdafruitIO_AIRLIFT (const char *user, const char *key, const char *ssid, const char *pass):AdafruitIO(user, key)
36
54
{
37
55
_ssid = ssid;
@@ -42,6 +60,11 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
42
60
_http = new HttpClient (*_http_client, _host, _http_port);
43
61
}
44
62
63
+ /* *************************************************************************/
64
+ /* !
65
+ @brief Destructor for the Adafruit IO AirLift class.
66
+ */
67
+ /* *************************************************************************/
45
68
~AdafruitIO_AIRLIFT ()
46
69
{
47
70
if (_mqtt_client)
@@ -54,6 +77,12 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
54
77
delete _http;
55
78
}
56
79
80
+ /* *******************************************************/
81
+ /* !
82
+ @brief Returns the network status of an AirLift module.
83
+ @return aio_status_t
84
+ */
85
+ /* *******************************************************/
57
86
aio_status_t networkStatus ()
58
87
{
59
88
switch (WiFi.status ())
@@ -69,22 +98,30 @@ class AdafruitIO_AIRLIFT : public AdafruitIO {
69
98
}
70
99
}
71
100
101
+ /* ****************************************************************/
102
+ /* !
103
+ @brief Returns the type of network connection used by AdafruitIO.
104
+ @return AIRLIFT
105
+ */
106
+ /* ****************************************************************/
72
107
const char *connectionType ()
73
108
{
74
109
return " AIRLIFT" ;
75
110
}
76
111
77
- // aio_status_t networkStatus();
78
- // const char* connectionType();
79
-
80
112
protected:
81
- // void _connect();
82
113
const char *_ssid;
83
114
const char *_pass;
84
115
85
116
WiFiSSLClient *_http_client;
86
117
WiFiSSLClient *_mqtt_client;
87
118
119
+ /* *************************************************************************/
120
+ /* !
121
+ @brief Attempts to establish a WiFi connection with the wireless network,
122
+ given _ssid and _pass from the AdafruitIO_AIRLIFT constructor.
123
+ */
124
+ /* *************************************************************************/
88
125
void _connect ()
89
126
{
90
127
// for breakouts, check if the pins would be externally defined
0 commit comments