![]() |
Arduino NBduino Library
0.20.0
|
Public Member Functions | |
NBduino () | |
NBduino (const char *mqttServer, const int mqttPort, const char *mqttUser, const char *mqttPassword) | |
NBduino (const char *mqttServer, const int mqttPort, const char *mqttUser, const char *mqttPassword, unsigned long timeToConn) | |
setAPN (const char *APN) | |
bool | begin () |
wakeup () | |
sleep () | |
bool | reqIMEI (char *imei) |
publish (const char *topic, const char *value) | |
connect (const char *clientname) | |
disconnect () | |
Definition at line 17 of file NBduinoLibrary.h.
NBduino::NBduino | ( | ) |
This method is the constructor of the NBduuino
Definition at line 109 of file NBduinoLibrary.cpp.
NBduino::NBduino | ( | const char * | mqttServer, |
const int | mqttPort, | ||
const char * | mqttUser, | ||
const char * | mqttPassword | ||
) |
This method is the constructor of the NBduuino
mqttServer | The name or the IP address of the MQTT broker (char*) |
mqttPort | The port number of the MQTT broker (Int) |
mqttUser | The username enabeled to access the MQTT broker (char*) |
mqttPassword | The password to autenticate the userto access the MQTT broker (char*) |
Definition at line 122 of file NBduinoLibrary.cpp.
NBduino::NBduino | ( | const char * | mqttServer, |
const int | mqttPort, | ||
const char * | mqttUser, | ||
const char * | mqttPassword, | ||
unsigned long | timeToConn | ||
) |
This method is the constructor of the NBduuino
mqttServer | The name or the IP address of the MQTT broker (char*) |
mqttPort | The port number of the MQTT broker (Int) |
mqttUser | The username enabeled to access the MQTT broker (char*) |
mqttPassword | The password to autenticate the userto access the MQTT broker (char*) |
timeToConn | The timeout in ms in connection phase (unsigned long) |
Definition at line 141 of file NBduinoLibrary.cpp.
bool NBduino::begin | ( | ) |
This method must be called at beginning before any publish, subscribe, wakeup and sleep call.
Definition at line 190 of file NBduinoLibrary.cpp.
NBduino::connect | ( | const char * | clientname | ) |
This method connect to MQTT broker.
clientname | The unique name for MQTT connection (char*) |
Definition at line 258 of file NBduinoLibrary.cpp.
NBduino::disconnect | ( | ) |
This method disconnect from MQTT broker.
Definition at line 274 of file NBduinoLibrary.cpp.
NBduino::publish | ( | const char * | topic, |
const char * | value | ||
) |
This method publish a topic/value to the MQTT broker.
topic | The topic name for publishing (char*) |
value | The string to publish (char*) |
Definition at line 236 of file NBduinoLibrary.cpp.
bool NBduino::reqIMEI | ( | char * | imei | ) |
This method return the NBduno IMEI value.
imei | a pointer to buffer were IMEI is returned If no IMEI is read void string is returned (char*) |
Definition at line 286 of file NBduinoLibrary.cpp.
NBduino::setAPN | ( | const char * | APN | ) |
This method set the APN
APN | The name or the APN (String) |
Definition at line 156 of file NBduinoLibrary.cpp.
NBduino::sleep | ( | ) |
This method asleep the NBduino shield.
Definition at line 222 of file NBduinoLibrary.cpp.
NBduino::wakeup | ( | ) |
This method wakeup the NBduino shield.
Definition at line 209 of file NBduinoLibrary.cpp.