-
Notifications
You must be signed in to change notification settings - Fork 5
/
modem.hpp
44 lines (37 loc) · 1.39 KB
/
modem.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef H_MODEM_HPP_
#define H_MODEM_HPP_
#include <qobject.h>
#include <QString>
/**
* @brief Abstract class for GUI-UART interface
*/
class Modem : public QObject {
Q_OBJECT
public:
// Modem();
virtual ~Modem() {}
/**
* @brief Returns platform-specific modem singleton
* Defined in platform-specific modem file.
*/
static Modem *GetModem();
/** lock and open serial port with settings of ConfigData*/
virtual bool opentty(QString seriell_dev) = 0;
/** unlock and close serial port */
virtual bool closetty() = 0;
/** write a char to port */
virtual bool writeChar(unsigned char) = 0;
/** write a char[] to port*/
virtual bool writeLine(QString &ln) = 0;
// neue funktion fuer den NWT7
virtual int readttybuffer(void *, int) = 0;
};
#endif // H_MODEM_HPP_