12 #ifndef CommunicationBluetooth_H 13 #define CommunicationBluetooth_H 15 #include <QBluetoothLocalDevice> 16 #include <QBluetoothAddress> 17 #include <QBluetoothUuid> 18 #include <QBluetoothDeviceInfo> 19 #include <QBluetoothServiceInfo> 20 #include <QBluetoothDeviceDiscoveryAgent> 22 #define SERVICE_UUID "{00001101-0000-1000-8000-00805F9B34FB}" 52 ~CommunicationBluetooth();
114 Q_INVOKABLE
bool demarrerSeance(QString nomJoueur, QString zoneObjectif, QString zoneRobot,
int frequenceBalle,
int nbBalles,
int effet,
int puissance,
bool rotation);
127 Q_INVOKABLE
bool demarrerSeanceRobot(
int frequenceBalle,
int nbBalles,
int effet,
int puissance,
bool rotation);
138 Q_INVOKABLE
bool demarrerSeanceEcran(QString nomJoueur, QString zoneObjectif, QString zoneRobot);
249 #endif // CommunicationBluetooth_H QString nomPeripheriqueBluetoothLocal
le nom du périphérique Bluetooth de la tablette
Definition: terminal-TTPA/communicationbluetooth.h:41
void mettreEnPauseSeance()
Met la séance en pause.
Definition: terminal-TTPA/communicationbluetooth.cpp:205
void recevoirTramePeripheriqueTTPA(QString nomPeripherique, QString trame)
Definition: terminal-TTPA/communicationbluetooth.cpp:368
bool peripheriqueRobotTTPADetecte
Definition: terminal-TTPA/communicationbluetooth.h:45
QString adressePeripheriqueBluetoothLocal
l'adresse MAC du périphérique Bluetooth de la tablette
Definition: terminal-TTPA/communicationbluetooth.h:42
Permet la communication avec les appareils Bluetooth TTPA.
Definition: peripheriqueTTPA.h:32
EtatSeance getEtatSeance()
Definition: ecran-TTPA/communicationbluetooth.cpp:209
void rechercheErreur(QBluetoothDeviceDiscoveryAgent::Error erreur)
Definition: terminal-TTPA/communicationbluetooth.cpp:363
bool erreurRobotDetecte
Definition: terminal-TTPA/communicationbluetooth.h:48
QString getNomPeripheriqueBluetoothLocal()
Definition: terminal-TTPA/communicationbluetooth.cpp:95
QString getAdressePeripheriqueBluetoothLocal()
Definition: terminal-TTPA/communicationbluetooth.cpp:100
bool peripheriqueEcranTTPADetecte
Definition: terminal-TTPA/communicationbluetooth.h:43
QString nom
Definition: ecran-TTPA/communicationbluetooth.h:54
QList< QObject * > peripheriquesTTPA
liste des périphériques Bluetooth TTPA détectés au maximum 3 (Robot, Table et Ecran) ...
Definition: terminal-TTPA/communicationbluetooth.h:223
Q_INVOKABLE bool estValide()
Retourne vrai si l'appareil correspond à un appareil "TTPA".
Definition: terminal-TTPA/communicationbluetooth.cpp:90
QVariant peripheriquesTTPA
Definition: terminal-TTPA/communicationbluetooth.h:47
void rechercheTerminee()
Definition: terminal-TTPA/communicationbluetooth.cpp:355
void ajouterPeripheriqueTTPA(const QBluetoothDeviceInfo &)
Definition: terminal-TTPA/communicationbluetooth.cpp:309
Q_INVOKABLE bool reprendreLaSeance()
Reprend la séance.
Definition: terminal-TTPA/communicationbluetooth.cpp:222
Definition: terminal-TTPA/communicationbluetooth.h:59
Definition: ecran-TTPA/communicationbluetooth.h:40
EtatDeLaSeance
Definition: terminal-TTPA/communicationbluetooth.h:54
QBluetoothLocalDevice peripheriqueBluetoothLocal
le périphérique Bluetooth de la tablette
Definition: terminal-TTPA/communicationbluetooth.h:220
Q_INVOKABLE void arreterRecherche()
Permet d'arreter la recherche des appareils bluetooth "TTPA".
Definition: terminal-TTPA/communicationbluetooth.cpp:79
bool etatRecherche
Definition: terminal-TTPA/communicationbluetooth.h:46
QBluetoothDeviceDiscoveryAgent * discoveryAgentDevice
l'agent permettant de découvrir des périphériques Bluetooth
Definition: terminal-TTPA/communicationbluetooth.h:224
Definition: ecran-TTPA/communicationbluetooth.h:39
void recherche()
signal indiquant que l'état de la recherche de périphériques a changé
bool envoyerErreurRobot()
Si le robot détecte un bourrage de balle ou une absence de balle, une trame est envoyée à l'écran ttp...
Definition: terminal-TTPA/communicationbluetooth.cpp:280
Q_INVOKABLE QString getZoneObjectif(QString zoneObjectif)
Permet d'obtenir la zone objectif.
Definition: terminal-TTPA/communicationbluetooth.cpp:289
bool finirSeance()
Met fin à la séance lorsque le robot indique qu'il à tirer toutes ses balles.
Definition: terminal-TTPA/communicationbluetooth.cpp:253
Q_INVOKABLE bool demarrerSeance(QString nomJoueur, QString zoneObjectif, QString zoneRobot, int frequenceBalle, int nbBalles, int effet, int puissance, bool rotation)
Definition: terminal-TTPA/communicationbluetooth.cpp:145
Q_INVOKABLE PeripheriqueTTPA * getPeripheriqueTTPA(QString nom)
Definition: terminal-TTPA/communicationbluetooth.cpp:110
Q_INVOKABLE bool arreterSeance()
Met subitement fin à la séance peut importe son état.
Definition: terminal-TTPA/communicationbluetooth.cpp:239
EtatDeLaSeance etatSeance
Definition: terminal-TTPA/communicationbluetooth.h:230
Definition: ecran-TTPA/communicationbluetooth.h:41
Q_INVOKABLE void connecterPeripheriquesTTPA()
Connecte individuelle chaque appareil TTPA détecté
Definition: terminal-TTPA/communicationbluetooth.cpp:406
void peripheriquesTTPAUpdated()
Assure la détection des périphériques TTPA, leur connexion (et déconnexion) et une communication (env...
Definition: ecran-TTPA/communicationbluetooth.h:29
Q_INVOKABLE QString getZoneRobot(QString zoneRobot)
Permet d'obtenir la zone robot.
Definition: terminal-TTPA/communicationbluetooth.cpp:299
Q_INVOKABLE void rechercherPeripheriquesTTPA()
Assure la recherche d'appareils bluetooth "TTPA".
Definition: terminal-TTPA/communicationbluetooth.cpp:55
bool peripheriqueTableTTPADetecte
Definition: terminal-TTPA/communicationbluetooth.h:44
Q_INVOKABLE bool envoyerPeripheriqueTTPA(QString nom, QString message)
Permet d'envoyer une trame à un périphérique TTPA identifié par son nom.
Definition: terminal-TTPA/communicationbluetooth.cpp:129
Q_INVOKABLE bool demarrerSeanceEcran(QString nomJoueur, QString zoneObjectif, QString zoneRobot)
Envoi une trame de démarrage de séance à l'ecran.
Definition: terminal-TTPA/communicationbluetooth.cpp:176
Q_INVOKABLE bool demarrerSeanceTable(int nbBalles)
Envoi une trame de démarrage de séance à la table.
Definition: terminal-TTPA/communicationbluetooth.cpp:190
bool envoyerZoneImpactee(QString zone)
Dès que la table envoie une trame contenant la zone impactée, la méthode l'envoie à l'écran ttpa...
Definition: terminal-TTPA/communicationbluetooth.cpp:271
QVariant getPeripheriquesTTPA()
Definition: terminal-TTPA/communicationbluetooth.cpp:105
Q_INVOKABLE bool demarrerSeanceRobot(int frequenceBalle, int nbBalles, int effet, int puissance, bool rotation)
Envoi une trame contenant les paramètres du robot au robot-ttpa.
Definition: terminal-TTPA/communicationbluetooth.cpp:156
Q_INVOKABLE void deconnecterPeripheriquesTTPA()
Déconnecte individuelle chaque appareil TTPA détecté
Definition: terminal-TTPA/communicationbluetooth.cpp:423