Compare commits

...

7 Commits

Author SHA1 Message Date
9b6c1beb8d Merge remote-tracking branch 'origin/master' into feat/balance 2023-04-11 14:07:49 +02:00
9a77d3163f Merge pull request 'docs: Doxy-API-et-diagramme-API' (#25) from docs/Doxy-API-et-diagramme-API into master
Reviewed-on: https://gitea.cb85.software/Epitech-T-DEV-811/T-DEV-811/pulls/25
Reviewed-by: nico <nicolas.sansd@gmail.com>
Reviewed-by: Guska <gildas.gonzalez@epitech.eu>
2023-04-11 13:53:42 +02:00
b921edd04b typo 2023-04-04 10:57:46 +02:00
62651ca606 docs(iot): create diagram class 2023-04-04 10:56:27 +02:00
aba69c8181 fix: doc and typo 2023-04-04 10:55:39 +02:00
ab94d9fbf3 fix: typo 2023-04-04 10:45:44 +02:00
70f18faee5 feat: doxyfile 2023-04-04 10:41:45 +02:00
5 changed files with 2775 additions and 10 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
IOT/docs/doxygen output/*

2740
IOT/docs/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,24 @@
@startuml Class Diagram
Class API {
- user: String
- password: String
- serveurHost: String
- https: bool
- client: WiFiEspClient*
- connect(): bool
+ API(user: String, password: String, host: String, https: bool = true)
+ wifiBegin(wifiId: String, wifiPass: String, espSerial: Stream*): bool
+ sendValue(val: String, pouvelleID: String, unit: String, full: bool): bool
}
Class Program {
+ Program()
+ setup()
}
@enduml

View File

@ -21,25 +21,25 @@ public:
/**
* @brief Initialise la connection Wifi de l'esp
*
* @param wifiId nom du wifi
* @param wifiPass mot de passe du wifi
* @param espSerial port serie de l'esp (hard ou soft)
* @param[in] wifiId nom du wifi
* @param[in] wifiPass mot de passe du wifi
* @param[in] espSerial port serie de l'esp (hard ou soft)
* @return true la connexion a bien fonctionner
* @return false erreur a la connexion
*/
bool wifiBegin(String wifiId, String wifiPass, Stream* espSerial);
bool wifiBegin(String wifiID, String wifiPass, Stream* espSerial);
/**
* @brief envoie la valeur d'un capteur de poubelle à l'api
*
* @param val valeur du capteur
* @param poubelleID ID de la poubelle
* @param unit uniter de mesure du capteur *(ex: g, cm, degree,...)
* @param full poubelle est considéré comme pleine
* @param[in] val valeur du capteur
* @param[in] poubelleID ID de la poubelle
* @param[in] unit uniter de mesure du capteur *(ex: g, cm, degree,...)
* @param[in] full poubelle est considéré comme pleine
* @return true la valeur s'est bien envoyer
* @return false il y a une erreur durran l'envoie
*/
bool sendValute(String val, String poubelleID, String unit, bool full);
bool sendValue(String val, String poubelleID, String unit, bool full);
private:

View File

@ -81,7 +81,7 @@ bool API::connect(){
return sortie;
}
bool API::sendValute(String val, String poubelleID, String valUnit, bool full){
bool API::sendValue(String val, String poubelleID, String valUnit, bool full){
JSONVar data;
data["value"] = val;
data["trash_id"] = poubelleID;