QtSerialBus.pyi 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. # Copyright (C) 2022 The Qt Company Ltd.
  2. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. """
  4. This file contains the exact signatures for all functions in module
  5. PySide6.QtSerialBus, except for defaults which are replaced by "...".
  6. """
  7. # mypy: disable-error-code="override, overload-overlap"
  8. # Module `PySide6.QtSerialBus`
  9. import PySide6.QtSerialBus
  10. import PySide6.QtCore
  11. import PySide6.QtNetwork
  12. import enum
  13. import typing
  14. import collections.abc
  15. from PySide6.QtCore import Signal
  16. from shiboken6 import Shiboken
  17. class QCanBus(PySide6.QtCore.QObject):
  18. @typing.overload
  19. def availableDevices(self, /) -> tuple: ...
  20. @typing.overload
  21. def availableDevices(self, plugin: str, /) -> tuple: ...
  22. def createDevice(self, plugin: str, interfaceName: str, /) -> tuple: ...
  23. @staticmethod
  24. def instance() -> PySide6.QtSerialBus.QCanBus: ...
  25. def plugins(self, /) -> typing.List[str]: ...
  26. class QCanBusDevice(PySide6.QtCore.QObject):
  27. errorOccurred : typing.ClassVar[Signal] = ... # errorOccurred(QCanBusDevice::CanBusError)
  28. framesReceived : typing.ClassVar[Signal] = ... # framesReceived()
  29. framesWritten : typing.ClassVar[Signal] = ... # framesWritten(qlonglong)
  30. stateChanged : typing.ClassVar[Signal] = ... # stateChanged(QCanBusDevice::CanBusDeviceState)
  31. class CanBusDeviceState(enum.Enum):
  32. UnconnectedState = 0x0
  33. ConnectingState = 0x1
  34. ConnectedState = 0x2
  35. ClosingState = 0x3
  36. class CanBusError(enum.Enum):
  37. NoError = 0x0
  38. ReadError = 0x1
  39. WriteError = 0x2
  40. ConnectionError = 0x3
  41. ConfigurationError = 0x4
  42. UnknownError = 0x5
  43. OperationError = 0x6
  44. TimeoutError = 0x7
  45. class CanBusStatus(enum.Enum):
  46. Unknown = 0x0
  47. Good = 0x1
  48. Warning = 0x2
  49. Error = 0x3
  50. BusOff = 0x4
  51. class ConfigurationKey(enum.Enum):
  52. RawFilterKey = 0x0
  53. ErrorFilterKey = 0x1
  54. LoopbackKey = 0x2
  55. ReceiveOwnKey = 0x3
  56. BitRateKey = 0x4
  57. CanFdKey = 0x5
  58. DataBitRateKey = 0x6
  59. ProtocolKey = 0x7
  60. UserKey = 0x1e
  61. class Direction(enum.Flag):
  62. Input = 0x1
  63. Output = 0x2
  64. AllDirections = 0x3
  65. class Filter(Shiboken.Object):
  66. class FormatFilter(enum.Flag):
  67. MatchBaseFormat = 0x1
  68. MatchExtendedFormat = 0x2
  69. MatchBaseAndExtendedFormat = 0x3
  70. @typing.overload
  71. def __init__(self, /) -> None: ...
  72. @typing.overload
  73. def __init__(self, Filter: PySide6.QtSerialBus.QCanBusDevice.Filter, /) -> None: ...
  74. def __copy__(self, /) -> typing.Self: ...
  75. def __eq__(self, b: PySide6.QtSerialBus.QCanBusDevice.Filter, /) -> bool: ...
  76. def __ne__(self, b: PySide6.QtSerialBus.QCanBusDevice.Filter, /) -> bool: ...
  77. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  78. def busStatus(self, /) -> PySide6.QtSerialBus.QCanBusDevice.CanBusStatus: ...
  79. def clear(self, /, direction: PySide6.QtSerialBus.QCanBusDevice.Direction = ...) -> None: ...
  80. def clearError(self, /) -> None: ...
  81. def close(self, /) -> None: ...
  82. def configurationKeys(self, /) -> typing.List[PySide6.QtSerialBus.QCanBusDevice.ConfigurationKey]: ...
  83. def configurationParameter(self, key: PySide6.QtSerialBus.QCanBusDevice.ConfigurationKey, /) -> typing.Any: ...
  84. def connectDevice(self, /) -> bool: ...
  85. @typing.overload
  86. @staticmethod
  87. def createDeviceInfo(plugin: str, name: str, serialNumber: str, description: str, alias: str, channel: int, isVirtual: bool, isFlexibleDataRateCapable: bool, /) -> PySide6.QtSerialBus.QCanBusDeviceInfo: ...
  88. @typing.overload
  89. @staticmethod
  90. def createDeviceInfo(plugin: str, name: str, isVirtual: bool, isFlexibleDataRateCapable: bool, /) -> PySide6.QtSerialBus.QCanBusDeviceInfo: ...
  91. def dequeueOutgoingFrame(self, /) -> PySide6.QtSerialBus.QCanBusFrame: ...
  92. def deviceInfo(self, /) -> PySide6.QtSerialBus.QCanBusDeviceInfo: ...
  93. def disconnectDevice(self, /) -> None: ...
  94. def enqueueOutgoingFrame(self, newFrame: PySide6.QtSerialBus.QCanBusFrame | PySide6.QtSerialBus.QCanBusFrame.FrameType, /) -> None: ...
  95. def enqueueReceivedFrames(self, newFrames: collections.abc.Sequence[PySide6.QtSerialBus.QCanBusFrame], /) -> None: ...
  96. def error(self, /) -> PySide6.QtSerialBus.QCanBusDevice.CanBusError: ...
  97. def errorString(self, /) -> str: ...
  98. def framesAvailable(self, /) -> int: ...
  99. def framesToWrite(self, /) -> int: ...
  100. def hasBusStatus(self, /) -> bool: ...
  101. def hasOutgoingFrames(self, /) -> bool: ...
  102. def interpretErrorFrame(self, errorFrame: PySide6.QtSerialBus.QCanBusFrame | PySide6.QtSerialBus.QCanBusFrame.FrameType, /) -> str: ...
  103. def open(self, /) -> bool: ...
  104. def readAllFrames(self, /) -> typing.List[PySide6.QtSerialBus.QCanBusFrame]: ...
  105. def readFrame(self, /) -> PySide6.QtSerialBus.QCanBusFrame: ...
  106. def resetController(self, /) -> None: ...
  107. def setConfigurationParameter(self, key: PySide6.QtSerialBus.QCanBusDevice.ConfigurationKey, value: typing.Any, /) -> None: ...
  108. def setError(self, errorText: str, arg__2: PySide6.QtSerialBus.QCanBusDevice.CanBusError, /) -> None: ...
  109. def setState(self, newState: PySide6.QtSerialBus.QCanBusDevice.CanBusDeviceState, /) -> None: ...
  110. def state(self, /) -> PySide6.QtSerialBus.QCanBusDevice.CanBusDeviceState: ...
  111. def waitForFramesReceived(self, msecs: int, /) -> bool: ...
  112. def waitForFramesWritten(self, msecs: int, /) -> bool: ...
  113. def writeFrame(self, frame: PySide6.QtSerialBus.QCanBusFrame | PySide6.QtSerialBus.QCanBusFrame.FrameType, /) -> bool: ...
  114. class QCanBusDeviceInfo(Shiboken.Object):
  115. def __init__(self, other: PySide6.QtSerialBus.QCanBusDeviceInfo, /) -> None: ...
  116. def __copy__(self, /) -> typing.Self: ...
  117. def alias(self, /) -> str: ...
  118. def channel(self, /) -> int: ...
  119. def description(self, /) -> str: ...
  120. def hasFlexibleDataRate(self, /) -> bool: ...
  121. def isVirtual(self, /) -> bool: ...
  122. def name(self, /) -> str: ...
  123. def plugin(self, /) -> str: ...
  124. def serialNumber(self, /) -> str: ...
  125. class QCanBusFactory(Shiboken.Object):
  126. def __init__(self, /) -> None: ...
  127. def availableDevices(self, /) -> typing.Tuple[typing.List[PySide6.QtSerialBus.QCanBusDeviceInfo], str]: ...
  128. def createDevice(self, interfaceName: str, /) -> typing.Tuple[PySide6.QtSerialBus.QCanBusDevice, str]: ...
  129. class QCanBusFrame(Shiboken.Object):
  130. class FrameError(enum.Flag):
  131. NoError = 0x0
  132. TransmissionTimeoutError = 0x1
  133. LostArbitrationError = 0x2
  134. ControllerError = 0x4
  135. ProtocolViolationError = 0x8
  136. TransceiverError = 0x10
  137. MissingAcknowledgmentError = 0x20
  138. BusOffError = 0x40
  139. BusError = 0x80
  140. ControllerRestartError = 0x100
  141. UnknownError = 0x200
  142. AnyError = 0x1fffffff
  143. class FrameType(enum.Enum):
  144. UnknownFrame = 0x0
  145. DataFrame = 0x1
  146. ErrorFrame = 0x2
  147. RemoteRequestFrame = 0x3
  148. InvalidFrame = 0x4
  149. class TimeStamp(Shiboken.Object):
  150. @typing.overload
  151. def __init__(self, TimeStamp: PySide6.QtSerialBus.QCanBusFrame.TimeStamp, /) -> None: ...
  152. @typing.overload
  153. def __init__(self, /, s: int | None = ..., usec: int | None = ...) -> None: ...
  154. def __copy__(self, /) -> typing.Self: ...
  155. @staticmethod
  156. def fromMicroSeconds(usec: int, /) -> PySide6.QtSerialBus.QCanBusFrame.TimeStamp: ...
  157. def microSeconds(self, /) -> int: ...
  158. def seconds(self, /) -> int: ...
  159. @typing.overload
  160. def __init__(self, /, type: PySide6.QtSerialBus.QCanBusFrame.FrameType = ...) -> None: ...
  161. @typing.overload
  162. def __init__(self, QCanBusFrame: PySide6.QtSerialBus.QCanBusFrame, /) -> None: ...
  163. @typing.overload
  164. def __init__(self, identifier: int, data: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> None: ...
  165. def __copy__(self, /) -> typing.Self: ...
  166. def __lshift__(self, arg__1: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  167. def __rshift__(self, arg__1: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  168. def error(self, /) -> PySide6.QtSerialBus.QCanBusFrame.FrameError: ...
  169. def frameId(self, /) -> int: ...
  170. def frameType(self, /) -> PySide6.QtSerialBus.QCanBusFrame.FrameType: ...
  171. def hasBitrateSwitch(self, /) -> bool: ...
  172. def hasErrorStateIndicator(self, /) -> bool: ...
  173. def hasExtendedFrameFormat(self, /) -> bool: ...
  174. def hasFlexibleDataRateFormat(self, /) -> bool: ...
  175. def hasLocalEcho(self, /) -> bool: ...
  176. def isValid(self, /) -> bool: ...
  177. def payload(self, /) -> PySide6.QtCore.QByteArray: ...
  178. def setBitrateSwitch(self, bitrateSwitch: bool, /) -> None: ...
  179. def setError(self, e: PySide6.QtSerialBus.QCanBusFrame.FrameError, /) -> None: ...
  180. def setErrorStateIndicator(self, errorStateIndicator: bool, /) -> None: ...
  181. def setExtendedFrameFormat(self, isExtended: bool, /) -> None: ...
  182. def setFlexibleDataRateFormat(self, isFlexibleData: bool, /) -> None: ...
  183. def setFrameId(self, newFrameId: int, /) -> None: ...
  184. def setFrameType(self, newFormat: PySide6.QtSerialBus.QCanBusFrame.FrameType, /) -> None: ...
  185. def setLocalEcho(self, localEcho: bool, /) -> None: ...
  186. def setPayload(self, data: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> None: ...
  187. def setTimeStamp(self, ts: PySide6.QtSerialBus.QCanBusFrame.TimeStamp, /) -> None: ...
  188. def timeStamp(self, /) -> PySide6.QtSerialBus.QCanBusFrame.TimeStamp: ...
  189. def toString(self, /) -> str: ...
  190. class QCanDbcFileParser(Shiboken.Object):
  191. class Error(enum.Enum):
  192. None_ = 0x0
  193. FileReading = 0x1
  194. Parsing = 0x2
  195. def __init__(self, /) -> None: ...
  196. def error(self, /) -> PySide6.QtSerialBus.QCanDbcFileParser.Error: ...
  197. def errorString(self, /) -> str: ...
  198. def messageDescriptions(self, /) -> typing.List[PySide6.QtSerialBus.QCanMessageDescription]: ...
  199. def messageValueDescriptions(self, /) -> typing.Dict[PySide6.QtSerialBus.QtCanBus.UniqueId, typing.Dict[str, typing.Dict[int, str]]]: ...
  200. @typing.overload
  201. def parse(self, fileName: str, /) -> bool: ...
  202. @typing.overload
  203. def parse(self, fileNames: collections.abc.Sequence[str], /) -> bool: ...
  204. def parseData(self, data: str, /) -> bool: ...
  205. @staticmethod
  206. def uniqueIdDescription() -> PySide6.QtSerialBus.QCanUniqueIdDescription: ...
  207. def warnings(self, /) -> typing.List[str]: ...
  208. class QCanFrameProcessor(Shiboken.Object):
  209. class Error(enum.Enum):
  210. None_ = 0x0
  211. InvalidFrame = 0x1
  212. UnsupportedFrameFormat = 0x2
  213. Decoding = 0x3
  214. Encoding = 0x4
  215. class ParseResult(Shiboken.Object):
  216. @typing.overload
  217. def __init__(self, /) -> None: ...
  218. @typing.overload
  219. def __init__(self, ParseResult: PySide6.QtSerialBus.QCanFrameProcessor.ParseResult, /) -> None: ...
  220. def __copy__(self, /) -> typing.Self: ...
  221. def __init__(self, /) -> None: ...
  222. def addMessageDescriptions(self, descriptions: collections.abc.Sequence[PySide6.QtSerialBus.QCanMessageDescription], /) -> None: ...
  223. def clearMessageDescriptions(self, /) -> None: ...
  224. def error(self, /) -> PySide6.QtSerialBus.QCanFrameProcessor.Error: ...
  225. def errorString(self, /) -> str: ...
  226. def messageDescriptions(self, /) -> typing.List[PySide6.QtSerialBus.QCanMessageDescription]: ...
  227. def parseFrame(self, frame: PySide6.QtSerialBus.QCanBusFrame | PySide6.QtSerialBus.QCanBusFrame.FrameType, /) -> PySide6.QtSerialBus.QCanFrameProcessor.ParseResult: ...
  228. def prepareFrame(self, uniqueId: PySide6.QtSerialBus.QtCanBus.UniqueId, signalValues: typing.Dict[str, typing.Any], /) -> PySide6.QtSerialBus.QCanBusFrame: ...
  229. def setMessageDescriptions(self, descriptions: collections.abc.Sequence[PySide6.QtSerialBus.QCanMessageDescription], /) -> None: ...
  230. def setUniqueIdDescription(self, description: PySide6.QtSerialBus.QCanUniqueIdDescription, /) -> None: ...
  231. def uniqueIdDescription(self, /) -> PySide6.QtSerialBus.QCanUniqueIdDescription: ...
  232. def warnings(self, /) -> typing.List[str]: ...
  233. class QCanMessageDescription(Shiboken.Object):
  234. @typing.overload
  235. def __init__(self, /) -> None: ...
  236. @typing.overload
  237. def __init__(self, other: PySide6.QtSerialBus.QCanMessageDescription, /) -> None: ...
  238. def __copy__(self, /) -> typing.Self: ...
  239. def __repr__(self, /) -> str: ...
  240. def addSignalDescription(self, description: PySide6.QtSerialBus.QCanSignalDescription, /) -> None: ...
  241. def clearSignalDescriptions(self, /) -> None: ...
  242. def comment(self, /) -> str: ...
  243. def isValid(self, /) -> bool: ...
  244. def name(self, /) -> str: ...
  245. def setComment(self, text: str, /) -> None: ...
  246. def setName(self, name: str, /) -> None: ...
  247. def setSignalDescriptions(self, descriptions: collections.abc.Sequence[PySide6.QtSerialBus.QCanSignalDescription], /) -> None: ...
  248. def setSize(self, size: int, /) -> None: ...
  249. def setTransmitter(self, transmitter: str, /) -> None: ...
  250. def setUniqueId(self, id: PySide6.QtSerialBus.QtCanBus.UniqueId, /) -> None: ...
  251. def signalDescriptionForName(self, name: str, /) -> PySide6.QtSerialBus.QCanSignalDescription: ...
  252. def signalDescriptions(self, /) -> typing.List[PySide6.QtSerialBus.QCanSignalDescription]: ...
  253. def size(self, /) -> int: ...
  254. def swap(self, other: PySide6.QtSerialBus.QCanMessageDescription, /) -> None: ...
  255. def transmitter(self, /) -> str: ...
  256. def uniqueId(self, /) -> PySide6.QtSerialBus.QtCanBus.UniqueId: ...
  257. class QCanSignalDescription(Shiboken.Object):
  258. class MultiplexValueRange(Shiboken.Object):
  259. @typing.overload
  260. def __init__(self, /) -> None: ...
  261. @typing.overload
  262. def __init__(self, MultiplexValueRange: PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange, /) -> None: ...
  263. def __copy__(self, /) -> typing.Self: ...
  264. def __eq__(self, rhs: PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange, /) -> bool: ...
  265. def __ne__(self, rhs: PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange, /) -> bool: ...
  266. def __repr__(self, /) -> str: ...
  267. @typing.overload
  268. def __init__(self, /) -> None: ...
  269. @typing.overload
  270. def __init__(self, other: PySide6.QtSerialBus.QCanSignalDescription, /) -> None: ...
  271. def __copy__(self, /) -> typing.Self: ...
  272. def __repr__(self, /) -> str: ...
  273. @typing.overload
  274. def addMultiplexSignal(self, name: str, ranges: collections.abc.Sequence[PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange], /) -> None: ...
  275. @typing.overload
  276. def addMultiplexSignal(self, name: str, value: typing.Any, /) -> None: ...
  277. def bitLength(self, /) -> int: ...
  278. def clearMultiplexSignals(self, /) -> None: ...
  279. def comment(self, /) -> str: ...
  280. def dataEndian(self, /) -> PySide6.QtCore.QSysInfo.Endian: ...
  281. def dataFormat(self, /) -> PySide6.QtSerialBus.QtCanBus.DataFormat: ...
  282. def dataSource(self, /) -> PySide6.QtSerialBus.QtCanBus.DataSource: ...
  283. def factor(self, /) -> float: ...
  284. def isValid(self, /) -> bool: ...
  285. def maximum(self, /) -> float: ...
  286. def minimum(self, /) -> float: ...
  287. def multiplexSignals(self, /) -> typing.Dict[str, typing.List[PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange]]: ...
  288. def multiplexState(self, /) -> PySide6.QtSerialBus.QtCanBus.MultiplexState: ...
  289. def name(self, /) -> str: ...
  290. def offset(self, /) -> float: ...
  291. def physicalUnit(self, /) -> str: ...
  292. def receiver(self, /) -> str: ...
  293. def scaling(self, /) -> float: ...
  294. def setBitLength(self, length: int, /) -> None: ...
  295. def setComment(self, text: str, /) -> None: ...
  296. def setDataEndian(self, endian: PySide6.QtCore.QSysInfo.Endian, /) -> None: ...
  297. def setDataFormat(self, format: PySide6.QtSerialBus.QtCanBus.DataFormat, /) -> None: ...
  298. def setDataSource(self, source: PySide6.QtSerialBus.QtCanBus.DataSource, /) -> None: ...
  299. def setFactor(self, factor: float, /) -> None: ...
  300. def setMultiplexSignals(self, multiplexorSignals: typing.Dict[str, collections.abc.Sequence[PySide6.QtSerialBus.QCanSignalDescription.MultiplexValueRange]], /) -> None: ...
  301. def setMultiplexState(self, state: PySide6.QtSerialBus.QtCanBus.MultiplexState, /) -> None: ...
  302. def setName(self, name: str, /) -> None: ...
  303. def setOffset(self, offset: float, /) -> None: ...
  304. def setPhysicalUnit(self, unit: str, /) -> None: ...
  305. def setRange(self, minimum: float, maximum: float, /) -> None: ...
  306. def setReceiver(self, receiver: str, /) -> None: ...
  307. def setScaling(self, scaling: float, /) -> None: ...
  308. def setStartBit(self, bit: int, /) -> None: ...
  309. def startBit(self, /) -> int: ...
  310. def swap(self, other: PySide6.QtSerialBus.QCanSignalDescription, /) -> None: ...
  311. class QCanUniqueIdDescription(Shiboken.Object):
  312. @typing.overload
  313. def __init__(self, /) -> None: ...
  314. @typing.overload
  315. def __init__(self, other: PySide6.QtSerialBus.QCanUniqueIdDescription, /) -> None: ...
  316. def __copy__(self, /) -> typing.Self: ...
  317. def bitLength(self, /) -> int: ...
  318. def endian(self, /) -> PySide6.QtCore.QSysInfo.Endian: ...
  319. def isValid(self, /) -> bool: ...
  320. def setBitLength(self, length: int, /) -> None: ...
  321. def setEndian(self, endian: PySide6.QtCore.QSysInfo.Endian, /) -> None: ...
  322. def setSource(self, source: PySide6.QtSerialBus.QtCanBus.DataSource, /) -> None: ...
  323. def setStartBit(self, bit: int, /) -> None: ...
  324. def source(self, /) -> PySide6.QtSerialBus.QtCanBus.DataSource: ...
  325. def startBit(self, /) -> int: ...
  326. def swap(self, other: PySide6.QtSerialBus.QCanUniqueIdDescription, /) -> None: ...
  327. class QIntList: ...
  328. class QModbusClient(PySide6.QtSerialBus.QModbusDevice):
  329. timeoutChanged : typing.ClassVar[Signal] = ... # timeoutChanged(int)
  330. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  331. def numberOfRetries(self, /) -> int: ...
  332. def processPrivateResponse(self, response: PySide6.QtSerialBus.QModbusResponse, data: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  333. def processResponse(self, response: PySide6.QtSerialBus.QModbusResponse, data: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  334. def sendRawRequest(self, request: PySide6.QtSerialBus.QModbusRequest, serverAddress: int, /) -> PySide6.QtSerialBus.QModbusReply: ...
  335. def sendReadRequest(self, read: PySide6.QtSerialBus.QModbusDataUnit, serverAddress: int, /) -> PySide6.QtSerialBus.QModbusReply: ...
  336. def sendReadWriteRequest(self, read: PySide6.QtSerialBus.QModbusDataUnit, write: PySide6.QtSerialBus.QModbusDataUnit, serverAddress: int, /) -> PySide6.QtSerialBus.QModbusReply: ...
  337. def sendWriteRequest(self, write: PySide6.QtSerialBus.QModbusDataUnit, serverAddress: int, /) -> PySide6.QtSerialBus.QModbusReply: ...
  338. def setNumberOfRetries(self, number: int, /) -> None: ...
  339. def setTimeout(self, newTimeout: int, /) -> None: ...
  340. def timeout(self, /) -> int: ...
  341. class QModbusDataUnit(Shiboken.Object):
  342. class RegisterType(enum.Enum):
  343. Invalid = 0x0
  344. DiscreteInputs = 0x1
  345. Coils = 0x2
  346. InputRegisters = 0x3
  347. HoldingRegisters = 0x4
  348. @typing.overload
  349. def __init__(self, /) -> None: ...
  350. @typing.overload
  351. def __init__(self, QModbusDataUnit: PySide6.QtSerialBus.QModbusDataUnit, /) -> None: ...
  352. @typing.overload
  353. def __init__(self, type: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, /) -> None: ...
  354. @typing.overload
  355. def __init__(self, type: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, newStartAddress: int, newValues: collections.abc.Sequence[int], /) -> None: ...
  356. @typing.overload
  357. def __init__(self, type: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, newStartAddress: int, newValueCount: int, /) -> None: ...
  358. def __copy__(self, /) -> typing.Self: ...
  359. def isValid(self, /) -> bool: ...
  360. def registerType(self, /) -> PySide6.QtSerialBus.QModbusDataUnit.RegisterType: ...
  361. def setRegisterType(self, type: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, /) -> None: ...
  362. def setStartAddress(self, newAddress: int, /) -> None: ...
  363. def setValue(self, index: int, newValue: int, /) -> None: ...
  364. def setValueCount(self, newCount: int, /) -> None: ...
  365. def setValues(self, newValues: collections.abc.Sequence[int], /) -> None: ...
  366. def startAddress(self, /) -> int: ...
  367. def value(self, index: int, /) -> int: ...
  368. def valueCount(self, /) -> int: ...
  369. def values(self, /) -> typing.List[int]: ...
  370. class QModbusDevice(PySide6.QtCore.QObject):
  371. errorOccurred : typing.ClassVar[Signal] = ... # errorOccurred(QModbusDevice::Error)
  372. stateChanged : typing.ClassVar[Signal] = ... # stateChanged(QModbusDevice::State)
  373. class ConnectionParameter(enum.Enum):
  374. SerialPortNameParameter = 0x0
  375. SerialParityParameter = 0x1
  376. SerialBaudRateParameter = 0x2
  377. SerialDataBitsParameter = 0x3
  378. SerialStopBitsParameter = 0x4
  379. NetworkPortParameter = 0x5
  380. NetworkAddressParameter = 0x6
  381. class Error(enum.Enum):
  382. NoError = 0x0
  383. ReadError = 0x1
  384. WriteError = 0x2
  385. ConnectionError = 0x3
  386. ConfigurationError = 0x4
  387. TimeoutError = 0x5
  388. ProtocolError = 0x6
  389. ReplyAbortedError = 0x7
  390. UnknownError = 0x8
  391. InvalidResponseError = 0x9
  392. class IntermediateError(enum.Enum):
  393. ResponseCrcError = 0x0
  394. ResponseRequestMismatch = 0x1
  395. class State(enum.Enum):
  396. UnconnectedState = 0x0
  397. ConnectingState = 0x1
  398. ConnectedState = 0x2
  399. ClosingState = 0x3
  400. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  401. def close(self, /) -> None: ...
  402. def connectDevice(self, /) -> bool: ...
  403. def connectionParameter(self, parameter: PySide6.QtSerialBus.QModbusDevice.ConnectionParameter, /) -> typing.Any: ...
  404. def device(self, /) -> PySide6.QtCore.QIODevice: ...
  405. def disconnectDevice(self, /) -> None: ...
  406. def error(self, /) -> PySide6.QtSerialBus.QModbusDevice.Error: ...
  407. def errorString(self, /) -> str: ...
  408. def open(self, /) -> bool: ...
  409. def setConnectionParameter(self, parameter: PySide6.QtSerialBus.QModbusDevice.ConnectionParameter, value: typing.Any, /) -> None: ...
  410. def setError(self, errorText: str, error: PySide6.QtSerialBus.QModbusDevice.Error, /) -> None: ...
  411. def setState(self, newState: PySide6.QtSerialBus.QModbusDevice.State, /) -> None: ...
  412. def state(self, /) -> PySide6.QtSerialBus.QModbusDevice.State: ...
  413. class QModbusDeviceIdentification(Shiboken.Object):
  414. class ConformityLevel(enum.Enum):
  415. BasicConformityLevel = 0x1
  416. RegularConformityLevel = 0x2
  417. ExtendedConformityLevel = 0x3
  418. BasicIndividualConformityLevel = 0x81
  419. RegularIndividualConformityLevel = 0x82
  420. ExtendedIndividualConformityLevel = 0x83
  421. class ObjectId(enum.Enum):
  422. VendorNameObjectId = 0x0
  423. ProductCodeObjectId = 0x1
  424. MajorMinorRevisionObjectId = 0x2
  425. VendorUrlObjectId = 0x3
  426. ProductNameObjectId = 0x4
  427. ModelNameObjectId = 0x5
  428. UserApplicationNameObjectId = 0x6
  429. ReservedObjectId = 0x7
  430. ProductDependentObjectId = 0x80
  431. UndefinedObjectId = 0x100
  432. class ReadDeviceIdCode(enum.Enum):
  433. BasicReadDeviceIdCode = 0x1
  434. RegularReadDeviceIdCode = 0x2
  435. ExtendedReadDeviceIdCode = 0x3
  436. IndividualReadDeviceIdCode = 0x4
  437. @typing.overload
  438. def __init__(self, /) -> None: ...
  439. @typing.overload
  440. def __init__(self, QModbusDeviceIdentification: PySide6.QtSerialBus.QModbusDeviceIdentification, /) -> None: ...
  441. def __copy__(self, /) -> typing.Self: ...
  442. def conformityLevel(self, /) -> PySide6.QtSerialBus.QModbusDeviceIdentification.ConformityLevel: ...
  443. def contains(self, objectId: int, /) -> bool: ...
  444. @staticmethod
  445. def fromByteArray(ba: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> PySide6.QtSerialBus.QModbusDeviceIdentification: ...
  446. def insert(self, objectId: int, data: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> bool: ...
  447. def isValid(self, /) -> bool: ...
  448. def objectIds(self, /) -> typing.List[int]: ...
  449. def remove(self, objectId: int, /) -> None: ...
  450. def setConformityLevel(self, level: PySide6.QtSerialBus.QModbusDeviceIdentification.ConformityLevel, /) -> None: ...
  451. def value(self, objectId: int, /) -> PySide6.QtCore.QByteArray: ...
  452. class QModbusExceptionResponse(PySide6.QtSerialBus.QModbusResponse):
  453. @typing.overload
  454. def __init__(self, /) -> None: ...
  455. @typing.overload
  456. def __init__(self, fc: PySide6.QtSerialBus.QModbusPdu.FunctionCode, ec: PySide6.QtSerialBus.QModbusPdu.ExceptionCode, /) -> None: ...
  457. @typing.overload
  458. def __init__(self, pdu: PySide6.QtSerialBus.QModbusPdu, /) -> None: ...
  459. def setExceptionCode(self, ec: PySide6.QtSerialBus.QModbusPdu.ExceptionCode, /) -> None: ...
  460. def setFunctionCode(self, c: PySide6.QtSerialBus.QModbusPdu.FunctionCode, /) -> None: ...
  461. class QModbusPdu(Shiboken.Object):
  462. class ExceptionCode(enum.Enum):
  463. IllegalFunction = 0x1
  464. IllegalDataAddress = 0x2
  465. IllegalDataValue = 0x3
  466. ServerDeviceFailure = 0x4
  467. Acknowledge = 0x5
  468. ServerDeviceBusy = 0x6
  469. NegativeAcknowledge = 0x7
  470. MemoryParityError = 0x8
  471. GatewayPathUnavailable = 0xa
  472. GatewayTargetDeviceFailedToRespond = 0xb
  473. ExtendedException = 0xff
  474. class FunctionCode(enum.Enum):
  475. Invalid = 0x0
  476. ReadCoils = 0x1
  477. ReadDiscreteInputs = 0x2
  478. ReadHoldingRegisters = 0x3
  479. ReadInputRegisters = 0x4
  480. WriteSingleCoil = 0x5
  481. WriteSingleRegister = 0x6
  482. ReadExceptionStatus = 0x7
  483. Diagnostics = 0x8
  484. GetCommEventCounter = 0xb
  485. GetCommEventLog = 0xc
  486. WriteMultipleCoils = 0xf
  487. WriteMultipleRegisters = 0x10
  488. ReportServerId = 0x11
  489. ReadFileRecord = 0x14
  490. WriteFileRecord = 0x15
  491. MaskWriteRegister = 0x16
  492. ReadWriteMultipleRegisters = 0x17
  493. ReadFifoQueue = 0x18
  494. EncapsulatedInterfaceTransport = 0x2b
  495. UndefinedFunctionCode = 0x100
  496. @typing.overload
  497. def __init__(self, /) -> None: ...
  498. @typing.overload
  499. def __init__(self, code: PySide6.QtSerialBus.QModbusPdu.FunctionCode, newData: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> None: ...
  500. @typing.overload
  501. def __init__(self, arg__1: PySide6.QtSerialBus.QModbusPdu, /) -> None: ...
  502. def __lshift__(self, stream: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  503. def __repr__(self, /) -> str: ...
  504. def data(self, /) -> PySide6.QtCore.QByteArray: ...
  505. def dataSize(self, /) -> int: ...
  506. def exceptionCode(self, /) -> PySide6.QtSerialBus.QModbusPdu.ExceptionCode: ...
  507. def functionCode(self, /) -> PySide6.QtSerialBus.QModbusPdu.FunctionCode: ...
  508. def isException(self, /) -> bool: ...
  509. def isValid(self, /) -> bool: ...
  510. def setData(self, newData: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview, /) -> None: ...
  511. def setFunctionCode(self, code: PySide6.QtSerialBus.QModbusPdu.FunctionCode, /) -> None: ...
  512. def size(self, /) -> int: ...
  513. class QModbusReply(PySide6.QtCore.QObject):
  514. errorOccurred : typing.ClassVar[Signal] = ... # errorOccurred(QModbusDevice::Error)
  515. finished : typing.ClassVar[Signal] = ... # finished()
  516. intermediateErrorOccurred: typing.ClassVar[Signal] = ... # intermediateErrorOccurred(QModbusDevice::IntermediateError)
  517. class ReplyType(enum.Enum):
  518. Raw = 0x0
  519. Common = 0x1
  520. Broadcast = 0x2
  521. def __init__(self, type: PySide6.QtSerialBus.QModbusReply.ReplyType, serverAddress: int, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  522. def addIntermediateError(self, error: PySide6.QtSerialBus.QModbusDevice.IntermediateError, /) -> None: ...
  523. def error(self, /) -> PySide6.QtSerialBus.QModbusDevice.Error: ...
  524. def errorString(self, /) -> str: ...
  525. def intermediateErrors(self, /) -> typing.List[PySide6.QtSerialBus.QModbusDevice.IntermediateError]: ...
  526. def isFinished(self, /) -> bool: ...
  527. def rawResult(self, /) -> PySide6.QtSerialBus.QModbusResponse: ...
  528. def result(self, /) -> PySide6.QtSerialBus.QModbusDataUnit: ...
  529. def serverAddress(self, /) -> int: ...
  530. def setError(self, error: PySide6.QtSerialBus.QModbusDevice.Error, errorText: str, /) -> None: ...
  531. def setFinished(self, isFinished: bool, /) -> None: ...
  532. def setRawResult(self, unit: PySide6.QtSerialBus.QModbusResponse, /) -> None: ...
  533. def setResult(self, unit: PySide6.QtSerialBus.QModbusDataUnit, /) -> None: ...
  534. def type(self, /) -> PySide6.QtSerialBus.QModbusReply.ReplyType: ...
  535. class QModbusRequest(PySide6.QtSerialBus.QModbusPdu):
  536. @typing.overload
  537. def __init__(self, /) -> None: ...
  538. @typing.overload
  539. def __init__(self, code: PySide6.QtSerialBus.QModbusPdu.FunctionCode, /, newData: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview = ...) -> None: ...
  540. @typing.overload
  541. def __init__(self, pdu: PySide6.QtSerialBus.QModbusPdu, /) -> None: ...
  542. def __lshift__(self, stream: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  543. def __rshift__(self, stream: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  544. @staticmethod
  545. def calculateDataSize(pdu: PySide6.QtSerialBus.QModbusRequest, /) -> int: ...
  546. @staticmethod
  547. def minimumDataSize(pdu: PySide6.QtSerialBus.QModbusRequest, /) -> int: ...
  548. class QModbusResponse(PySide6.QtSerialBus.QModbusPdu):
  549. @typing.overload
  550. def __init__(self, /) -> None: ...
  551. @typing.overload
  552. def __init__(self, code: PySide6.QtSerialBus.QModbusPdu.FunctionCode, /, newData: PySide6.QtCore.QByteArray | bytes | bytearray | memoryview = ...) -> None: ...
  553. @typing.overload
  554. def __init__(self, pdu: PySide6.QtSerialBus.QModbusPdu, /) -> None: ...
  555. def __lshift__(self, stream: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  556. def __rshift__(self, stream: PySide6.QtCore.QDataStream, /) -> PySide6.QtCore.QDataStream: ...
  557. @staticmethod
  558. def calculateDataSize(pdu: PySide6.QtSerialBus.QModbusResponse, /) -> int: ...
  559. @staticmethod
  560. def minimumDataSize(pdu: PySide6.QtSerialBus.QModbusResponse, /) -> int: ...
  561. class QModbusRtuSerialClient(PySide6.QtSerialBus.QModbusClient):
  562. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  563. def close(self, /) -> None: ...
  564. def interFrameDelay(self, /) -> int: ...
  565. def open(self, /) -> bool: ...
  566. def setInterFrameDelay(self, microseconds: int, /) -> None: ...
  567. def setTurnaroundDelay(self, turnaroundDelay: int, /) -> None: ...
  568. def turnaroundDelay(self, /) -> int: ...
  569. class QModbusRtuSerialServer(PySide6.QtSerialBus.QModbusServer):
  570. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  571. def close(self, /) -> None: ...
  572. def interFrameDelay(self, /) -> int: ...
  573. def open(self, /) -> bool: ...
  574. def processRequest(self, request: PySide6.QtSerialBus.QModbusPdu, /) -> PySide6.QtSerialBus.QModbusResponse: ...
  575. def processesBroadcast(self, /) -> bool: ...
  576. def setInterFrameDelay(self, microseconds: int, /) -> None: ...
  577. class QModbusServer(PySide6.QtSerialBus.QModbusDevice):
  578. dataWritten : typing.ClassVar[Signal] = ... # dataWritten(QModbusDataUnit::RegisterType,int,int)
  579. class Option(enum.Enum):
  580. DiagnosticRegister = 0x0
  581. ExceptionStatusOffset = 0x1
  582. DeviceBusy = 0x2
  583. AsciiInputDelimiter = 0x3
  584. ListenOnlyMode = 0x4
  585. ServerIdentifier = 0x5
  586. RunIndicatorStatus = 0x6
  587. AdditionalData = 0x7
  588. DeviceIdentification = 0x8
  589. UserOption = 0x100
  590. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  591. @typing.overload
  592. def data(self, newData: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  593. @typing.overload
  594. def data(self, table: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, address: int, /) -> typing.Tuple[bool, int]: ...
  595. def processPrivateRequest(self, request: PySide6.QtSerialBus.QModbusPdu, /) -> PySide6.QtSerialBus.QModbusResponse: ...
  596. def processRequest(self, request: PySide6.QtSerialBus.QModbusPdu, /) -> PySide6.QtSerialBus.QModbusResponse: ...
  597. def processesBroadcast(self, /) -> bool: ...
  598. def readData(self, newData: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  599. def serverAddress(self, /) -> int: ...
  600. @typing.overload
  601. def setData(self, unit: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  602. @typing.overload
  603. def setData(self, table: PySide6.QtSerialBus.QModbusDataUnit.RegisterType, address: int, data: int, /) -> bool: ...
  604. def setMap(self, map: typing.Dict[PySide6.QtSerialBus.QModbusDataUnit.RegisterType, PySide6.QtSerialBus.QModbusDataUnit], /) -> bool: ...
  605. def setServerAddress(self, serverAddress: int, /) -> None: ...
  606. def setValue(self, option: int, value: typing.Any, /) -> bool: ...
  607. def value(self, option: int, /) -> typing.Any: ...
  608. def writeData(self, unit: PySide6.QtSerialBus.QModbusDataUnit, /) -> bool: ...
  609. class QModbusTcpClient(PySide6.QtSerialBus.QModbusClient):
  610. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  611. def close(self, /) -> None: ...
  612. def open(self, /) -> bool: ...
  613. class QModbusTcpConnectionObserver(Shiboken.Object):
  614. def __init__(self, /) -> None: ...
  615. def acceptNewConnection(self, newClient: PySide6.QtNetwork.QTcpSocket, /) -> bool: ...
  616. class QModbusTcpServer(PySide6.QtSerialBus.QModbusServer):
  617. modbusClientDisconnected : typing.ClassVar[Signal] = ... # modbusClientDisconnected(QTcpSocket*)
  618. def __init__(self, /, parent: PySide6.QtCore.QObject | None = ...) -> None: ...
  619. def close(self, /) -> None: ...
  620. def installConnectionObserver(self, observer: PySide6.QtSerialBus.QModbusTcpConnectionObserver, /) -> None: ...
  621. def open(self, /) -> bool: ...
  622. def processRequest(self, request: PySide6.QtSerialBus.QModbusPdu, /) -> PySide6.QtSerialBus.QModbusResponse: ...
  623. class QtCanBus(Shiboken.Object):
  624. class DataFormat(enum.Enum):
  625. SignedInteger = 0x0
  626. UnsignedInteger = 0x1
  627. Float = 0x2
  628. Double = 0x3
  629. AsciiString = 0x4
  630. class DataSource(enum.Enum):
  631. Payload = 0x0
  632. FrameId = 0x1
  633. class MultiplexState(enum.Enum):
  634. None_ = 0x0
  635. MultiplexorSwitch = 0x1
  636. MultiplexedSignal = 0x2
  637. SwitchAndSignal = 0x3
  638. class UniqueId(enum.Enum): ... # type: ignore[misc]
  639. @staticmethod
  640. def qbswap(src: PySide6.QtSerialBus.QtCanBus.UniqueId, /) -> PySide6.QtSerialBus.QtCanBus.UniqueId: ...
  641. # eof