Campus Serre  1.0
BTS SN-IR La Salle Avignon 2018
gestionPort.h
Aller à la documentation de ce fichier.
00001 #ifndef GESTIONPORT_H
00002 #define GESTIONPORT_H
00003 
00004 #include "qextserialport.h"
00005 #include <QString>
00006 
00007 #define PORT "/dev/ttyUSB0" 
00025 class GestionPort : public QObject
00026 {
00027     Q_OBJECT
00028 
00029     private:
00030         QextSerialPort *port; 
00032         void creerPort();
00033         void parametrerPort();
00034         void ouvrirPort();        
00035         bool verifierTrame(QString trame);
00036         void fermerPort();
00037 
00038     public:
00039         GestionPort(QObject *parent = 0);
00040         ~GestionPort();
00041 
00042         int envoyerDonnees(const QString &trame);
00043         bool estOuvert();
00044 
00045     signals:
00046         void nouvelleTrame(QString trame);
00047 
00048     public slots:
00049         void receptionnerDonnees();
00050 };
00051 
00052 
00053 
00054 #endif // GESTIONPORT_H
00055 
 Tout Classes Fichiers Fonctions Variables Macros