Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
c2abde10
Commit
c2abde10
authored
Jun 28, 2013
by
Bill Bonney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds missing files
parent
04040e40
Changes
41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
8874 additions
and
831 deletions
+8874
-831
apmserial.pri
libs/serialport/apmserial.pri
+59
-0
blockingmaster-example.png
libs/serialport/doc/images/blockingmaster-example.png
+0
-0
blockingslave-example.png
libs/serialport/doc/images/blockingslave-example.png
+0
-0
cenumerator-example.png
libs/serialport/doc/images/cenumerator-example.png
+0
-0
enumerator-example.png
libs/serialport/doc/images/enumerator-example.png
+0
-0
terminal-example.png
libs/serialport/doc/images/terminal-example.png
+0
-0
qtserialport.qdocconf
libs/serialport/doc/qtserialport.qdocconf
+37
-0
index.qdoc
libs/serialport/doc/src/index.qdoc
+65
-0
qtserialport-module.qdoc
libs/serialport/doc/src/qtserialport-module.qdoc
+46
-0
style.css
libs/serialport/doc/style/style.css
+137
-0
qserialport.cpp
libs/serialport/qserialport.cpp
+1167
-0
qserialport.h
libs/serialport/qserialport.h
+257
-0
qserialport_p.h
libs/serialport/qserialport_p.h
+89
-0
qserialport_symbian.cpp
libs/serialport/qserialport_symbian.cpp
+645
-0
qserialport_symbian_p.h
libs/serialport/qserialport_symbian_p.h
+118
-0
qserialport_unix.cpp
libs/serialport/qserialport_unix.cpp
+1343
-0
qserialport_unix_p.h
libs/serialport/qserialport_unix_p.h
+156
-0
qserialport_win.cpp
libs/serialport/qserialport_win.cpp
+1091
-0
qserialport_win_p.h
libs/serialport/qserialport_win_p.h
+162
-0
qserialport_wince.cpp
libs/serialport/qserialport_wince.cpp
+509
-0
qserialportglobal.h
libs/serialport/qserialportglobal.h
+67
-0
qserialportinfo.cpp
libs/serialport/qserialportinfo.cpp
+259
-0
qserialportinfo.h
libs/serialport/qserialportinfo.h
+98
-0
qserialportinfo_mac.cpp
libs/serialport/qserialportinfo_mac.cpp
+272
-0
qserialportinfo_p.h
libs/serialport/qserialportinfo_p.h
+85
-0
qserialportinfo_symbian.cpp
libs/serialport/qserialportinfo_symbian.cpp
+249
-0
qserialportinfo_unix.cpp
libs/serialport/qserialportinfo_unix.cpp
+261
-0
qserialportinfo_win.cpp
libs/serialport/qserialportinfo_win.cpp
+233
-0
qserialportinfo_wince.cpp
libs/serialport/qserialportinfo_wince.cpp
+134
-0
install-helper.pri
libs/serialport/qt4support/install-helper.pri
+43
-0
qringbuffer_p.h
libs/serialport/qt4support/qringbuffer_p.h
+451
-0
qwineventnotifier_p.h
libs/serialport/qt4support/qwineventnotifier_p.h
+94
-0
serialport.prf
libs/serialport/qt4support/serialport.prf
+27
-0
qttylocker_unix.cpp
libs/serialport/qttylocker_unix.cpp
+188
-0
qttylocker_unix_p.h
libs/serialport/qttylocker_unix_p.h
+59
-0
serialport-lib.pri
libs/serialport/serialport-lib.pri
+87
-0
serialport.pro
libs/serialport/serialport.pro
+17
-0
qgroundcontrol.pro
qgroundcontrol.pro
+17
-24
SerialLink.cc
src/comm/SerialLink.cc
+326
-776
SerialLink.h
src/comm/SerialLink.h
+25
-30
SerialConfigurationWindow.cc
src/ui/SerialConfigurationWindow.cc
+1
-1
No files found.
libs/serialport/apmserial.pri
0 → 100644
View file @
c2abde10
INCLUDEPATH += $$PWD
unix {
CONFIG += link_pkgconfig
packagesExist(libudev) {
DEFINES += HAVE_LIBUDEV
PKGCONFIG += libudev
}
}
PUBLIC_HEADERS += \
$$PWD/qserialportglobal.h \
$$PWD/qserialport.h \
$$PWD/qserialportinfo.h
PRIVATE_HEADERS += \
$$PWD/qserialport_p.h \
$$PWD/qserialportinfo_p.h
SOURCES += \
$$PWD/qserialport.cpp \
$$PWD/qserialportinfo.cpp
win32 {
PRIVATE_HEADERS += \
$$PWD/qserialport_win_p.h
SOURCES += \
$$PWD/qserialport_win.cpp \
$$PWD/qserialportinfo_win.cpp
LIBS += -lsetupapi -ladvapi32
}
unix:!symbian {
PRIVATE_HEADERS += \
$$PWD/qttylocker_unix_p.h \
$$PWD/qserialport_unix_p.h
SOURCES += \
$$PWD/qttylocker_unix.cpp \
$$PWD/qserialport_unix.cpp \
$$PWD/qserialportinfo_unix.cpp
macx {
SOURCES += $$PWD/qserialportinfo_mac.cpp
LIBS += -framework IOKit -framework CoreFoundation
} else {
linux*:contains( DEFINES, HAVE_LIBUDEV ) {
LIBS += -ludev
}
}
}
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
libs/serialport/doc/images/blockingmaster-example.png
0 → 100644
View file @
c2abde10
4.55 KB
libs/serialport/doc/images/blockingslave-example.png
0 → 100644
View file @
c2abde10
4.67 KB
libs/serialport/doc/images/cenumerator-example.png
0 → 100644
View file @
c2abde10
3.45 KB
libs/serialport/doc/images/enumerator-example.png
0 → 100644
View file @
c2abde10
18.1 KB
libs/serialport/doc/images/terminal-example.png
0 → 100644
View file @
c2abde10
10.7 KB
libs/serialport/doc/qtserialport.qdocconf
0 → 100644
View file @
c2abde10
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
project = QtSerialPort
description = Qt Serial Port Reference Documentation
url = http://qt-project.org/doc/qt-$QT_VER/qtserialport
version = $QT_VERSION
qhp.projects = QtSerialPort
qhp.QtSerialPort.file = qtserialport.qhp
qhp.QtSerialPort.namespace = org.qt-project.qtserialport.$QT_VERSION_TAG
qhp.QtSerialPort.virtualFolder = qtserialport
qhp.QtSerialPort.indexTitle = Qt Serial Port
qhp.QtSerialPort.indexRoot =
qhp.QtSerialPort.filterAttributes = qtserialport $QT_VERSION qtrefdoc
qhp.QtSerialPort.customFilters.Qt.name = QtSerialPort $QT_VERSION
qhp.QtSerialPort.customFilters.Qt.filterAttributes = qtserialport $QT_VERSION
qhp.QtSerialPort.subprojects = classes examples
qhp.QtSerialPort.subprojects.classes.title = C++ Classes
qhp.QtSerialPort.subprojects.classes.indexTitle = Qt Serial Port C++ Classes
qhp.QtSerialPort.subprojects.classes.selectors = class fake:headerfile
qhp.QtSerialPort.subprojects.classes.sortPages = true
qhp.QtSerialPort.subprojects.examples.title = Examples
qhp.QtSerialPort.subprojects.examples.indexTitle = Qt Serial Port Examples
qhp.QtSerialPort.subprojects.examples.selectors = fake:example
qhp.QtSerialPort.subprojects.examples.sortPages = true
headerdirs += ..
sourcedirs += ..
exampledirs += ../../../examples/serialport
imagedirs += images
depends += qtcore qtdoc
libs/serialport/doc/src/index.qdoc
0 → 100644
View file @
c2abde10
/****************************************************************************
**
** Copyright (C) 2011 - 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtserialport-index.html
\title Qt Serial Port
\brief Provides API to make the serial programming simple and portable.
Qt Serial Port provides the basic functionality, which includes
configuring, I/O operations, get and set control signals of the
RS-232 pinouts.
The following are not supported by this module:
\list
\li Terminal features such as echo, control CR/LF, and so on.
\li Text mode.
\li Configuring timeouts and delays while reading.
\li Tracking and notification when the state of RS-232 pinout signals change.
\endlist
To use these classes in your application, use the following include
statement:
\code
#include <QtSerialPort/QtSerialPort>
\endcode
To link against the module, add this line to your \l qmake \c
.pro file:
\code
QT += serialport
\endcode
\section1 Related information
\list
\li \l{Qt Serial Port C++ Classes}{C++ Classes}
\li \l{Qt Serial Port Examples}{Examples}
\endlist
*/
libs/serialport/doc/src/qtserialport-module.qdoc
0 → 100644
View file @
c2abde10
/****************************************************************************
**
** Copyright (C) 2011 - 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\module QtSerialPort
\title Qt Serial Port C++ Classes
\brief List of C++ classes that enable access to a serial port.
To use these classes in your application, use the following include
statement:
\code
#include <QtSerialPort/QtSerialPort>
\endcode
To link against the module, add this line to your \l qmake \c
.pro file:
\code
QT += serialport
\endcode
*/
libs/serialport/doc/style/style.css
0 → 100644
View file @
c2abde10
a
:link
,
a
:visited
{
color
:
#00732F
;
text-decoration
:
none
;
font-weight
:
bold
;
}
body
{
font
:
normal
400
14px
/
1.2
Arial
;
margin-top
:
85px
;
}
h1
{
margin
:
0
;
}
h2
{
font
:
500
20px
/
1.2
Arial
;
}
h3
.fn
,
span
.fn
{
-moz-border-radius
:
7px
7px
7px
7px
;
-webkit-border-radius
:
7px
7px
7px
7px
;
border-radius
:
7px
7px
7px
7px
;
background-color
:
#F6F6F6
;
border-width
:
1px
;
border-style
:
solid
;
border-color
:
#E6E6E6
;
word-spacing
:
3px
;
padding
:
3px
5px
;
}
table
,
pre
{
-moz-border-radius
:
7px
7px
7px
7px
;
-webkit-border-radius
:
7px
7px
7px
7px
;
border-radius
:
7px
7px
7px
7px
;
background-color
:
#F6F6F6
;
border
:
1px
solid
#E6E6E6
;
border-collapse
:
separate
;
font-size
:
12px
;
line-height
:
1.2
;
margin-bottom
:
25px
;
margin-left
:
15px
;
}
table
td
{
padding
:
3px
15px
3px
20px
;
}
table
tr
.even
{
background-color
:
white
;
color
:
#66666E
;
}
table
tr
.odd
{
background-color
:
#F6F6F6
;
color
:
#66666E
;
}
li
{
margin-bottom
:
10px
;
padding-left
:
12px
;
}
.cpp
{
display
:
block
;
margin
:
10
;
overflow
:
hidden
;
overflow-x
:
hidden
;
overflow-y
:
hidden
;
padding
:
20px
0
20px
0
;
}
.footer
{
margin-top
:
50px
;
}
.memItemLeft
{
padding-right
:
3px
;
}
.memItemRight
{
padding
:
3px
15px
3px
0
;
}
.qml
{
display
:
block
;
margin
:
10
;
overflow
:
hidden
;
overflow-x
:
hidden
;
overflow-y
:
hidden
;
padding
:
20px
0
20px
0
;
}
.qmldefault
{
padding-left
:
5px
;
float
:
right
;
color
:
red
;
}
.qmlreadonly
{
padding-left
:
5px
;
float
:
right
;
color
:
#254117
;
}
.rightAlign
{
padding
:
3px
5px
3px
10px
;
text-align
:
right
;
}
.title
{
background-color
:
white
;
color
:
#44A51C
;
font-family
:
Verdana
;
font-size
:
35px
;
font-weight
:
normal
;
left
:
0
;
padding-bottom
:
5px
;
padding-left
:
16px
;
padding-top
:
20px
;
position
:
absolute
;
right
:
0
;
top
:
0
;
}
.toc
{
float
:
right
;
-moz-border-radius
:
7px
7px
7px
7px
;
-webkit-border-radius
:
7px
7px
7px
7px
;
border-radius
:
7px
7px
7px
7px
;
background-color
:
#F6F6F6
;
border
:
1px
solid
#DDD
;
margin
:
0
20px
10px
10px
;
padding
:
20px
15px
20px
20px
;
height
:
auto
;
width
:
200px
;
}
libs/serialport/qserialport.cpp
0 → 100644
View file @
c2abde10
This diff is collapsed.
Click to expand it.
libs/serialport/qserialport.h
0 → 100644
View file @
c2abde10
/****************************************************************************
**
** Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Copyright (C) 2013 Laszlo Papp <lpapp@kde.org>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSerialPort module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QSERIALPORT_H
#define QSERIALPORT_H
#include <QtCore/qiodevice.h>
#include <qserialportglobal.h>
//#include <QtSerialPort/qserialportglobal.h>
QT_BEGIN_NAMESPACE
class
QSerialPortInfo
;
class
QSerialPortPrivate
;
class
Q_SERIALPORT_EXPORT
QSerialPort
:
public
QIODevice
{
Q_OBJECT
Q_PROPERTY
(
qint32
baudRate
READ
baudRate
WRITE
setBaudRate
NOTIFY
baudRateChanged
)
Q_PROPERTY
(
DataBits
dataBits
READ
dataBits
WRITE
setDataBits
NOTIFY
dataBitsChanged
)
Q_PROPERTY
(
Parity
parity
READ
parity
WRITE
setParity
NOTIFY
parityChanged
)
Q_PROPERTY
(
StopBits
stopBits
READ
stopBits
WRITE
setStopBits
NOTIFY
stopBitsChanged
)
Q_PROPERTY
(
FlowControl
flowControl
READ
flowControl
WRITE
setFlowControl
NOTIFY
flowControlChanged
)
Q_PROPERTY
(
DataErrorPolicy
dataErrorPolicy
READ
dataErrorPolicy
WRITE
setDataErrorPolicy
NOTIFY
dataErrorPolicyChanged
)
Q_PROPERTY
(
bool
dataTerminalReady
READ
isDataTerminalReady
WRITE
setDataTerminalReady
NOTIFY
dataTerminalReadyChanged
)
Q_PROPERTY
(
bool
requestToSend
READ
isRequestToSend
WRITE
setRequestToSend
NOTIFY
requestToSendChanged
)
Q_PROPERTY
(
SerialPortError
error
READ
error
RESET
clearError
NOTIFY
error
)
Q_PROPERTY
(
bool
settingsRestoredOnClose
READ
settingsRestoredOnClose
WRITE
setSettingsRestoredOnClose
NOTIFY
settingsRestoredOnCloseChanged
)
Q_ENUMS
(
Directions
Rate
DataBits
Parity
StopBits
FlowControl
PinoutSignals
DataErrorPolicy
SerialPortError
)
public:
enum
Direction
{
Input
=
1
,
Output
=
2
,
AllDirections
=
Input
|
Output
};
Q_DECLARE_FLAGS
(
Directions
,
Direction
)
enum
BaudRate
{
Baud1200
=
1200
,
Baud2400
=
2400
,
Baud4800
=
4800
,
Baud9600
=
9600
,
Baud19200
=
19200
,
Baud38400
=
38400
,
Baud57600
=
57600
,
Baud115200
=
115200
,
UnknownBaud
=
-
1
};
enum
DataBits
{
Data5
=
5
,
Data6
=
6
,
Data7
=
7
,
Data8
=
8
,
UnknownDataBits
=
-
1
};
enum
Parity
{
NoParity
=
0
,
EvenParity
=
2
,
OddParity
=
3
,
SpaceParity
=
4
,
MarkParity
=
5
,
UnknownParity
=
-
1
};
enum
StopBits
{
OneStop
=
1
,
OneAndHalfStop
=
3
,
TwoStop
=
2
,
UnknownStopBits
=
-
1
};
enum
FlowControl
{
NoFlowControl
,
HardwareControl
,
SoftwareControl
,
UnknownFlowControl
=
-
1
};
enum
PinoutSignal
{
NoSignal
=
0x00
,
TransmittedDataSignal
=
0x01
,
ReceivedDataSignal
=
0x02
,
DataTerminalReadySignal
=
0x04
,
DataCarrierDetectSignal
=
0x08
,
DataSetReadySignal
=
0x10
,
RingIndicatorSignal
=
0x20
,
RequestToSendSignal
=
0x40
,
ClearToSendSignal
=
0x80
,
SecondaryTransmittedDataSignal
=
0x100
,
SecondaryReceivedDataSignal
=
0x200
};
Q_DECLARE_FLAGS
(
PinoutSignals
,
PinoutSignal
)
enum
DataErrorPolicy
{
SkipPolicy
,
PassZeroPolicy
,
IgnorePolicy
,
StopReceivingPolicy
,
UnknownPolicy
=
-
1
};
enum
SerialPortError
{
NoError
,
DeviceNotFoundError
,
PermissionError
,
OpenError
,
ParityError
,
FramingError
,
BreakConditionError
,
WriteError
,
ReadError
,
ResourceError
,
UnsupportedOperationError
,
UnknownError
};
explicit
QSerialPort
(
QObject
*
parent
=
0
);
explicit
QSerialPort
(
const
QString
&
name
,
QObject
*
parent
=
0
);
explicit
QSerialPort
(
const
QSerialPortInfo
&
info
,
QObject
*
parent
=
0
);
virtual
~
QSerialPort
();
void
setPortName
(
const
QString
&
name
);
QString
portName
()
const
;
void
setPort
(
const
QSerialPortInfo
&
info
);
bool
open
(
OpenMode
mode
)
Q_DECL_OVERRIDE
;
void
close
()
Q_DECL_OVERRIDE
;
void
setSettingsRestoredOnClose
(
bool
restore
);
bool
settingsRestoredOnClose
()
const
;
bool
setBaudRate
(
qint32
baudRate
,
Directions
dir
=
AllDirections
);
qint32
baudRate
(
Directions
dir
=
AllDirections
)
const
;
bool
setDataBits
(
DataBits
dataBits
);
DataBits
dataBits
()
const
;
bool
setParity
(
Parity
parity
);
Parity
parity
()
const
;
bool
setStopBits
(
StopBits
stopBits
);
StopBits
stopBits
()
const
;
bool
setFlowControl
(
FlowControl
flow
);
FlowControl
flowControl
()
const
;
bool
setDataTerminalReady
(
bool
set
);
bool
isDataTerminalReady
();
bool
setRequestToSend
(
bool
set
);
bool
isRequestToSend
();
PinoutSignals
pinoutSignals
();
bool
flush
();
bool
clear
(
Directions
dir
=
AllDirections
);
bool
atEnd
()
const
Q_DECL_OVERRIDE
;
bool
setDataErrorPolicy
(
DataErrorPolicy
policy
=
IgnorePolicy
);
DataErrorPolicy
dataErrorPolicy
()
const
;
SerialPortError
error
()
const
;
void
clearError
();
qint64
readBufferSize
()
const
;
void
setReadBufferSize
(
qint64
size
);
bool
isSequential
()
const
Q_DECL_OVERRIDE
;
qint64
bytesAvailable
()
const
Q_DECL_OVERRIDE
;
qint64
bytesToWrite
()
const
Q_DECL_OVERRIDE
;
bool
canReadLine
()
const
Q_DECL_OVERRIDE
;
bool
waitForReadyRead
(
int
msecs
)
Q_DECL_OVERRIDE
;
bool
waitForBytesWritten
(
int
msecs
)
Q_DECL_OVERRIDE
;
bool
sendBreak
(
int
duration
=
0
);
bool
setBreakEnabled
(
bool
set
=
true
);
Q_SIGNALS:
void
baudRateChanged
(
qint32
baudRate
,
QSerialPort
::
Directions
dir
);
void
dataBitsChanged
(
QSerialPort
::
DataBits
dataBits
);
void
parityChanged
(
QSerialPort
::
Parity
parity
);
void
stopBitsChanged
(
QSerialPort
::
StopBits
stopBits
);
void
flowControlChanged
(
QSerialPort
::
FlowControl
flow
);
void
dataErrorPolicyChanged
(
QSerialPort
::
DataErrorPolicy
policy
);
void
dataTerminalReadyChanged
(
bool
set
);
void
requestToSendChanged
(
bool
set
);
void
error
(
QSerialPort
::
SerialPortError
serialPortError
);
void
settingsRestoredOnCloseChanged
(
bool
restore
);
protected:
qint64
readData
(
char
*
data
,
qint64
maxSize
)
Q_DECL_OVERRIDE
;
qint64
readLineData
(
char
*
data
,
qint64
maxSize
)
Q_DECL_OVERRIDE
;
qint64
writeData
(
const
char
*
data
,
qint64
maxSize
)
Q_DECL_OVERRIDE
;
private:
void
setError
(
QSerialPort
::
SerialPortError
error
,
const
QString
&
errorString
=
QString
());
QSerialPortPrivate
*
const
d_ptr
;
Q_DECLARE_PRIVATE
(
QSerialPort
)
Q_DISABLE_COPY
(
QSerialPort
)
};
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QSerialPort
::
Directions
)
Q_DECLARE_OPERATORS_FOR_FLAGS
(
QSerialPort
::
PinoutSignals
)
QT_END_NAMESPACE
#endif // QSERIALPORT_H
libs/serialport/qserialport_p.h
0 → 100644
View file @
c2abde10
/****************************************************************************
**
** Copyright (C) 2011-2012 Denis Shienkov <denis.shienkov@gmail.com>
** Copyright (C) 2011 Sergey Belyashov <Sergey.Belyashov@gmail.com>
** Copyright (C) 2012 Laszlo Papp <lpapp@kde.org>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSerialPort module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QSERIALPORT_P_H
#define QSERIALPORT_P_H
#include "qserialport.h"
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <private/qringbuffer_p.h>
#else
#include "qt4support/qringbuffer_p.h"
#endif
QT_BEGIN_NAMESPACE
class
QSerialPortPrivateData
{
Q_DECLARE_PUBLIC
(
QSerialPort
)
public:
enum
IoConstants
{
ReadChunkSize
=
512
,
WriteChunkSize
=
512
};
QSerialPortPrivateData
(
QSerialPort
*
q
);
int
timeoutValue
(
int
msecs
,
int
elapsed
);
qint64
readBufferMaxSize
;
QRingBuffer
readBuffer
;
QRingBuffer
writeBuffer
;
QSerialPort
::
SerialPortError
error
;
QString
systemLocation
;
qint32
inputBaudRate
;
qint32
outputBaudRate
;
QSerialPort
::
DataBits
dataBits
;
QSerialPort
::
Parity
parity
;
QSerialPort
::
StopBits
stopBits
;
QSerialPort
::
FlowControl
flow
;
QSerialPort
::
DataErrorPolicy
policy
;
bool
dataTerminalReady
;
bool
requestToSend
;
bool
settingsRestoredOnClose
;
QSerialPort
*
const
q_ptr
;
};
QT_END_NAMESPACE
#endif // QSERIALPORT_P_H
libs/serialport/qserialport_symbian.cpp
0 → 100644
View file @
c2abde10
This diff is collapsed.
Click to expand it.
libs/serialport/qserialport_symbian_p.h
0 → 100644
View file @
c2abde10
/****************************************************************************
**
** Copyright (C) 2012 Denis Shienkov <denis.shienkov@gmail.com>
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtSerialPort module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the