Meeting  1.1
BTS SNIR LaSalle Avignon 2021
Protocole.md
Aller à la documentation de ce fichier.
1 # Protocole Meeting 2021
2 
3 ## Description générale
4 
5 Protocole orienté ASCII
6 
7 Délimiteurs :
8 
9 - début : `$`
10 - champs : `;`
11 - fin : `\r\n`
12 
13 Adresse de multicast des portiers : `239.0.0.x`
14 
15 Format des trames de requêtes Application -> Portier(s) en multicast : `$GET;idRequete\r\n`
16 
17 Format des trames d'actualisations Application -> Portier(s) en unicast : `$SET;idRequete\r\n`
18 
19 | idRequete | Signification | Requêtes | Actualisations |
20 |-----------|------------|-----------|-----------|
21 | `1` | informations | X | X |
22 | `2` | état | X | |
23 | `3` | disponibilité | X |X |
24 
25 Les différents champs d'une trame de réponse :
26 
27 | champ | description |
28 |-----------|------------|
29 | nomSalle | string (le nom de la salle) |
30 | description | string (description de la salle) |
31 | emplacement | string (l'emplacement de la salle) |
32 | disponibilité | `0` = occupé et `1` = libre |
33 | niveauDeConfort | de -3 à 3 (voir cahier des charges) |
34 | température | en degré |
35 | surface | en m² |
36 
37 ### Demande les informations des portiers
38 
39 Application -> Portier(s) en multicast : `$GET;1\r\n`
40 
41 Portier -> Application : `$nomSalle;description;emplacement;surface;disponibilité;niveauDeConfort;température\r\n`
42 
43 - Nombre de champs : 7
44 
45 ### Demande l'état des portiers
46 
47 Application -> Portier(s) en multicast : `$GET;2\r\n`
48 
49 Portier -> Application : `$nomSalle;disponibilité;niveauDeConfort;température\r\n`
50 
51 - Nombre de champs : 4
52 
53 ### Demande la disponibilité des portiers
54 
55 Application -> Portier(s) en multicast : `$GET;3\r\n`
56 
57 Portier -> Application : `$nomSalle;disponibilité\r\n`
58 
59 - Nombre de champs : 2
60 
61 ### Actualiser les informations d'un portier
62 
63 Application -> Portier en unicast : `$SET;1;nomSalle;description;emplacement;surface\r\n`
64 
65 Portier -> Application : `$nomSalle;ok\r\n`
66 
67 - Nombre de champs : 2
68 
69 ### Actualiser la disponibilité d'un portier
70 
71 - Pour réserver :
72 
73  Application -> Portier en unicast : `$SET;3;0\r\n`
74 
75  Retour :
76 
77  Portier -> Application : `$nomSalle;code;OK\r\n`
78 
79  Nombre de champs : 4
80 
81  Portier -> Application : `$nomSalle;;ERREUR\r\n`
82 
83  Nombre de champs : 3
84 
85 - Pour libérer :
86 
87  Application -> Portier en unicast : `$SET;3;1;code\r\n`
88 
89  Portier -> Application : `$nomSalle;;OK\r\n`
90 
91  Nombre de champs : 3
92 
93  Portier -> Application : `$nomSalle;;ERREUR\r\n`
94 
95  Nombre de champs : 3