Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
801 - 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#ifndef INPUT_TTY_H
20
#define INPUT_TTY_H
21
 
22
#include <QObject>
23
#include <QTimer>
24
 
25
#include "Input.h"
26
#include "../Class_SerialPort/ManageSerialPort.h"
27
 
28
class Input_TTY : public Input
29
{
30
    Q_OBJECT
31
 
32
    public:
33
        void Init();
34
        bool Open(set_Input s_Input);
35
        bool IsOpen();
36
        bool Close();
37
        void send_Data(QString t_Data, int ID = 0);
38
        void send_RawData(char *t_Data);
39
        void stop_Resend(int ID);
40
        eMode Mode();
41
 
42
    private:
43
        ManageSerialPort *o_TTY;
44
        QString  s_RX;
45
        QTimer   *Timer;
46
        s_Resend Confirm[MAX_Confirm];
47
 
48
    private slots:
49
        void slot_Receive(const QByteArray &dataReceived);
50
        void slot_Timer();
51
 
52
    signals:
53
        void sig_NewData(QString Data);
54
 
55
};
56
 
57
#endif // INPUT_TTY_H