Skip to content

Commit a8b7510

Browse files
committed
add connection type to sub classes
1 parent f9ffd49 commit a8b7510

11 files changed

+35
-0
lines changed

src/AdafruitIO.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class AdafruitIO {
5757

5858
char* boardID();
5959
const char* boardType();
60+
virtual const char* connectionType() = 0;
6061

6162
protected:
6263
virtual void _connect() = 0;

src/AdafruitIO_Ethernet.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ class AdafruitIO_Ethernet : public AdafruitIO {
5151
return _status;
5252
}
5353

54+
const char* connectionType()
55+
{
56+
return "ethernet_wing";
57+
}
58+
5459
protected:
5560
byte _mac[6] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
5661
uint16_t _port = 1883;

src/AdafruitIO_FONA.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ class AdafruitIO_FONA : public AdafruitIO {
6868
return AIO_NET_CONNECTED;
6969
}
7070

71+
const char* connectionType()
72+
{
73+
return "fona";
74+
}
75+
7176
protected:
7277
uint16_t _mqtt_port = 1883;
7378

src/wifi/AdafruitIO_ESP8266.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ aio_status_t AdafruitIO_ESP8266::networkStatus()
6565

6666
}
6767

68+
const char* AdafruitIO_ESP8266::connectionType()
69+
{
70+
return "wifi";
71+
}
72+
6873
#endif // ESP8266

src/wifi/AdafruitIO_ESP8266.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class AdafruitIO_ESP8266 : public AdafruitIO {
2929
~AdafruitIO_ESP8266();
3030

3131
aio_status_t networkStatus();
32+
const char* connectionType();
3233

3334
protected:
3435
void _connect();

src/wifi/AdafruitIO_MKR1000.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,9 @@ aio_status_t AdafruitIO_MKR1000::networkStatus()
6767

6868
}
6969

70+
const char* AdafruitIO_MKR1000::connectionType()
71+
{
72+
return "wifi";
73+
}
74+
7075
#endif // ARDUINO_ARCH_SAMD

src/wifi/AdafruitIO_MKR1000.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class AdafruitIO_MKR1000 : public AdafruitIO {
3030
~AdafruitIO_MKR1000();
3131

3232
aio_status_t networkStatus();
33+
const char* connectionType();
3334

3435
protected:
3536
void _connect();

src/wifi/AdafruitIO_WICED.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@ aio_status_t AdafruitIO_WICED::networkStatus()
5858
return AIO_NET_DISCONNECTED;
5959
}
6060

61+
const char* AdafruitIO_WICED::connectionType()
62+
{
63+
return "wifi";
64+
}
65+
6166
#endif // ARDUINO_STM32_FEATHER

src/wifi/AdafruitIO_WICED.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class AdafruitIO_WICED : public AdafruitIO {
2929
~AdafruitIO_WICED();
3030

3131
aio_status_t networkStatus();
32+
const char* connectionType();
3233

3334
protected:
3435
void _connect();

src/wifi/AdafruitIO_WINC1500.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ aio_status_t AdafruitIO_WINC1500::networkStatus()
7676

7777
}
7878

79+
const char* AdafruitIO_WINC1500::connectionType()
80+
{
81+
return "winc1500";
82+
}
83+
7984
#endif // ARDUINO_ARCH_SAMD

0 commit comments

Comments
 (0)