コード例 #1
0
ファイル: qserialport.cpp プロジェクト: DeuceEFI/emsload
/*!
    \property QSerialPort::requestToSend
    \brief the state (high or low) of the line signal RTS

    If the setting is successful, returns true; otherwise returns false.
    If the flag is true then the RTS signal is set to high; otherwise low.

    \sa pinoutSignals()
*/
bool QSerialPort::setRequestToSend(bool set)
{
    Q_D(QSerialPort);

    bool retval = d->setRequestToSend(set);
    if (retval && (d->requestToSend != set)) {
        d->requestToSend = set;
        emit requestToSendChanged(set);
    }

    return retval;
}
コード例 #2
0
/*!
    \property QSerialPort::requestToSend
    \brief the state (high or low) of the line signal RTS

    Returns true on success, false otherwise.
    If the flag is true then the RTS signal is set to high; otherwise low.

    \note The serial port has to be open before trying to set or get this
    property; otherwise false is returned and the error code is set to
    NotOpenError.

    \sa pinoutSignals()
*/
bool QSerialPort::setRequestToSend(bool set)
{
    Q_D(QSerialPort);

    if (!isOpen()) {
        setError(QSerialPort::NotOpenError);
        qWarning("%s: device not open", Q_FUNC_INFO);
        return false;
    }

    const bool requestToSend = isRequestToSend();
    const bool retval = d->setRequestToSend(set);
    if (retval && (requestToSend != set))
        emit requestToSendChanged(set);

    return retval;
}
コード例 #3
0
ファイル: qserialport.cpp プロジェクト: 2gis/2gisqt5android
/*!
    \property QSerialPort::requestToSend
    \brief the state (high or low) of the line signal RTS

    Returns true on success, false otherwise.
    If the flag is true then the RTS signal is set to high; otherwise low.

    \note The serial port has to be open before trying to set or get this
    property; otherwise false is returned and the error code is set to
    NotOpenError.

    \sa pinoutSignals()
*/
bool QSerialPort::setRequestToSend(bool set)
{
    Q_D(QSerialPort);

    if (!isOpen()) {
        d->setError(QSerialPortErrorInfo(QSerialPort::NotOpenError));
        qWarning("%s: device not open", Q_FUNC_INFO);
        return false;
    }

    if (d->flowControl == QSerialPort::HardwareControl) {
        d->setError(QSerialPortErrorInfo(QSerialPort::UnsupportedOperationError));
        return false;
    }

    const bool requestToSend = isRequestToSend();
    const bool retval = d->setRequestToSend(set);
    if (retval && (requestToSend != set))
        emit requestToSendChanged(set);

    return retval;
}