Subversion Repositories Projects

Rev

Rev 440 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 440 Rev 449
Line 38... Line 38...
38
    public:
38
    public:
39
        cConnection();
39
        cConnection();
40
        bool isOpen();
40
        bool isOpen();
41
        bool Open(int Typ, QString Address);
41
        bool Open(int Typ, QString Address);
42
        bool Close();
42
        bool Close();
43
        bool send_Cmd(char CMD, int Address, char Data[150],unsigned int Length, bool Resend = true);
43
        bool send_Cmd(char CMD, int Address, char Data[MAX_DATA_SIZE],unsigned int Length, bool Resend = true);
44
        void stop_ReSend();
44
        void stop_ReSend();
45
 
45
 
46
    private:
46
    private:
47
        ManageSerialPort *TTY;
47
        ManageSerialPort *TTY;
48
        QTcpSocket *TcpSocket;
48
        QTcpSocket *TcpSocket;
Line 50... Line 50...
50
 
50
 
51
        QByteArray s_ReSend;
51
        QByteArray s_ReSend;
52
 
52
 
53
        bool b_isOpen;
53
        bool b_isOpen;
54
        int  i_Type;
54
        int  i_Type;
55
        sRxData RxData;
55
//        sRxData RxData;
56
 
56
 
57
        void new_Data(QString Data);
57
        void new_Data(QString Data);
58
 
58
 
59
    private slots:
59
    private slots:
60
        void slot_newDataReceived(const QByteArray &dataReceived);
60
        void slot_newDataReceived(const QByteArray &dataReceived);
Line 64... Line 64...
64
 
64
 
65
        void slot_Timer();
65
        void slot_Timer();
66
//        void slot_Error(QAbstractSocket::SocketError Error);
66
//        void slot_Error(QAbstractSocket::SocketError Error);
67
 
67
 
68
    signals:
68
    signals:
69
        void newData(sRxData RxData);
69
//        void newData(sRxData RxData);
70
        void showTerminal(int Typ, QString Text);
70
        void showTerminal(int Typ, QString Text);
71
};
71
};
72
 
72
 
73
#endif // CCONNECTION_H
73
#endif // CCONNECTION_H