/****************************************************************************
** Meta object code from reading C++ file 'qmodbusdevice.h'
**
** Created by: The Qt Meta Object Compiler version 69 (Qt 6.11.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#include "../../../../../qtserialbus/src/serialbus/qmodbusdevice.h"
#include <QtCore/qmetatype.h>

#include <QtCore/qtmochelpers.h>

#include <memory>


#include <QtCore/qxptype_traits.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'qmodbusdevice.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 69
#error "This file was generated using the moc from 6.11.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

#ifndef Q_CONSTINIT
#define Q_CONSTINIT
#endif

QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
QT_WARNING_DISABLE_GCC("-Wuseless-cast")
namespace {
struct qt_meta_tag_ZN13QModbusDeviceE_t {};
} // unnamed namespace

template <> constexpr inline auto QModbusDevice::qt_create_metaobjectdata<qt_meta_tag_ZN13QModbusDeviceE_t>()
{
    namespace QMC = QtMocConstants;
    QtMocHelpers::StringRefStorage qt_stringData {
        "QModbusDevice",
        "errorOccurred",
        "",
        "QModbusDevice::Error",
        "error",
        "stateChanged",
        "QModbusDevice::State",
        "state",
        "Error",
        "NoError",
        "ReadError",
        "WriteError",
        "ConnectionError",
        "ConfigurationError",
        "TimeoutError",
        "ProtocolError",
        "ReplyAbortedError",
        "UnknownError",
        "InvalidResponseError",
        "State",
        "UnconnectedState",
        "ConnectingState",
        "ConnectedState",
        "ClosingState",
        "ConnectionParameter",
        "SerialPortNameParameter",
        "SerialParityParameter",
        "SerialBaudRateParameter",
        "SerialDataBitsParameter",
        "SerialStopBitsParameter",
        "NetworkPortParameter",
        "NetworkAddressParameter",
        "IntermediateError",
        "ResponseCrcError",
        "ResponseRequestMismatch"
    };

    QtMocHelpers::UintData qt_methods {
        // Signal 'errorOccurred'
        QtMocHelpers::SignalData<void(QModbusDevice::Error)>(1, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 3, 4 },
        }}),
        // Signal 'stateChanged'
        QtMocHelpers::SignalData<void(QModbusDevice::State)>(5, 2, QMC::AccessPublic, QMetaType::Void, {{
            { 0x80000000 | 6, 7 },
        }}),
    };
    QtMocHelpers::UintData qt_properties {
    };
    QtMocHelpers::UintData qt_enums {
        // enum 'Error'
        QtMocHelpers::EnumData<enum Error>(8, 8, QMC::EnumFlags{}).add({
            {    9, Error::NoError },
            {   10, Error::ReadError },
            {   11, Error::WriteError },
            {   12, Error::ConnectionError },
            {   13, Error::ConfigurationError },
            {   14, Error::TimeoutError },
            {   15, Error::ProtocolError },
            {   16, Error::ReplyAbortedError },
            {   17, Error::UnknownError },
            {   18, Error::InvalidResponseError },
        }),
        // enum 'State'
        QtMocHelpers::EnumData<enum State>(19, 19, QMC::EnumFlags{}).add({
            {   20, State::UnconnectedState },
            {   21, State::ConnectingState },
            {   22, State::ConnectedState },
            {   23, State::ClosingState },
        }),
        // enum 'ConnectionParameter'
        QtMocHelpers::EnumData<enum ConnectionParameter>(24, 24, QMC::EnumFlags{}).add({
            {   25, ConnectionParameter::SerialPortNameParameter },
            {   26, ConnectionParameter::SerialParityParameter },
            {   27, ConnectionParameter::SerialBaudRateParameter },
            {   28, ConnectionParameter::SerialDataBitsParameter },
            {   29, ConnectionParameter::SerialStopBitsParameter },
            {   30, ConnectionParameter::NetworkPortParameter },
            {   31, ConnectionParameter::NetworkAddressParameter },
        }),
        // enum 'IntermediateError'
        QtMocHelpers::EnumData<enum IntermediateError>(32, 32, QMC::EnumFlags{}).add({
            {   33, IntermediateError::ResponseCrcError },
            {   34, IntermediateError::ResponseRequestMismatch },
        }),
    };
    return QtMocHelpers::metaObjectData<QModbusDevice, qt_meta_tag_ZN13QModbusDeviceE_t>(QMC::MetaObjectFlag{}, qt_stringData,
            qt_methods, qt_properties, qt_enums);
}
Q_CONSTINIT const QMetaObject QModbusDevice::staticMetaObject = { {
    QMetaObject::SuperData::link<QObject::staticMetaObject>(),
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QModbusDeviceE_t>.stringdata,
    qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QModbusDeviceE_t>.data,
    qt_static_metacall,
    nullptr,
    qt_staticMetaObjectRelocatingContent<qt_meta_tag_ZN13QModbusDeviceE_t>.metaTypes,
    nullptr
} };

void QModbusDevice::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
    auto *_t = static_cast<QModbusDevice *>(_o);
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: _t->errorOccurred((*reinterpret_cast<std::add_pointer_t<QModbusDevice::Error>>(_a[1]))); break;
        case 1: _t->stateChanged((*reinterpret_cast<std::add_pointer_t<QModbusDevice::State>>(_a[1]))); break;
        default: ;
        }
    }
    if (_c == QMetaObject::IndexOfMethod) {
        if (QtMocHelpers::indexOfMethod<void (QModbusDevice::*)(QModbusDevice::Error )>(_a, &QModbusDevice::errorOccurred, 0))
            return;
        if (QtMocHelpers::indexOfMethod<void (QModbusDevice::*)(QModbusDevice::State )>(_a, &QModbusDevice::stateChanged, 1))
            return;
    }
}

const QMetaObject *QModbusDevice::metaObject() const
{
    return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}

void *QModbusDevice::qt_metacast(const char *_clname)
{
    if (!_clname) return nullptr;
    if (!strcmp(_clname, qt_staticMetaObjectStaticContent<qt_meta_tag_ZN13QModbusDeviceE_t>.strings))
        return static_cast<void*>(this);
    return QObject::qt_metacast(_clname);
}

int QModbusDevice::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 2)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 2;
    }
    if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
        if (_id < 2)
            *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType();
        _id -= 2;
    }
    return _id;
}

// SIGNAL 0
void QModbusDevice::errorOccurred(QModbusDevice::Error _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 0, nullptr, _t1);
}

// SIGNAL 1
void QModbusDevice::stateChanged(QModbusDevice::State _t1)
{
    QMetaObject::activate<void>(this, &staticMetaObject, 1, nullptr, _t1);
}
QT_WARNING_POP
