Interface SerialPort

interface SerialPort {
    receiveEvent: Event<ReceivePayload>;
    send(data, isFrameComplete): void;
    setModeSync(modeSync): void;
    getModeSync(): boolean;
}

Properties

receiveEvent: Event<ReceivePayload>

This is fired by the emulator for data or synchronization events. In 'sync' mode, every such event needs to be sent to the remote instance.

Methods

  • Send serial data to the emulator.

    Parameters

    • data: undefined | Uint8Array

      Serial data to transmit (or undefined in order to communicate a frame boundary or response timeout in 'sync' mode).

    • isFrameComplete: boolean

      Marks a transmission frame as complete. Should always be true in 'simple' mode.

    Returns void

  • Switch between 'simple' and 'sync' mode. Sync mode consumes more CPU and should only be used to connect two emulator instances via IrDA.

    Parameters

    • modeSync: boolean

      Set true for 'sync' mode.

    Returns void

Generated using TypeDoc