Header menu logo fable-electron-docs-api

SerialPort Type

Constructors

Constructor Description

SerialPort(portId, portName, ?displayName, ?vendorId, ?productId, ?serialNumber, ?usbDriverName, ?deviceInstanceId)

Full Usage: SerialPort(portId, portName, ?displayName, ?vendorId, ?productId, ?serialNumber, ?usbDriverName, ?deviceInstanceId)

Parameters:
    portId : string - Unique identifier for the port.
    portName : string - Name of the port.
    ?displayName : string - A string suitable for display to the user for describing this device.
    ?vendorId : string - The USB vendor ID.
    ?productId : string - The USB product ID.
    ?serialNumber : string - The USB device serial number.
    ?usbDriverName : string - ⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || Represents a single serial port on macOS can be enumerated by multiple drivers.
    ?deviceInstanceId : string - ⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || A stable identifier on Windows that can be used for device permissions.

Returns: SerialPort
portId : string

Unique identifier for the port.

portName : string

Name of the port.

?displayName : string

A string suitable for display to the user for describing this device.

?vendorId : string

The USB vendor ID.

?productId : string

The USB product ID.

?serialNumber : string

The USB device serial number.

?usbDriverName : string

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ || Represents a single serial port on macOS can be enumerated by multiple drivers.

?deviceInstanceId : string

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ || A stable identifier on Windows that can be used for device permissions.

Returns: SerialPort

Instance members

Instance member Description

this.deviceInstanceId

Full Usage: this.deviceInstanceId

⚠ OS Compatibility: WIN ✔ | MAC ❌ | LIN ❌ | MAS ❌ A stable identifier on Windows that can be used for device permissions.

this.displayName

Full Usage: this.displayName

A string suitable for display to the user for describing this device.

this.portId

Full Usage: this.portId

Unique identifier for the port.

this.portName

Full Usage: this.portName

Name of the port.

this.productId

Full Usage: this.productId

The USB product ID.

this.serialNumber

Full Usage: this.serialNumber

The USB device serial number.

this.usbDriverName

Full Usage: this.usbDriverName

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌ Represents a single serial port on macOS can be enumerated by multiple drivers.

this.vendorId

Full Usage: this.vendorId

The USB vendor ID.

Type something to start searching.