diff options
Diffstat (limited to 'sources/pyside6/PySide6/QtSerialBus')
-rw-r--r-- | sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt | 66 | ||||
-rw-r--r-- | sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml | 118 |
2 files changed, 184 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt b/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt new file mode 100644 index 000000000..310a8b0f0 --- /dev/null +++ b/sources/pyside6/PySide6/QtSerialBus/CMakeLists.txt @@ -0,0 +1,66 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +project(QtSerialBus) + +set(QtSerialBus_OPTIONAL_SRC ) +set(QtSerialBus_DROPPED_ENTRIES ) + +set(QtSerialBus_SRC + ${QtSerialBus_GEN_DIR}/qcanbus_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusdevice_filter_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusdevice_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusdeviceinfo_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusfactory_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusframe_timestamp_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanbusframe_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcandbcfileparser_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanframeprocessor_parseresult_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanframeprocessor_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanmessagedescription_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcansignaldescription_multiplexvaluerange_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcansignaldescription_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qcanuniqueiddescription_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusclient_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusdataunit_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusdevice_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusdeviceidentification_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusexceptionresponse_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbuspdu_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusreply_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusrequest_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusresponse_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusrtuserialclient_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusrtuserialserver_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbusserver_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbustcpclient_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbustcpconnectionobserver_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qmodbustcpserver_wrapper.cpp + ${QtSerialBus_GEN_DIR}/qtcanbus_wrapper.cpp +# module is always needed + ${QtSerialBus_GEN_DIR}/qtserialbus_module_wrapper.cpp +) + +set(QtSerialBus_include_dirs ${QtSerialBus_SOURCE_DIR} + ${QtSerialBus_BINARY_DIR} + ${Qt${QT_MAJOR_VERSION}Core_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}Network_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}SerialPort_INCLUDE_DIRS} + ${Qt${QT_MAJOR_VERSION}SerialBus_INCLUDE_DIRS} + ${libpyside_SOURCE_DIR} + ${QtCore_GEN_DIR} + ${QtNetwork_GEN_DIR} + ${QtSerialPort_GEN_DIR}) + +set(QtSerialBus_libraries pyside6 + ${Qt${QT_MAJOR_VERSION}SerialBus_LIBRARIES}) + +set(QtSerialBus_deps QtCore QtNetwork QtSerialPort) + +create_pyside_module(NAME QtSerialBus + INCLUDE_DIRS QtSerialBus_include_dirs + LIBRARIES QtSerialBus_libraries + DEPS QtSerialBus_deps + TYPESYSTEM_PATH QtSerialBus_SOURCE_DIR + SOURCES QtSerialBus_SRC + DROPPED_ENTRIES QtSerialBus_DROPPED_ENTRIES) diff --git a/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml b/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml new file mode 100644 index 000000000..fdd2b1483 --- /dev/null +++ b/sources/pyside6/PySide6/QtSerialBus/typesystem_serialbus.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +--> + +<typesystem package="PySide6.QtSerialBus" + namespace-begin="QT_BEGIN_NAMESPACE" namespace-end="QT_END_NAMESPACE"> + <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/> + <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/> + <load-typesystem name="QtSerialPort/typesystem_serialport.xml" generate="no"/> + + <namespace-type name="QtCanBus"> + <enum-type name="DataSource"/> + <enum-type name="DataFormat"/> + <enum-type name="MultiplexState"/> + <enum-type name="UniqueId"/> + </namespace-type> + + <object-type name="QCanBus"> + <!-- Remove errorMessage argument, return tuple instead. --> + <modify-function signature="availableDevices(QString,QString*)const"> + <modify-argument index="2"> + <remove-default-expression/> + <remove-argument/> + </modify-argument> + <modify-argument index="return"> + <replace-type modified-type="tuple"/> + </modify-argument> + <inject-code class="target" position="beginning" + file="../glue/qtserialbus.cpp" snippet="qcanbus-available-devices"/> + <inject-documentation format="target" mode="append"> + The function returns a tuple of (device_list, error_string). + </inject-documentation> + </modify-function> + <modify-function signature="createDevice(QString,QString,QString*)const"> + <modify-argument index="3"> + <remove-default-expression/> + <remove-argument/> + </modify-argument> + <modify-argument index="return"> <!-- Suppress return value heuristics --> + <define-ownership class="target" owner="default"/> + <replace-type modified-type="tuple"/> + </modify-argument> + <inject-code class="target" position="beginning" + file="../glue/qtserialbus.cpp" snippet="qcanbus-createdevice"/> + <inject-documentation format="target" mode="append"> + The function returns a tuple of (device, error_string). + </inject-documentation> + </modify-function> + </object-type> + <object-type name="QCanBusDevice"> + <enum-type name="CanBusError"/> + <enum-type name="CanBusDeviceState"/> + <enum-type name="CanBusStatus"/> + <enum-type name="ConfigurationKey"/> + <enum-type name="Direction" flags="Directions"/> + <modify-function signature="deviceInfo()const" access="final"/> + <value-type name="Filter"> + <enum-type name="FormatFilter" flags="FormatFilters"/> + </value-type> + </object-type> + <value-type name="QCanBusDeviceInfo"> <!-- deleted default constructor --> + <modify-function signature="swap(QCanBusDeviceInfo&)" remove="all"/> + </value-type> + <object-type name="QCanBusFactory"/> + <value-type name="QCanBusFrame"> + <enum-type name="FrameType"/> + <enum-type name="FrameError" flags="FrameErrors"/> + <value-type name="TimeStamp"/> + </value-type> + <object-type name="QCanDbcFileParser"> + <enum-type name="Error"/> + </object-type> + <object-type name="QCanFrameProcessor"> + <enum-type name="Error"/> + <value-type name="ParseResult"/> + </object-type> + <value-type name="QCanMessageDescription"/> + <value-type name="QCanSignalDescription"> + <value-type name="MultiplexValueRange"/> + </value-type> + <value-type name="QCanUniqueIdDescription"/> + <object-type name="QModbusClient"/> + <value-type name="QModbusDataUnit"> + <enum-type name="RegisterType"/> + </value-type> + <object-type name="QModbusDevice"> + <enum-type name="Error"/> + <enum-type name="State"/> + <enum-type name="ConnectionParameter"/> + <enum-type name="IntermediateError"/> + </object-type> + <value-type name="QModbusDeviceIdentification"> + <enum-type name="ObjectId"/> + <enum-type name="ReadDeviceIdCode"/> + <enum-type name="ConformityLevel"/> + </value-type> + <object-type name="QModbusPdu"> + <enum-type name="ExceptionCode"/> + <enum-type name="FunctionCode"/> + <modify-field name="ExceptionByte" remove="true"/> <!-- Link error --> + </object-type> + <object-type name="QModbusExceptionResponse"/> + <object-type name="QModbusResponse"/> + <object-type name="QModbusReply"> + <enum-type name="ReplyType"/> + </object-type> + <object-type name="QModbusRequest"/> + <object-type name="QModbusRtuSerialClient"/> + <object-type name="QModbusRtuSerialServer"/> + <object-type name="QModbusServer"> + <enum-type name="Option"/> + </object-type> + <object-type name="QModbusTcpClient"/> + <object-type name="QModbusTcpConnectionObserver"/> + <object-type name="QModbusTcpServer"/> +</typesystem> |