Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef AUTOMATE_H
- #define AUTOMATE_H
- #include <QMainWindow>
- #include <QTimer>
- #include <QString>
- #include <QFile>
- #include <QSignalMapper>
- #include <QAction>
- #include <QMenu>
- #include <QtSerialPort/QSerialPort>
- #include <QtSerialPort/QSerialPortInfo>
- #include <QMessageBox>
- #include <QWidget>
- #include <QVBoxLayout>
- #include <QLabel>
- #include <qextserialport.h>
- #include <qextserialenumerator.h>
- #include <tableau.h>
- namespace Ui {
- class MainWindow;
- }
- class Automate
- {
- Q_OBJECT
- public:
- explicit Automate();
- ~Automate();
- QextSerialPort *serialPort;
- bool flagComStarted;
- bool sortieTOR[8];
- int indiceSortieTOR;
- QString etatConnexion;
- void initialisation();
- void startCom();
- Tableau* configurationPortCheckBox();
- void sendTrameWriteModBus(char adrSlave, char CodeCommande, int adresseData, int nbrData, Tableau* tableau);
- void envoiTrame(Tableau* bufferEmission);
- void addCRC16(Tableau *tableau, int longueur);
- bool testCRC16(Tableau *tableau, int longueur);
- Tableau* tableauEnvoye;
- void action_DetectionPortCOM();
- void action_DebutCommunication();
- void action_Chenillard();
- void action_StopChenillard();
- void action_Connexion();
- void action_LED1();
- void action_LED2();
- void action_LED3();
- void action_LED4();
- void action_LED5();
- void action_LED6();
- void action_LED7();
- void action_LED8();
- void action_Quitter();
- void action_LireTrame();
- signals:
- void workReady();
- private slots:
- void detectionPortCOM();
- void selectPort(QString name);
- void configurationPort();
- void timerRepetTicks();
- void timerRecepTicks();
- void timerChenillardTicks();
- void onDataAvailable();
- private:
- Ui::MainWindow *ui;
- int valueTimer;
- int nombreTotPortCOM;
- QList<QextPortInfo> ports;
- QList<QAction *> actions;
- QSignalMapper *signalMapper;
- QString portCOMName;
- QTimer *timerRepet;
- QTimer *timerRecep;
- QTimer *timerChenillard;
- };
- #endif // AUTOMATE_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement