/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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 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.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtSerialPort.h"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSerialPort/qserialport.sip"
#include <qserialport.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSerialPort/qserialportinfo.sip"
#include <qserialportinfo.h>
#line 39 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 45 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 48 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qiodevicebase.sip"
#include <qiodevicebase.h>
#line 51 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 54 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 154 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 59 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 62 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 65 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 277 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 68 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 254 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 71 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 74 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 77 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 135 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 80 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 154 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 85 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 88 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qanystringview.sip"
#include <qanystringview.h>
#line 91 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 25 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 94 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 97 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"
#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 100 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"


class sipQSerialPort : public ::QSerialPort
{
public:
    sipQSerialPort(::QObject*);
    sipQSerialPort(const ::QString&, ::QObject*);
    sipQSerialPort(const ::QSerialPortInfo&, ::QObject*);
    virtual ~sipQSerialPort();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    ::qint64 writeData(const char*, long long) SIP_OVERRIDE;
    void disconnectNotify(const ::QMetaMethod&) SIP_OVERRIDE;
    void connectNotify(const ::QMetaMethod&) SIP_OVERRIDE;
    void customEvent(::QEvent*) SIP_OVERRIDE;
    void childEvent(::QChildEvent*) SIP_OVERRIDE;
    void timerEvent(::QTimerEvent*) SIP_OVERRIDE;
    bool eventFilter(::QObject*, ::QEvent*) SIP_OVERRIDE;
    bool event(::QEvent*) SIP_OVERRIDE;
    bool isSequential() const SIP_OVERRIDE;
    bool open(::QIODeviceBase::OpenMode) SIP_OVERRIDE;
    void close() SIP_OVERRIDE;
    ::qint64 pos() const SIP_OVERRIDE;
    ::qint64 size() const SIP_OVERRIDE;
    bool seek(::qint64) SIP_OVERRIDE;
    bool atEnd() const SIP_OVERRIDE;
    bool reset() SIP_OVERRIDE;
    ::qint64 bytesAvailable() const SIP_OVERRIDE;
    ::qint64 bytesToWrite() const SIP_OVERRIDE;
    bool canReadLine() const SIP_OVERRIDE;
    bool waitForReadyRead(int) SIP_OVERRIDE;
    bool waitForBytesWritten(int) SIP_OVERRIDE;
    ::qint64 readData(char*, ::qint64) SIP_OVERRIDE;
    ::qint64 readLineData(char*, ::qint64) SIP_OVERRIDE;
    ::qint64 skipData(::qint64) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQSerialPort(const sipQSerialPort &);
    sipQSerialPort &operator = (const sipQSerialPort &);

    char sipPyMethods[24];
};

sipQSerialPort::sipQSerialPort(::QObject*a0): ::QSerialPort(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSerialPort::sipQSerialPort(const ::QString& a0, ::QObject*a1): ::QSerialPort(a0, a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSerialPort::sipQSerialPort(const ::QSerialPortInfo& a0, ::QObject*a1): ::QSerialPort(a0, a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQSerialPort::~sipQSerialPort()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQSerialPort::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtSerialPort_qt_metaobject(sipPySelf, sipType_QSerialPort);

    return ::QSerialPort::metaObject();
}

int sipQSerialPort::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = ::QSerialPort::qt_metacall(_c, _id, _a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtSerialPort_qt_metacall(sipPySelf, sipType_QSerialPort, _c, _id, _a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQSerialPort::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtSerialPort_qt_metacast(sipPySelf, sipType_QSerialPort, _clname, &sipCpp) ? sipCpp : ::QSerialPort::qt_metacast(_clname));
}

::qint64 sipQSerialPort::writeData(const char*a0, long long a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_writeData);

    if (!sipMeth)
        return ::QSerialPort::writeData(a0, a1);

    extern ::qint64 sipVH_QtSerialPort_15(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const char*, long long);

    return sipVH_QtSerialPort_15(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

void sipQSerialPort::disconnectNotify(const ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
        ::QSerialPort::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtSerialPort_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QMetaMethod&);

    sipVH_QtSerialPort_14(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSerialPort::connectNotify(const ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
        ::QSerialPort::connectNotify(a0);
        return;
    }

    extern void sipVH_QtSerialPort_14(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::QMetaMethod&);

    sipVH_QtSerialPort_14(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSerialPort::customEvent(::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
        ::QSerialPort::customEvent(a0);
        return;
    }

    extern void sipVH_QtSerialPort_13(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QEvent*);

    sipVH_QtSerialPort_13(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSerialPort::childEvent(::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
        ::QSerialPort::childEvent(a0);
        return;
    }

    extern void sipVH_QtSerialPort_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QChildEvent*);

    sipVH_QtSerialPort_12(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSerialPort::timerEvent(::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
        ::QSerialPort::timerEvent(a0);
        return;
    }

    extern void sipVH_QtSerialPort_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QTimerEvent*);

    sipVH_QtSerialPort_11(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSerialPort::eventFilter(::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return ::QSerialPort::eventFilter(a0, a1);

    extern bool sipVH_QtSerialPort_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QObject*, ::QEvent*);

    return sipVH_QtSerialPort_10(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

bool sipQSerialPort::event(::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return ::QSerialPort::event(a0);

    extern bool sipVH_QtSerialPort_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QEvent*);

    return sipVH_QtSerialPort_9(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSerialPort::isSequential() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[8]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_isSequential);

    if (!sipMeth)
        return ::QSerialPort::isSequential();

    extern bool sipVH_QtSerialPort_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_4(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSerialPort::open(::QIODeviceBase::OpenMode a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[9], &sipPySelf, SIP_NULLPTR, sipName_open);

    if (!sipMeth)
        return ::QSerialPort::open(a0);

    extern bool sipVH_QtSerialPort_8(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::QIODeviceBase::OpenMode);

    return sipVH_QtSerialPort_8(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQSerialPort::close()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[10], &sipPySelf, SIP_NULLPTR, sipName_close);

    if (!sipMeth)
    {
        ::QSerialPort::close();
        return;
    }

    extern void sipVH_QtSerialPort_7(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    sipVH_QtSerialPort_7(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

::qint64 sipQSerialPort::pos() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[11]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_pos);

    if (!sipMeth)
        return ::QSerialPort::pos();

    extern ::qint64 sipVH_QtSerialPort_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_5(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

::qint64 sipQSerialPort::size() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[12]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_size);

    if (!sipMeth)
        return ::QSerialPort::size();

    extern ::qint64 sipVH_QtSerialPort_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_5(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSerialPort::seek(::qint64 a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[13], &sipPySelf, SIP_NULLPTR, sipName_seek);

    if (!sipMeth)
        return ::QSerialPort::seek(a0);

    extern bool sipVH_QtSerialPort_6(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::qint64);

    return sipVH_QtSerialPort_6(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSerialPort::atEnd() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[14]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_atEnd);

    if (!sipMeth)
        return ::QSerialPort::atEnd();

    extern bool sipVH_QtSerialPort_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_4(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSerialPort::reset()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[15], &sipPySelf, SIP_NULLPTR, sipName_reset);

    if (!sipMeth)
        return ::QSerialPort::reset();

    extern bool sipVH_QtSerialPort_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_4(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

::qint64 sipQSerialPort::bytesAvailable() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[16]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_bytesAvailable);

    if (!sipMeth)
        return ::QSerialPort::bytesAvailable();

    extern ::qint64 sipVH_QtSerialPort_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_5(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

::qint64 sipQSerialPort::bytesToWrite() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[17]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_bytesToWrite);

    if (!sipMeth)
        return ::QSerialPort::bytesToWrite();

    extern ::qint64 sipVH_QtSerialPort_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_5(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSerialPort::canReadLine() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[18]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_canReadLine);

    if (!sipMeth)
        return ::QSerialPort::canReadLine();

    extern bool sipVH_QtSerialPort_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtSerialPort_4(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQSerialPort::waitForReadyRead(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[19], &sipPySelf, SIP_NULLPTR, sipName_waitForReadyRead);

    if (!sipMeth)
        return ::QSerialPort::waitForReadyRead(a0);

    extern bool sipVH_QtSerialPort_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH_QtSerialPort_3(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQSerialPort::waitForBytesWritten(int a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[20], &sipPySelf, SIP_NULLPTR, sipName_waitForBytesWritten);

    if (!sipMeth)
        return ::QSerialPort::waitForBytesWritten(a0);

    extern bool sipVH_QtSerialPort_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, int);

    return sipVH_QtSerialPort_3(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

::qint64 sipQSerialPort::readData(char*a0, ::qint64 a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[21], &sipPySelf, SIP_NULLPTR, sipName_readData);

    if (!sipMeth)
        return ::QSerialPort::readData(a0, a1);

    extern ::qint64 sipVH_QtSerialPort_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, char*, ::qint64);

    return sipVH_QtSerialPort_2(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

::qint64 sipQSerialPort::readLineData(char*a0, ::qint64 a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[22], &sipPySelf, SIP_NULLPTR, sipName_readLineData);

    if (!sipMeth)
        return ::QSerialPort::readLineData(a0, a1);

    extern ::qint64 sipVH_QtSerialPort_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, char*, ::qint64);

    return sipVH_QtSerialPort_1(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

::qint64 sipQSerialPort::skipData(::qint64 a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[23], &sipPySelf, SIP_NULLPTR, sipName_skipData);

    if (!sipMeth)
        return ::QSerialPort::skipData(a0);

    extern ::qint64 sipVH_QtSerialPort_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::qint64);

    return sipVH_QtSerialPort_0(sipGILState, sipImportedVirtErrorHandlers_QtSerialPort_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QSerialPort_setPortName, "setPortName(self, name: str|None)");

extern "C" {static PyObject *meth_QSerialPort_setPortName(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setPortName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QString* a0;
        int a0State = 0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPortName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setPortName, doc_QSerialPort_setPortName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_portName, "portName(self) -> str");

extern "C" {static PyObject *meth_QSerialPort_portName(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_portName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->portName());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_portName, doc_QSerialPort_portName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setPort, "setPort(self, info: QSerialPortInfo)");

extern "C" {static PyObject *meth_QSerialPort_setPort(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setPort(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPortInfo* a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QSerialPortInfo, &a0))
        {
            sipCpp->setPort(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setPort, doc_QSerialPort_setPort);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_open, "open(self, mode: QIODeviceBase.OpenModeFlag) -> bool");

extern "C" {static PyObject *meth_QSerialPort_open(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_open(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QIODeviceBase::OpenMode* a0;
        int a0State = 0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QFlags_0100QIODeviceBase_OpenModeFlag, &a0, &a0State))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::open(*a0) : sipCpp->open(*a0));
            Py_END_ALLOW_THREADS
            sipReleaseType(a0, sipType_QFlags_0100QIODeviceBase_OpenModeFlag, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_open, doc_QSerialPort_open);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_close, "close(self)");

extern "C" {static PyObject *meth_QSerialPort_close(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_close(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            (sipSelfWasArg ? sipCpp->::QSerialPort::close() : sipCpp->close());
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_close, doc_QSerialPort_close);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setBaudRate, "setBaudRate(self, baudRate: int, dir: QSerialPort.Direction = QSerialPort.AllDirections) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setBaudRate(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setBaudRate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::qint32 a0;
        ::QSerialPort::Directions a1def = QSerialPort::AllDirections;
        ::QSerialPort::Directions* a1 = &a1def;
        int a1State = 0;
        ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_dir,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "Bi|J1", &sipSelf, sipType_QSerialPort, &sipCpp, &a0, sipType_QFlags_0100QSerialPort_Direction, &a1, &a1State))
        {
            bool sipRes;

            sipRes = sipCpp->setBaudRate(a0, *a1);
            sipReleaseType(a1, sipType_QFlags_0100QSerialPort_Direction, a1State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setBaudRate, doc_QSerialPort_setBaudRate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_baudRate, "baudRate(self, dir: QSerialPort.Direction = QSerialPort.AllDirections) -> int");

extern "C" {static PyObject *meth_QSerialPort_baudRate(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_baudRate(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::Directions a0def = QSerialPort::AllDirections;
        ::QSerialPort::Directions* a0 = &a0def;
        int a0State = 0;
        const ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            sipName_dir,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QFlags_0100QSerialPort_Direction, &a0, &a0State))
        {
            ::qint32 sipRes;

            sipRes = sipCpp->baudRate(*a0);
            sipReleaseType(a0, sipType_QFlags_0100QSerialPort_Direction, a0State);

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_baudRate, doc_QSerialPort_baudRate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setDataBits, "setDataBits(self, dataBits: QSerialPort.DataBits) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setDataBits(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setDataBits(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::DataBits a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QSerialPort_DataBits, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setDataBits(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setDataBits, doc_QSerialPort_setDataBits);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_dataBits, "dataBits(self) -> QSerialPort.DataBits");

extern "C" {static PyObject *meth_QSerialPort_dataBits(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_dataBits(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::DataBits sipRes;

            sipRes = sipCpp->dataBits();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSerialPort_DataBits);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_dataBits, doc_QSerialPort_dataBits);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setParity, "setParity(self, parity: QSerialPort.Parity) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setParity(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setParity(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::Parity a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QSerialPort_Parity, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setParity(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setParity, doc_QSerialPort_setParity);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_parity, "parity(self) -> QSerialPort.Parity");

extern "C" {static PyObject *meth_QSerialPort_parity(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_parity(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::Parity sipRes;

            sipRes = sipCpp->parity();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSerialPort_Parity);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_parity, doc_QSerialPort_parity);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setStopBits, "setStopBits(self, stopBits: QSerialPort.StopBits) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setStopBits(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setStopBits(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::StopBits a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QSerialPort_StopBits, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setStopBits(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setStopBits, doc_QSerialPort_setStopBits);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_stopBits, "stopBits(self) -> QSerialPort.StopBits");

extern "C" {static PyObject *meth_QSerialPort_stopBits(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_stopBits(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::StopBits sipRes;

            sipRes = sipCpp->stopBits();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSerialPort_StopBits);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_stopBits, doc_QSerialPort_stopBits);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setFlowControl, "setFlowControl(self, flow: QSerialPort.FlowControl) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setFlowControl(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setFlowControl(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::FlowControl a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QSerialPort_FlowControl, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setFlowControl(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setFlowControl, doc_QSerialPort_setFlowControl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_flowControl, "flowControl(self) -> QSerialPort.FlowControl");

extern "C" {static PyObject *meth_QSerialPort_flowControl(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_flowControl(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::FlowControl sipRes;

            sipRes = sipCpp->flowControl();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSerialPort_FlowControl);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_flowControl, doc_QSerialPort_flowControl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setDataTerminalReady, "setDataTerminalReady(self, set: bool) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setDataTerminalReady(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setDataTerminalReady(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setDataTerminalReady(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setDataTerminalReady, doc_QSerialPort_setDataTerminalReady);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_isDataTerminalReady, "isDataTerminalReady(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_isDataTerminalReady(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_isDataTerminalReady(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isDataTerminalReady();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_isDataTerminalReady, doc_QSerialPort_isDataTerminalReady);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setRequestToSend, "setRequestToSend(self, set: bool) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setRequestToSend(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setRequestToSend(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setRequestToSend(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setRequestToSend, doc_QSerialPort_setRequestToSend);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_isRequestToSend, "isRequestToSend(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_isRequestToSend(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_isRequestToSend(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isRequestToSend();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_isRequestToSend, doc_QSerialPort_isRequestToSend);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_pinoutSignals, "pinoutSignals(self) -> QSerialPort.PinoutSignal");

extern "C" {static PyObject *meth_QSerialPort_pinoutSignals(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_pinoutSignals(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::PinoutSignals*sipRes;

            sipRes = new ::QSerialPort::PinoutSignals(sipCpp->pinoutSignals());

            return sipConvertFromNewType(sipRes, sipType_QFlags_0100QSerialPort_PinoutSignal, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_pinoutSignals, doc_QSerialPort_pinoutSignals);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_flush, "flush(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_flush(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_flush(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->flush();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_flush, doc_QSerialPort_flush);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_clear, "clear(self, dir: QSerialPort.Direction = QSerialPort.AllDirections) -> bool");

extern "C" {static PyObject *meth_QSerialPort_clear(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_clear(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort::Directions a0def = QSerialPort::AllDirections;
        ::QSerialPort::Directions* a0 = &a0def;
        int a0State = 0;
        ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            sipName_dir,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|J1", &sipSelf, sipType_QSerialPort, &sipCpp, sipType_QFlags_0100QSerialPort_Direction, &a0, &a0State))
        {
            bool sipRes;

            sipRes = sipCpp->clear(*a0);
            sipReleaseType(a0, sipType_QFlags_0100QSerialPort_Direction, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_clear, doc_QSerialPort_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_error, "error(self) -> QSerialPort.SerialPortError");

extern "C" {static PyObject *meth_QSerialPort_error(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_error(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::QSerialPort::SerialPortError sipRes;

            sipRes = sipCpp->error();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QSerialPort_SerialPortError);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_error, doc_QSerialPort_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_clearError, "clearError(self)");

extern "C" {static PyObject *meth_QSerialPort_clearError(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_clearError(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            sipCpp->clearError();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_clearError, doc_QSerialPort_clearError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_readBufferSize, "readBufferSize(self) -> int");

extern "C" {static PyObject *meth_QSerialPort_readBufferSize(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_readBufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = sipCpp->readBufferSize();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_readBufferSize, doc_QSerialPort_readBufferSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setReadBufferSize, "setReadBufferSize(self, size: int)");

extern "C" {static PyObject *meth_QSerialPort_setReadBufferSize(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setReadBufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::qint64 a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            sipCpp->setReadBufferSize(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setReadBufferSize, doc_QSerialPort_setReadBufferSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_isSequential, "isSequential(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_isSequential(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_isSequential(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::isSequential() : sipCpp->isSequential());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_isSequential, doc_QSerialPort_isSequential);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_bytesAvailable, "bytesAvailable(self) -> int");

extern "C" {static PyObject *meth_QSerialPort_bytesAvailable(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_bytesAvailable(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::bytesAvailable() : sipCpp->bytesAvailable());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_bytesAvailable, doc_QSerialPort_bytesAvailable);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_bytesToWrite, "bytesToWrite(self) -> int");

extern "C" {static PyObject *meth_QSerialPort_bytesToWrite(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_bytesToWrite(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::bytesToWrite() : sipCpp->bytesToWrite());

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_bytesToWrite, doc_QSerialPort_bytesToWrite);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_canReadLine, "canReadLine(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_canReadLine(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_canReadLine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::canReadLine() : sipCpp->canReadLine());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_canReadLine, doc_QSerialPort_canReadLine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_waitForReadyRead, "waitForReadyRead(self, msecs: int = 30000) -> bool");

extern "C" {static PyObject *meth_QSerialPort_waitForReadyRead(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_waitForReadyRead(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0 = 30000;
        ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            sipName_msecs,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::waitForReadyRead(a0) : sipCpp->waitForReadyRead(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_waitForReadyRead, doc_QSerialPort_waitForReadyRead);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_waitForBytesWritten, "waitForBytesWritten(self, msecs: int = 30000) -> bool");

extern "C" {static PyObject *meth_QSerialPort_waitForBytesWritten(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_waitForBytesWritten(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        int a0 = 30000;
        ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            sipName_msecs,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::waitForBytesWritten(a0) : sipCpp->waitForBytesWritten(a0));
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_waitForBytesWritten, doc_QSerialPort_waitForBytesWritten);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setBreakEnabled, "setBreakEnabled(self, enabled: bool = True) -> bool");

extern "C" {static PyObject *meth_QSerialPort_setBreakEnabled(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setBreakEnabled(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0 = 1;
        ::QSerialPort *sipCpp;

        static const char *sipKwdList[] = {
            sipName_enabled,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|b", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->setBreakEnabled(a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setBreakEnabled, doc_QSerialPort_setBreakEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_readData, "readData(self, maxlen: int) -> bytes");

extern "C" {static PyObject *meth_QSerialPort_readData(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_readData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::qint64 a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pn", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

#line 192 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSerialPort/qserialport.sip"
        // Return the data read or None if there was an error.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            len = sipSelfWasArg ? sipCpp->QSerialPort::readData(s, a0) : sipCpp->readData(s, a0);
        #else
            len = sipCpp->sipProtectVirt_readData(sipSelfWasArg, s, a0);
        #endif
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = PyBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1561 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_readData, doc_QSerialPort_readData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_readLineData, "readLineData(self, maxlen: int) -> bytes");

extern "C" {static PyObject *meth_QSerialPort_readLineData(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_readLineData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::qint64 a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pn", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            PyObject * sipRes = SIP_NULLPTR;
            int sipIsErr = 0;

#line 230 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtSerialPort/qserialport.sip"
        // Return the data read or None if there was an error.
        if (a0 < 0)
        {
            PyErr_SetString(PyExc_ValueError, "maximum length of data to be read cannot be negative");
            sipIsErr = 1;
        }
        else
        {
            char *s = new char[a0];
            qint64 len;
        
            Py_BEGIN_ALLOW_THREADS
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            len = sipSelfWasArg ? sipCpp->QSerialPort::readLineData(s, a0) : sipCpp->readLineData(s, a0);
        #else
            len = sipCpp->sipProtectVirt_readLineData(sipSelfWasArg, s, a0);
        #endif
            Py_END_ALLOW_THREADS
        
            if (len < 0)
            {
                Py_INCREF(Py_None);
                sipRes = Py_None;
            }
            else
            {
                sipRes = PyBytes_FromStringAndSize(s, len);
        
                if (!sipRes)
                    sipIsErr = 1;
            }
        
            delete[] s;
        }
#line 1628 "/build/pyqt6/src/pyqt6-6.11.0/build/QtSerialPort/sipQtSerialPortQSerialPort.cpp"

            if (sipIsErr)
                return 0;

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_readLineData, doc_QSerialPort_readLineData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_writeData, "writeData(self, data: PyQt6.sip.array[bytes]) -> int");

extern "C" {static PyObject *meth_QSerialPort_writeData(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_writeData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_QSerialPort)) || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const char* a0;
        Py_ssize_t a1;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pk", &sipSelf, sipType_QSerialPort, &sipCpp, &a0, &a1))
        {
            ::qint64 sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::QSerialPort::writeData(a0, (long long)a1) : sipCpp->writeData(a0, (long long)a1));
            Py_END_ALLOW_THREADS

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_writeData, doc_QSerialPort_writeData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_handle, "handle(self) -> int");

extern "C" {static PyObject *meth_QSerialPort_handle(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_handle(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->handle();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_handle, doc_QSerialPort_handle);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_isBreakEnabled, "isBreakEnabled(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_isBreakEnabled(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_isBreakEnabled(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isBreakEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_isBreakEnabled, doc_QSerialPort_isBreakEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_settingsRestoredOnClose, "settingsRestoredOnClose(self) -> bool");

extern "C" {static PyObject *meth_QSerialPort_settingsRestoredOnClose(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_settingsRestoredOnClose(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->settingsRestoredOnClose();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_settingsRestoredOnClose, doc_QSerialPort_settingsRestoredOnClose);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setSettingsRestoredOnClose, "setSettingsRestoredOnClose(self, restore: bool)");

extern "C" {static PyObject *meth_QSerialPort_setSettingsRestoredOnClose(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setSettingsRestoredOnClose(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            sipCpp->setSettingsRestoredOnClose(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setSettingsRestoredOnClose, doc_QSerialPort_setSettingsRestoredOnClose);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_writeBufferSize, "writeBufferSize(self) -> int");

extern "C" {static PyObject *meth_QSerialPort_writeBufferSize(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_writeBufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QSerialPort, &sipCpp))
        {
            ::qint64 sipRes;

            sipRes = sipCpp->writeBufferSize();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_writeBufferSize, doc_QSerialPort_writeBufferSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QSerialPort_setWriteBufferSize, "setWriteBufferSize(self, size: int)");

extern "C" {static PyObject *meth_QSerialPort_setWriteBufferSize(PyObject *, PyObject *);}
static PyObject *meth_QSerialPort_setWriteBufferSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        ::qint64 a0;
        ::QSerialPort *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QSerialPort, &sipCpp, &a0))
        {
            sipCpp->setWriteBufferSize(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QSerialPort, sipName_setWriteBufferSize, doc_QSerialPort_setWriteBufferSize);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QSerialPort(void *, const sipTypeDef *);}
static void *cast_QSerialPort(void *sipCppV, const sipTypeDef *targetType)
{
    ::QSerialPort *sipCpp = reinterpret_cast< ::QSerialPort *>(sipCppV);

    if (targetType == sipType_QSerialPort)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QIODevice)->ctd_cast(static_cast< ::QIODevice *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QSerialPort(void *, int);}
static void release_QSerialPort(void *sipCppV, int)
{
    ::QSerialPort *sipCpp = reinterpret_cast< ::QSerialPort *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


extern "C" {static void *array_QSerialPort(Py_ssize_t);}
static void *array_QSerialPort(Py_ssize_t sipNrElem)
{
    return new ::QSerialPort[sipNrElem];
}


extern "C" {static void array_delete_QSerialPort(void *);}
static void array_delete_QSerialPort(void *sipCpp)
{
    delete[] reinterpret_cast< ::QSerialPort *>(sipCpp);
}


extern "C" {static void dealloc_QSerialPort(sipSimpleWrapper *);}
static void dealloc_QSerialPort(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQSerialPort *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QSerialPort(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QSerialPort(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QSerialPort(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQSerialPort *sipCpp = SIP_NULLPTR;

    {
        ::QObject* a0 = 0;

        static const char *sipKwdList[] = {
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|JH", sipType_QObject, &a0, sipOwner))
        {
            sipCpp = new sipQSerialPort(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;
        ::QObject* a1 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1|JH", sipType_QString, &a0, &a0State, sipType_QObject, &a1, sipOwner))
        {
            sipCpp = new sipQSerialPort(*a0, a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::QSerialPortInfo* a0;
        ::QObject* a1 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9|JH", sipType_QSerialPortInfo, &a0, sipType_QObject, &a1, sipOwner))
        {
            sipCpp = new sipQSerialPort(*a0, a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QSerialPort[] = {{3, 0, 1}};


static PyMethodDef methods_QSerialPort[] = {
    {sipName_baudRate, SIP_MLMETH_CAST(meth_QSerialPort_baudRate), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_baudRate},
    {sipName_bytesAvailable, meth_QSerialPort_bytesAvailable, METH_VARARGS, doc_QSerialPort_bytesAvailable},
    {sipName_bytesToWrite, meth_QSerialPort_bytesToWrite, METH_VARARGS, doc_QSerialPort_bytesToWrite},
    {sipName_canReadLine, meth_QSerialPort_canReadLine, METH_VARARGS, doc_QSerialPort_canReadLine},
    {sipName_clear, SIP_MLMETH_CAST(meth_QSerialPort_clear), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_clear},
    {sipName_clearError, meth_QSerialPort_clearError, METH_VARARGS, doc_QSerialPort_clearError},
    {sipName_close, meth_QSerialPort_close, METH_VARARGS, doc_QSerialPort_close},
    {sipName_dataBits, meth_QSerialPort_dataBits, METH_VARARGS, doc_QSerialPort_dataBits},
    {sipName_error, meth_QSerialPort_error, METH_VARARGS, doc_QSerialPort_error},
    {sipName_flowControl, meth_QSerialPort_flowControl, METH_VARARGS, doc_QSerialPort_flowControl},
    {sipName_flush, meth_QSerialPort_flush, METH_VARARGS, doc_QSerialPort_flush},
    {sipName_handle, meth_QSerialPort_handle, METH_VARARGS, doc_QSerialPort_handle},
    {sipName_isBreakEnabled, meth_QSerialPort_isBreakEnabled, METH_VARARGS, doc_QSerialPort_isBreakEnabled},
    {sipName_isDataTerminalReady, meth_QSerialPort_isDataTerminalReady, METH_VARARGS, doc_QSerialPort_isDataTerminalReady},
    {sipName_isRequestToSend, meth_QSerialPort_isRequestToSend, METH_VARARGS, doc_QSerialPort_isRequestToSend},
    {sipName_isSequential, meth_QSerialPort_isSequential, METH_VARARGS, doc_QSerialPort_isSequential},
    {sipName_open, meth_QSerialPort_open, METH_VARARGS, doc_QSerialPort_open},
    {sipName_parity, meth_QSerialPort_parity, METH_VARARGS, doc_QSerialPort_parity},
    {sipName_pinoutSignals, meth_QSerialPort_pinoutSignals, METH_VARARGS, doc_QSerialPort_pinoutSignals},
    {sipName_portName, meth_QSerialPort_portName, METH_VARARGS, doc_QSerialPort_portName},
    {sipName_readBufferSize, meth_QSerialPort_readBufferSize, METH_VARARGS, doc_QSerialPort_readBufferSize},
    {sipName_readData, meth_QSerialPort_readData, METH_VARARGS, doc_QSerialPort_readData},
    {sipName_readLineData, meth_QSerialPort_readLineData, METH_VARARGS, doc_QSerialPort_readLineData},
    {sipName_setBaudRate, SIP_MLMETH_CAST(meth_QSerialPort_setBaudRate), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_setBaudRate},
    {sipName_setBreakEnabled, SIP_MLMETH_CAST(meth_QSerialPort_setBreakEnabled), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_setBreakEnabled},
    {sipName_setDataBits, meth_QSerialPort_setDataBits, METH_VARARGS, doc_QSerialPort_setDataBits},
    {sipName_setDataTerminalReady, meth_QSerialPort_setDataTerminalReady, METH_VARARGS, doc_QSerialPort_setDataTerminalReady},
    {sipName_setFlowControl, meth_QSerialPort_setFlowControl, METH_VARARGS, doc_QSerialPort_setFlowControl},
    {sipName_setParity, meth_QSerialPort_setParity, METH_VARARGS, doc_QSerialPort_setParity},
    {sipName_setPort, meth_QSerialPort_setPort, METH_VARARGS, doc_QSerialPort_setPort},
    {sipName_setPortName, meth_QSerialPort_setPortName, METH_VARARGS, doc_QSerialPort_setPortName},
    {sipName_setReadBufferSize, meth_QSerialPort_setReadBufferSize, METH_VARARGS, doc_QSerialPort_setReadBufferSize},
    {sipName_setRequestToSend, meth_QSerialPort_setRequestToSend, METH_VARARGS, doc_QSerialPort_setRequestToSend},
    {sipName_setSettingsRestoredOnClose, meth_QSerialPort_setSettingsRestoredOnClose, METH_VARARGS, doc_QSerialPort_setSettingsRestoredOnClose},
    {sipName_setStopBits, meth_QSerialPort_setStopBits, METH_VARARGS, doc_QSerialPort_setStopBits},
    {sipName_setWriteBufferSize, meth_QSerialPort_setWriteBufferSize, METH_VARARGS, doc_QSerialPort_setWriteBufferSize},
    {sipName_settingsRestoredOnClose, meth_QSerialPort_settingsRestoredOnClose, METH_VARARGS, doc_QSerialPort_settingsRestoredOnClose},
    {sipName_stopBits, meth_QSerialPort_stopBits, METH_VARARGS, doc_QSerialPort_stopBits},
    {sipName_waitForBytesWritten, SIP_MLMETH_CAST(meth_QSerialPort_waitForBytesWritten), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_waitForBytesWritten},
    {sipName_waitForReadyRead, SIP_MLMETH_CAST(meth_QSerialPort_waitForReadyRead), METH_VARARGS|METH_KEYWORDS, doc_QSerialPort_waitForReadyRead},
    {sipName_writeBufferSize, meth_QSerialPort_writeBufferSize, METH_VARARGS, doc_QSerialPort_writeBufferSize},
    {sipName_writeData, meth_QSerialPort_writeData, METH_VARARGS, doc_QSerialPort_writeData}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QSerialPort[] = {
    {sipName_Baud1200, static_cast<int>(::QSerialPort::Baud1200)},
    {sipName_Baud2400, static_cast<int>(::QSerialPort::Baud2400)},
    {sipName_Baud4800, static_cast<int>(::QSerialPort::Baud4800)},
    {sipName_Baud9600, static_cast<int>(::QSerialPort::Baud9600)},
    {sipName_Baud19200, static_cast<int>(::QSerialPort::Baud19200)},
    {sipName_Baud38400, static_cast<int>(::QSerialPort::Baud38400)},
    {sipName_Baud57600, static_cast<int>(::QSerialPort::Baud57600)},
    {sipName_Baud115200, static_cast<int>(::QSerialPort::Baud115200)},
    {sipName_Data5, static_cast<int>(::QSerialPort::Data5)},
    {sipName_Data6, static_cast<int>(::QSerialPort::Data6)},
    {sipName_Data7, static_cast<int>(::QSerialPort::Data7)},
    {sipName_Data8, static_cast<int>(::QSerialPort::Data8)},
    {sipName_Input, static_cast<int>(::QSerialPort::Input)},
    {sipName_Output, static_cast<int>(::QSerialPort::Output)},
    {sipName_AllDirections, static_cast<int>(::QSerialPort::AllDirections)},
    {sipName_NoFlowControl, static_cast<int>(::QSerialPort::NoFlowControl)},
    {sipName_HardwareControl, static_cast<int>(::QSerialPort::HardwareControl)},
    {sipName_SoftwareControl, static_cast<int>(::QSerialPort::SoftwareControl)},
    {sipName_NoParity, static_cast<int>(::QSerialPort::NoParity)},
    {sipName_EvenParity, static_cast<int>(::QSerialPort::EvenParity)},
    {sipName_OddParity, static_cast<int>(::QSerialPort::OddParity)},
    {sipName_SpaceParity, static_cast<int>(::QSerialPort::SpaceParity)},
    {sipName_MarkParity, static_cast<int>(::QSerialPort::MarkParity)},
    {sipName_NoSignal, static_cast<int>(::QSerialPort::NoSignal)},
    {sipName_DataTerminalReadySignal, static_cast<int>(::QSerialPort::DataTerminalReadySignal)},
    {sipName_DataCarrierDetectSignal, static_cast<int>(::QSerialPort::DataCarrierDetectSignal)},
    {sipName_DataSetReadySignal, static_cast<int>(::QSerialPort::DataSetReadySignal)},
    {sipName_RingIndicatorSignal, static_cast<int>(::QSerialPort::RingIndicatorSignal)},
    {sipName_RequestToSendSignal, static_cast<int>(::QSerialPort::RequestToSendSignal)},
    {sipName_ClearToSendSignal, static_cast<int>(::QSerialPort::ClearToSendSignal)},
    {sipName_SecondaryTransmittedDataSignal, static_cast<int>(::QSerialPort::SecondaryTransmittedDataSignal)},
    {sipName_SecondaryReceivedDataSignal, static_cast<int>(::QSerialPort::SecondaryReceivedDataSignal)},
    {sipName_NoError, static_cast<int>(::QSerialPort::NoError)},
    {sipName_DeviceNotFoundError, static_cast<int>(::QSerialPort::DeviceNotFoundError)},
    {sipName_PermissionError, static_cast<int>(::QSerialPort::PermissionError)},
    {sipName_OpenError, static_cast<int>(::QSerialPort::OpenError)},
    {sipName_WriteError, static_cast<int>(::QSerialPort::WriteError)},
    {sipName_ReadError, static_cast<int>(::QSerialPort::ReadError)},
    {sipName_ResourceError, static_cast<int>(::QSerialPort::ResourceError)},
    {sipName_UnsupportedOperationError, static_cast<int>(::QSerialPort::UnsupportedOperationError)},
    {sipName_TimeoutError, static_cast<int>(::QSerialPort::TimeoutError)},
    {sipName_NotOpenError, static_cast<int>(::QSerialPort::NotOpenError)},
    {sipName_UnknownError, static_cast<int>(::QSerialPort::UnknownError)},
    {sipName_OneStop, static_cast<int>(::QSerialPort::OneStop)},
    {sipName_OneAndHalfStop, static_cast<int>(::QSerialPort::OneAndHalfStop)},
    {sipName_TwoStop, static_cast<int>(::QSerialPort::TwoStop)},
    {0, 0}
};

PyDoc_STRVAR(doc_QSerialPort, "\1QSerialPort(parent: QObject|None = None)\n"
"QSerialPort(name: str|None, parent: QObject|None = None)\n"
"QSerialPort(info: QSerialPortInfo, parent: QObject|None = None)");


/* Define this type's signals. */
static const pyqt6QtSignal signals_QSerialPort[] = {
    {"settingsRestoredOnCloseChanged(bool)", "\1settingsRestoredOnCloseChanged(self, restore: bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"errorOccurred(QSerialPort::SerialPortError)", "\1errorOccurred(self, error: QSerialPort.SerialPortError)", SIP_NULLPTR, SIP_NULLPTR},
    {"breakEnabledChanged(bool)", "\1breakEnabledChanged(self, set: bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"requestToSendChanged(bool)", "\1requestToSendChanged(self, set: bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"dataTerminalReadyChanged(bool)", "\1dataTerminalReadyChanged(self, set: bool)", SIP_NULLPTR, SIP_NULLPTR},
    {"flowControlChanged(QSerialPort::FlowControl)", "\1flowControlChanged(self, flow: QSerialPort.FlowControl)", SIP_NULLPTR, SIP_NULLPTR},
    {"stopBitsChanged(QSerialPort::StopBits)", "\1stopBitsChanged(self, stopBits: QSerialPort.StopBits)", SIP_NULLPTR, SIP_NULLPTR},
    {"parityChanged(QSerialPort::Parity)", "\1parityChanged(self, parity: QSerialPort.Parity)", SIP_NULLPTR, SIP_NULLPTR},
    {"dataBitsChanged(QSerialPort::DataBits)", "\1dataBitsChanged(self, dataBits: QSerialPort.DataBits)", SIP_NULLPTR, SIP_NULLPTR},
    {"baudRateChanged(qint32,QSerialPort::Directions)", "\1baudRateChanged(self, baudRate: int, directions: QSerialPort.Direction)", SIP_NULLPTR, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


static pyqt6ClassPluginDef plugin_QSerialPort = {
    &::QSerialPort::staticMetaObject,
    signals_QSerialPort,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtSerialPort_QSerialPort = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QSerialPort,
        SIP_NULLPTR,
        &plugin_QSerialPort,
    },
    {
        sipNameNr_QSerialPort,
        {0, 0, 1},
        42, methods_QSerialPort,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QSerialPort, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QSerialPort,
    -1,
    -1,
    supers_QSerialPort,
    SIP_NULLPTR,
    init_type_QSerialPort,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QSerialPort,
    SIP_NULLPTR,
    array_QSerialPort,
    SIP_NULLPTR,
    release_QSerialPort,
    cast_QSerialPort,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QSerialPort,
    sizeof (::QSerialPort),
};
