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

Public Member Functions

 NBduino ()
 
 NBduino (const String mqttServer, const int mqttPort, const String mqttUser, const String mqttPassword)
 
 NBduino (const String mqttServer, const int mqttPort, const String mqttUser, const String mqttPassword, unsigned long timeToConn)
 
 setAPN (String APN)
 
bool begin ()
 
 wakeup ()
 
 sleep ()
 
String reqIMEI ()
 
 publish (const String topic, const String value)
 
 connect (const String 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 62 of file NBduinoLibrary.cpp.

◆ NBduino() [2/3]

NBduino::NBduino ( const String  mqttServer,
const int  mqttPort,
const String  mqttUser,
const String  mqttPassword 
)

This method is the constructor of the NBduuino

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

Definition at line 75 of file NBduinoLibrary.cpp.

◆ NBduino() [3/3]

NBduino::NBduino ( const String  mqttServer,
const int  mqttPort,
const String  mqttUser,
const String  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 (String)
mqttPortThe port number of the MQTT broker (Int)
mqttUserThe username enabeled to access the MQTT broker (String)
mqttPasswordThe password to autenticate the userto access the MQTT broker (String)
timeToConnThe timeout in ms in connection phase (unsigned long)
Date
14/12/2018

Definition at line 94 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 143 of file NBduinoLibrary.cpp.

◆ connect()

NBduino::connect ( const String  clientname)

This method connect to MQTT broker.

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

Definition at line 214 of file NBduinoLibrary.cpp.

◆ disconnect()

NBduino::disconnect ( )

This method disconnect from MQTT broker.

Author
Antonio Cafiero
Date
8/3/2019

Definition at line 236 of file NBduinoLibrary.cpp.

◆ publish()

NBduino::publish ( const String  topic,
const String  value 
)

This method publish a string to the MQTT broker.

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

Definition at line 199 of file NBduinoLibrary.cpp.

◆ reqIMEI()

String NBduino::reqIMEI ( )

This method return the NBduno IMEI string (String).

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 249 of file NBduinoLibrary.cpp.

◆ setAPN()

NBduino::setAPN ( String  APN)

This method set the APN

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

Definition at line 109 of file NBduinoLibrary.cpp.

◆ sleep()

NBduino::sleep ( )

This method asleep the NBduino shield.

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 185 of file NBduinoLibrary.cpp.

◆ wakeup()

NBduino::wakeup ( )

This method wakeup the NBduino shield.

Author
Antonio Cafiero
Date
14/12/2018

Definition at line 172 of file NBduinoLibrary.cpp.


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