![]() |
BeeHoneyt
1.1
BTS SNIR LaSalle Avignon 2021
|
Déclaration de la classe Communication. Plus de détails...
Fonctions membres publiques | |
Communication (Context context, final Handler handler) | |
Constructeur de la classe Communication. Plus de détails... | |
void | connecter () |
Connexion au TTN. Plus de détails... | |
void | deconnecter () |
Deconnexion du TTN. Plus de détails... | |
boolean | estConnecte () |
Retourne l'état de connexion au serveur TTN. Plus de détails... | |
String | getPassword () |
String | getUsername () |
void | setCallback (MqttCallbackExtended callback) |
Installe les fonctions de rappel. Plus de détails... | |
void | setClientId (String username) |
void | setPassword (String password) |
void | setUsername (String username) |
boolean | souscrireTopic (String deviceID) |
S'abonne à un topic (deviceID = ESP32 d'une ruche dans TTN) Plus de détails... | |
boolean | unsubscribe (String deviceID) |
S'desabonne à un topic (deviceID = ESP32 d'une ruche dans TTN) Plus de détails... | |
Attributs publics statiques | |
static final int | TTN_CONNECTE = 1 |
static final int | TTN_DECONNECTE = 2 |
static final int | TTN_MESSAGE = 3 |
Fonctions membres privées | |
void | creerClientMQTTT (Context context, Handler handler) |
Attributs privés | |
Handler | handler = null |
MqttAndroidClient | mqttAndroidClient |
String | password = "" |
mot de passe TTN Plus de détails... | |
String | username = "" |
nom d'utilisateur Plus de détails... | |
Attributs privés statiques | |
static final String | TAG = "_Communication" |
Déclaration de la classe Communication.
Classe pour gérer la communication MQTT.
Permet la communication MQTT avec le serveur The Things Network
Définition à la ligne 35 du fichier Communication.java.
com.example.bee_honeyt.Communication.Communication | ( | Context | context, |
final Handler | handler | ||
) |
Constructeur de la classe Communication.
context | |
handler |
Définition à la ligne 67 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.creerClientMQTTT(), com.example.bee_honeyt.Communication.handler, et com.example.bee_honeyt.Communication.TAG.
com.example.bee_honeyt.Communication.connecter | ( | ) |
Connexion au TTN.
Définition à la ligne 169 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.mqttAndroidClient, com.example.bee_honeyt.Communication.password, com.example.bee_honeyt.Communication.TAG, et com.example.bee_honeyt.Communication.username.
Référencé par com.example.bee_honeyt.IHMMobile.initialiserMQTT().
|
private |
Définition à la ligne 105 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.handler, com.example.bee_honeyt.Communication.mqttAndroidClient, com.example.bee_honeyt.Communication.TAG, com.example.bee_honeyt.Communication.TTN_CONNECTE, com.example.bee_honeyt.Communication.TTN_DECONNECTE, et com.example.bee_honeyt.Communication.TTN_MESSAGE.
Référencé par com.example.bee_honeyt.Communication.Communication().
com.example.bee_honeyt.Communication.deconnecter | ( | ) |
Deconnexion du TTN.
Définition à la ligne 212 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.estConnecte(), com.example.bee_honeyt.Communication.mqttAndroidClient, et com.example.bee_honeyt.Communication.TAG.
com.example.bee_honeyt.Communication.estConnecte | ( | ) |
Retourne l'état de connexion au serveur TTN.
Définition à la ligne 247 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.mqttAndroidClient, et com.example.bee_honeyt.Communication.TAG.
Référencé par com.example.bee_honeyt.Communication.deconnecter().
String com.example.bee_honeyt.Communication.getPassword | ( | ) |
Définition à la ligne 80 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.password.
String com.example.bee_honeyt.Communication.getUsername | ( | ) |
Définition à la ligne 75 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.username.
com.example.bee_honeyt.Communication.setCallback | ( | MqttCallbackExtended | callback | ) |
Installe les fonctions de rappel.
callback | le retour |
Définition à la ligne 159 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.mqttAndroidClient.
void com.example.bee_honeyt.Communication.setClientId | ( | String | username | ) |
Définition à la ligne 85 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.setUsername(), et com.example.bee_honeyt.Communication.username.
void com.example.bee_honeyt.Communication.setPassword | ( | String | password | ) |
Définition à la ligne 99 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.password.
Référencé par com.example.bee_honeyt.IHMMobile.initialiserMQTT().
void com.example.bee_honeyt.Communication.setUsername | ( | String | username | ) |
Définition à la ligne 90 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.username.
Référencé par com.example.bee_honeyt.IHMMobile.initialiserMQTT(), et com.example.bee_honeyt.Communication.setClientId().
com.example.bee_honeyt.Communication.souscrireTopic | ( | String | topic | ) |
S'abonne à un topic (deviceID = ESP32 d'une ruche dans TTN)
deviceID | le deviceID dans TTN |
Définition à la ligne 260 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.mqttAndroidClient, et com.example.bee_honeyt.Communication.TAG.
com.example.bee_honeyt.Communication.unsubscribe | ( | String | deviceID | ) |
S'desabonne à un topic (deviceID = ESP32 d'une ruche dans TTN)
deviceID | le deviceID dans TTN |
Définition à la ligne 305 du fichier Communication.java.
Références com.example.bee_honeyt.Communication.mqttAndroidClient, et com.example.bee_honeyt.Communication.TAG.
|
private |
Définition à la ligne 46 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.Communication(), et com.example.bee_honeyt.Communication.creerClientMQTTT().
|
private |
Attributs
Définition à la ligne 45 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.connecter(), com.example.bee_honeyt.Communication.creerClientMQTTT(), com.example.bee_honeyt.Communication.deconnecter(), com.example.bee_honeyt.Communication.estConnecte(), com.example.bee_honeyt.Communication.setCallback(), com.example.bee_honeyt.Communication.souscrireTopic(), et com.example.bee_honeyt.Communication.unsubscribe().
|
private |
mot de passe TTN
Définition à la ligne 58 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.connecter(), com.example.bee_honeyt.Communication.getPassword(), et com.example.bee_honeyt.Communication.setPassword().
|
staticprivate |
Constantes
Définition à la ligne 40 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.Communication(), com.example.bee_honeyt.Communication.connecter(), com.example.bee_honeyt.Communication.creerClientMQTTT(), com.example.bee_honeyt.Communication.deconnecter(), com.example.bee_honeyt.Communication.estConnecte(), com.example.bee_honeyt.Communication.souscrireTopic(), et com.example.bee_honeyt.Communication.unsubscribe().
|
static |
Constantes pour le Handler
Définition à la ligne 51 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.creerClientMQTTT().
|
static |
Définition à la ligne 52 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.creerClientMQTTT().
|
static |
Définition à la ligne 53 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.creerClientMQTTT().
|
private |
nom d'utilisateur
Définition à la ligne 57 du fichier Communication.java.
Référencé par com.example.bee_honeyt.Communication.connecter(), com.example.bee_honeyt.Communication.getUsername(), com.example.bee_honeyt.Communication.setClientId(), et com.example.bee_honeyt.Communication.setUsername().