from typing import Any

from typing import overload
import mrpt.pymrpt.mrpt.io
import mrpt.pymrpt.mrpt.io.CStream
import mrpt.pymrpt.mrpt.system

class CClientTCPSocket(mrpt.pymrpt.mrpt.io.CStream):
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, arg0: CClientTCPSocket) -> None: ...
    @overload
    def __init__(self, arg0: CClientTCPSocket) -> None: ...
    @overload
    def Seek(self, off: int) -> int: ...
    @overload
    def Seek(self, off: int, org: mrpt.pymrpt.mrpt.io.CStream.TSeekOrigin) -> int: ...
    @overload
    def Seek(int64_t, enummrpt) -> uint64_t: ...
    def assign(self) -> CClientTCPSocket: ...
    @overload
    def close(self) -> None: ...
    @overload
    def close() -> void: ...
    @overload
    def connect(self, remotePartAddress: str, remotePartTCPPort: int) -> None: ...
    @overload
    def connect(self, remotePartAddress: str, remotePartTCPPort: int, timeout_ms: int) -> None: ...
    @overload
    def connect(conststd, unsignedshort, unsignedint) -> void: ...
    @overload
    def getPosition(self) -> int: ...
    @overload
    def getPosition() -> uint64_t: ...
    @overload
    def getReadPendingBytes(self) -> int: ...
    @overload
    def getReadPendingBytes() -> size_t: ...
    @overload
    def getSOSendBufffer(self) -> int: ...
    @overload
    def getSOSendBufffer() -> int: ...
    @overload
    def getTCPNoDelay(self) -> int: ...
    @overload
    def getTCPNoDelay() -> int: ...
    @overload
    def getTotalBytesCount(self) -> int: ...
    @overload
    def getTotalBytesCount() -> uint64_t: ...
    @overload
    def isConnected(self) -> bool: ...
    @overload
    def isConnected() -> bool: ...
    @overload
    def readAsync(self, Buffer: capsule, Count: int) -> int: ...
    @overload
    def readAsync(self, Buffer: capsule, Count: int, timeoutStart_ms: int) -> int: ...
    @overload
    def readAsync(self, Buffer: capsule, Count: int, timeoutStart_ms: int, timeoutBetween_ms: int) -> int: ...
    @overload
    def sendString(self, str: str) -> None: ...
    @overload
    def sendString(conststd) -> void: ...
    @overload
    def setSOSendBufffer(self, newValue: int) -> int: ...
    @overload
    def setSOSendBufffer(int) -> int: ...
    @overload
    def setTCPNoDelay(self, newValue: int) -> int: ...
    @overload
    def setTCPNoDelay(int) -> int: ...
    def writeAsync(self, *args, **kwargs) -> Any: ...

class CSerialPort(mrpt.pymrpt.mrpt.io.CStream):
    @overload
    def __init__(self, arg0: str) -> None: ...
    @overload
    def __init__(self, portName: str, openNow: bool) -> None: ...
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, arg0: CSerialPort) -> None: ...
    @overload
    def __init__(self, arg0: CSerialPort) -> None: ...
    def Read(self, Buffer: capsule, Count: int) -> int: ...
    def ReadString(self, *args, **kwargs) -> Any: ...
    @overload
    def Seek(self, off: int) -> int: ...
    @overload
    def Seek(self, off: int, o: mrpt.pymrpt.mrpt.io.CStream.TSeekOrigin) -> int: ...
    @overload
    def Seek(int64_t, enummrpt) -> uint64_t: ...
    def Write(self, Buffer: capsule, Count: int) -> int: ...
    def assign(self) -> CSerialPort: ...
    @overload
    def close(self) -> None: ...
    @overload
    def close() -> void: ...
    @overload
    def getPosition(self) -> int: ...
    @overload
    def getPosition() -> uint64_t: ...
    @overload
    def getTotalBytesCount(self) -> int: ...
    @overload
    def getTotalBytesCount() -> uint64_t: ...
    @overload
    def isOpen(self) -> bool: ...
    @overload
    def isOpen() -> bool: ...
    @overload
    def open(self) -> None: ...
    @overload
    def open() -> void: ...
    @overload
    def open(self, COM_name: str) -> None: ...
    @overload
    def open(conststd) -> void: ...
    @overload
    def purgeBuffers(self) -> None: ...
    @overload
    def purgeBuffers() -> void: ...
    def setConfig(self, *args, **kwargs) -> Any: ...
    @overload
    def setSerialPortName(self, COM_name: str) -> None: ...
    @overload
    def setSerialPortName(conststd) -> void: ...
    def setTimeouts(self, ReadIntervalTimeout: int, ReadTotalTimeoutMultiplier: int, ReadTotalTimeoutConstant: int, WriteTotalTimeoutMultiplier: int, WriteTotalTimeoutConstant: int) -> None: ...

class CServerTCPSocket:
    @overload
    def __init__(self, listenPort: int) -> None: ...
    @overload
    def __init__(self, listenPort: int, IPaddress: str) -> None: ...
    @overload
    def __init__(self, listenPort: int, IPaddress: str, maxConnectionsWaiting: int) -> None: ...
    @overload
    def __init__(self, listenPort: int, IPaddress: str, maxConnectionsWaiting: int, verbosityLevel: mrpt.pymrpt.mrpt.system.VerbosityLevel) -> None: ...
    @overload
    def __init__(self, arg0: CServerTCPSocket) -> None: ...
    @overload
    def accept(self) -> CClientTCPSocket: ...
    @overload
    def accept(self, timeout_ms: int) -> CClientTCPSocket: ...
    def assign(self) -> CServerTCPSocket: ...
    @overload
    def isListening(self) -> bool: ...
    @overload
    def isListening() -> bool: ...

class TFTDIDevice:
    ftdi_description: str
    ftdi_manufacturer: str
    ftdi_serial: str
    usb_idProduct: int
    usb_idVendor: int
    usb_serialNumber: int
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, arg0: TFTDIDevice) -> None: ...
    def assign(self) -> TFTDIDevice: ...
