Arduino NBduino Library  0.12.0
Public Member Functions | List of all members
NBduino Class Reference

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 ()
 

Detailed Description

Definition at line 17 of file NBduinoLibrary.h.

Constructor & Destructor Documentation

◆ NBduino() [1/3]

NBduino::NBduino ( )

This method is the constructor of the NBduuino

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 109 of file NBduinoLibrary.cpp.

◆ NBduino() [2/3]

NBduino::NBduino ( const char *  mqttServer,
const int  mqttPort,
const char *  mqttUser,
const char *  mqttPassword 
)

This method is the constructor of the NBduuino

Author
Antonio Cafiero
Parameters
mqttServerThe name or the IP address of the MQTT broker (char*)
mqttPortThe port number of the MQTT broker (Int)
mqttUserThe username enabeled to access the MQTT broker (char*)
mqttPasswordThe password to autenticate the userto access the MQTT broker (char*)
Date
14/12/2018

Definition at line 122 of file NBduinoLibrary.cpp.

◆ NBduino() [3/3]

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

Author
Antonio Cafiero
Parameters
mqttServerThe name or the IP address of the MQTT broker (char*)
mqttPortThe port number of the MQTT broker (Int)
mqttUserThe username enabeled to access the MQTT broker (char*)
mqttPasswordThe password to autenticate the userto access the MQTT broker (char*)
timeToConnThe timeout in ms in connection phase (unsigned long)
Date
14/12/2018

Definition at line 141 of file NBduinoLibrary.cpp.

Member Function Documentation

◆ begin()

bool NBduino::begin ( )

This method must be called at beginning before any publish, subscribe, wakeup and sleep call.

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 190 of file NBduinoLibrary.cpp.

◆ connect()

NBduino::connect ( const char *  clientname)

This method connect to MQTT broker.

Author
Antonio Cafiero
Parameters
clientnameThe unique name for MQTT connection (char*)
Date
8/3/2019

Definition at line 258 of file NBduinoLibrary.cpp.

◆ disconnect()

NBduino::disconnect ( )

This method disconnect from MQTT broker.

Author
Antonio Cafiero
Date
8/3/2019

Definition at line 274 of file NBduinoLibrary.cpp.

◆ publish()

NBduino::publish ( const char *  topic,
const char *  value 
)

This method publish a topic/value to the MQTT broker.

Author
Antonio Cafiero
Parameters
topicThe topic name for publishing (char*)
valueThe string to publish (char*)
Date
14/12/2018

Definition at line 236 of file NBduinoLibrary.cpp.

◆ reqIMEI()

bool NBduino::reqIMEI ( char *  imei)

This method return the NBduno IMEI value.

Author
Antonio Cafiero
Parameters
imeia pointer to buffer were IMEI is returned If no IMEI is read void string is returned (char*)
Date
14/12/2018

Definition at line 286 of file NBduinoLibrary.cpp.

◆ setAPN()

NBduino::setAPN ( const char *  APN)

This method set the APN

Author
Antonio Cafiero
Parameters
APNThe name or the APN (String)
Date
14/12/2018

Definition at line 156 of file NBduinoLibrary.cpp.

◆ sleep()

NBduino::sleep ( )

This method asleep the NBduino shield.

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 222 of file NBduinoLibrary.cpp.

◆ wakeup()

NBduino::wakeup ( )

This method wakeup the NBduino shield.

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 209 of file NBduinoLibrary.cpp.


The documentation for this class was generated from the following files: