Serial

Serial

The Serial control interface is used output data on the serial port (VP330/EVP380).

The following API is asynchronous and is using Promise to return values.
To use this API, you first need to retrieve the serial control interface thanks to IDAL.getControlInterfaces().

Methods

sendFrame(params): Promise.<boolean> | Promise.<ErrorStatus>

Send a frame on the serial port.

It is possible to send the frames defined in the serial.txt file or raw data (string, Int8Array, Uint8Array or ArrayBuffer).

Parameters
Name Type Description
params Object
Properties
Name Type Attributes Description
data string | Int8Array | Uint8Array | ArrayBuffer <optional>

The frame raw data.

id number <optional>

A frame identifier defined in serial.txt.

Returns
  • A promise resolved with a boolean value.

    Type
    Promise.<boolean>
  • A promise rejected with an ErrorStatus.

    Type
    Promise.<ErrorStatus>