summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Papp <lpapp@kde.org>2013-02-18 21:24:08 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 11:22:22 +0100
commit92c9fbcf2c5477668135e805ed927c721e87f591 (patch)
tree1dbcb5ace16f87cf30547f3dc419a9a550ae00c8
parent867bf0f2a7e814a584153e39b2e482ab284a3dc1 (diff)
downloadqtserialport-92c9fbcf2c5477668135e805ed927c721e87f591.tar.gz
Rename the line status signal enumeration values and remove Le
The order and names are made up according to the following article entries: * http://en.wikipedia.org/wiki/Serial_port#Pinouts * http://www.tldp.org/HOWTO/Serial-HOWTO-19.html * http://en.wikipedia.org/wiki/RS-232#Signals Change-Id: I928628ef2fb176e7d2c4f32b840c93a737ffddb0 Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rw-r--r--src/serialport/qserialport.cpp25
-rw-r--r--src/serialport/qserialport.h19
-rw-r--r--src/serialport/qserialport_symbian.cpp12
-rw-r--r--src/serialport/qserialport_unix.cpp22
-rw-r--r--src/serialport/qserialport_win.cpp12
5 files changed, 46 insertions, 44 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp
index b53a56c..66d60a9 100644
--- a/src/serialport/qserialport.cpp
+++ b/src/serialport/qserialport.cpp
@@ -319,16 +319,17 @@ int QSerialPortPrivateData::timeoutValue(int msecs, int elapsed)
This enum describes the possible RS-232 pinout signals.
- \value NoLine no any line is active
- \value LeLine DSR (Data Set Ready, Line Enable).
- \value DtrLine DTR (Data Terminal Ready).
- \value RtsLine RTS (Request To Send).
- \value StLine Secondary TXD (Transmit).
- \value SrLine Secondary RXD (Receive).
- \value CtsLine CTS (Clear To Send).
- \value DcdLine DCD (Data Carrier Detect).
- \value RiLine RNG (Ring).
- \value DsrLine DSR (Data Set Ready).
+ \value NoLine No line active
+ \value TransmittedDataLine TxD (Transmitted Data).
+ \value ReceivedDataLine RxD (Received Data).
+ \value DataTerminalReadyLine DTR (Data Terminal Ready).
+ \value DataCarrierDetectLine DCD (Data Carrier Detect).
+ \value DataSetReadyLine DSR (Data Set Ready).
+ \value RingIndicatorLine RNG (Ring Indicator).
+ \value RequestToSendLine RTS (Request To Send).
+ \value ClearToSendLine CTS (Clear To Send).
+ \value SecondaryTransmittedDataLine STD (Secondary Transmitted Data).
+ \value SecondaryReceivedDataLine SRD (Secondary Received Data).
\sa lines(), QSerialPort::dataTerminalReady, QSerialPort::requestToSend
*/
@@ -827,7 +828,7 @@ bool QSerialPort::setDataTerminalReady(bool set)
bool QSerialPort::isDataTerminalReady()
{
Q_D(const QSerialPort);
- return d->lines() & QSerialPort::DtrLine;
+ return d->lines() & QSerialPort::DataTerminalReadyLine;
}
/*!
@@ -865,7 +866,7 @@ bool QSerialPort::setRequestToSend(bool set)
bool QSerialPort::isRequestToSend()
{
Q_D(const QSerialPort);
- return d->lines() & QSerialPort::RtsLine;
+ return d->lines() & QSerialPort::RequestToSendLine;
}
/*!
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h
index 0343036..2c515ef 100644
--- a/src/serialport/qserialport.h
+++ b/src/serialport/qserialport.h
@@ -123,15 +123,16 @@ public:
enum Line {
NoLine = 0x00,
- LeLine = 0x01,
- DtrLine = 0x02,
- RtsLine = 0x04,
- StLine = 0x08,
- SrLine = 0x10,
- CtsLine = 0x20,
- DcdLine = 0x40,
- RiLine = 0x80,
- DsrLine = LeLine
+ TransmittedDataLine = 0x01,
+ ReceivedDataLine = 0x02,
+ DataTerminalReadyLine = 0x04,
+ DataCarrierDetectLine = 0x08,
+ DataSetReadyLine = 0x10,
+ RingIndicatorLine = 0x20,
+ RequestToSendLine = 0x40,
+ ClearToSendLine = 0x80,
+ SecondaryTransmittedDataLine = 0x100,
+ SecondaryReceivedDataLine = 0x200,
};
Q_DECLARE_FLAGS(Lines, Line)
diff --git a/src/serialport/qserialport_symbian.cpp b/src/serialport/qserialport_symbian.cpp
index 31b9a12..a925ea5 100644
--- a/src/serialport/qserialport_symbian.cpp
+++ b/src/serialport/qserialport_symbian.cpp
@@ -166,17 +166,17 @@ QSerialPort::Lines QSerialPortPrivate::lines() const
descriptor.Signals(signalMask);
if (signalMask & KSignalCTS)
- ret |= QSerialPort::CtsLine;
+ ret |= QSerialPort::ClearToSendLine;
if (signalMask & KSignalDSR)
- ret |= QSerialPort::DsrLine;
+ ret |= QSerialPort::DataSetReadyLine;
if (signalMask & KSignalDCD)
- ret |= QSerialPort::DcdLine;
+ ret |= QSerialPort::DataCarrierDetectLine;
if (signalMask & KSignalRNG)
- ret |= QSerialPort::RiLine;
+ ret |= QSerialPort::RingIndicatorLine;
if (signalMask & KSignalRTS)
- ret |= QSerialPort::RtsLine;
+ ret |= QSerialPort::RequestToSendLine;
if (signalMask & KSignalDTR)
- ret |= QSerialPort::DtrLine;
+ ret |= QSerialPort::DataTerminalReadyLine;
//if (signalMask & KSignalBreak)
// ret |=
diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp
index 8513002..e7b5cb3 100644
--- a/src/serialport/qserialport_unix.cpp
+++ b/src/serialport/qserialport_unix.cpp
@@ -264,45 +264,45 @@ QSerialPort::Lines QSerialPortPrivate::lines() const
#ifdef TIOCM_LE
if (arg & TIOCM_LE)
- ret |= QSerialPort::LeLine;
+ ret |= QSerialPort::DataSetReadyLine;
#endif
#ifdef TIOCM_DTR
if (arg & TIOCM_DTR)
- ret |= QSerialPort::DtrLine;
+ ret |= QSerialPort::DataTerminalReadyLine;
#endif
#ifdef TIOCM_RTS
if (arg & TIOCM_RTS)
- ret |= QSerialPort::RtsLine;
+ ret |= QSerialPort::RequestToSendLine;
#endif
#ifdef TIOCM_ST
if (arg & TIOCM_ST)
- ret |= QSerialPort::StLine;
+ ret |= QSerialPort::SecondaryTransmittedDataLine;
#endif
#ifdef TIOCM_SR
if (arg & TIOCM_SR)
- ret |= QSerialPort::SrLine;
+ ret |= QSerialPort::SecondaryReceivedDataLine;
#endif
#ifdef TIOCM_CTS
if (arg & TIOCM_CTS)
- ret |= QSerialPort::CtsLine;
+ ret |= QSerialPort::ClearToSendLine;
#endif
#ifdef TIOCM_CAR
if (arg & TIOCM_CAR)
- ret |= QSerialPort::DcdLine;
+ ret |= QSerialPort::DataCarrierDetectLine;
#elif defined TIOCM_CD
if (arg & TIOCM_CD)
- ret |= QSerialPort::DcdLine;
+ ret |= QSerialPort::DataCarrierDetectLine;
#endif
#ifdef TIOCM_RNG
if (arg & TIOCM_RNG)
- ret |= QSerialPort::RiLine;
+ ret |= QSerialPort::RingIndicatorLine;
#elif defined TIOCM_RI
if (arg & TIOCM_RI)
- ret |= QSerialPort::RiLine;
+ ret |= QSerialPort::RingIndicatorLine;
#endif
#ifdef TIOCM_DSR
if (arg & TIOCM_DSR)
- ret |= QSerialPort::DsrLine;
+ ret |= QSerialPort::DataSetReadyLine;
#endif
return ret;
diff --git a/src/serialport/qserialport_win.cpp b/src/serialport/qserialport_win.cpp
index 10a8359..0e094a3 100644
--- a/src/serialport/qserialport_win.cpp
+++ b/src/serialport/qserialport_win.cpp
@@ -316,13 +316,13 @@ QSerialPort::Lines QSerialPortPrivate::lines() const
}
if (modemStat & MS_CTS_ON)
- ret |= QSerialPort::CtsLine;
+ ret |= QSerialPort::ClearToSendLine;
if (modemStat & MS_DSR_ON)
- ret |= QSerialPort::DsrLine;
+ ret |= QSerialPort::DataSetReadyLine;
if (modemStat & MS_RING_ON)
- ret |= QSerialPort::RiLine;
+ ret |= QSerialPort::RingIndicatorLine;
if (modemStat & MS_RLSD_ON)
- ret |= QSerialPort::DcdLine;
+ ret |= QSerialPort::DataCarrierDetectLine;
DWORD bytesReturned = 0;
if (::DeviceIoControl(descriptor, IOCTL_SERIAL_GET_DTRRTS, NULL, 0,
@@ -330,9 +330,9 @@ QSerialPort::Lines QSerialPortPrivate::lines() const
&bytesReturned, NULL)) {
if (modemStat & SERIAL_DTR_STATE)
- ret |= QSerialPort::DtrLine;
+ ret |= QSerialPort::DataTerminalReadyLine;
if (modemStat & SERIAL_RTS_STATE)
- ret |= QSerialPort::RtsLine;
+ ret |= QSerialPort::RequestToSendLine;
}
return ret;