KDE 4.7 PyKDE API Reference

- KDE's Python API

# SerialInterface Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

This device interface is available on serial interfaces.

Since:
  4.3

## Enumerations

SerialType | { Unknown, Platform, Usb }

## Methods

| __init__ (self, QObject backendObject)
QVariant | driverHandle (self)
int | port (self)
Solid.SerialInterface.SerialType | serialType (self)

## Static Methods

Solid.DeviceInterface.Type | deviceInterfaceType ()

## Method Documentation

__init__ | ( | self, |
|  | QObject | backendObject
| ) |  |  |

Creates a new SerialInterface object. You generally won't need this. It's created when necessary using Device.as().

Parameters:

  | backendObject | the device interface object provided by the backend

See also:
  Solid.Device.as()

Since:
  4.3

QVariant driverHandle | ( |  | self ) |

Retrieves the name of the interface in the system. This name is system dependent, it allows to identify the interface in the system. For example it can be of the form "/dev/ttyS0" under Linux.

Returns:
  the interface name

Since:
  4.3

int port | ( |  | self ) |

Retrieves the port number, e.g. 0 for the first COM port.

Returns:
  The port number of the serial device, or -1 if unknown.

Since:
  4.3

Solid.SerialInterface.SerialType serialType | ( |  | self ) |

Retrieves the type of the serial device. Examples for Linux are "usb" for USB based serial devices, or "platform" for built-in serial ports.

Returns:
  the type of the serial device

Since:
  4.3

## Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType | ( |  | ) |

Get the Solid.DeviceInterface.Type of the SerialInterface device interface.

Returns:
  the SerialInterface device interface type

See also:
  Solid.Ifaces.Enums.DeviceInterface.Type

Since:
  4.3

## Enumeration Documentation

SerialType

This enum type defines the type of a serial interface.

- Unknown : The type could not be determined - Platform : A built-in serial port - USB : A USB serial port

Since:
  4.3

Enumerator:

  Unknown = 0 |
  Platform |
  Usb |