ngx-serial-console
Version:
This is an angular library, to create a component that would connect to a serial port and display the data from the port.
41 lines (38 loc) • 1.33 kB
TypeScript
import * as i0 from '@angular/core';
import { WritableSignal, Signal } from '@angular/core';
interface SerialMonitorState {
serialAvailable: boolean;
connected: boolean;
maxLines: number;
outputLines: string[];
baudRate: number;
vendorId: string | undefined;
productId: string | undefined;
theme: "CRT" | "Plain";
}
declare class NgxSerialConsole {
private scrollContainer;
theme: "CRT" | "Plain";
state: WritableSignal<SerialMonitorState>;
consoleOutput: Signal<string>;
serial: any;
themeStyles: string[];
baudRates: number[];
isUserScrolling: boolean;
autoScrollEnabled: boolean;
keepConnectionAlive: boolean;
constructor();
ngAfterViewChecked(): void;
clear(): void;
unsetConnection(): void;
disconnectSerialPort(): Promise<void>;
connectSerialPort(): void;
handleSerialEvents(): void;
openSerialPort(): Promise<void>;
readSerialPort(port: any): Promise<void>;
appendOutput(newData: string): void;
private scrollToBottomSerialOut;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxSerialConsole, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxSerialConsole, "ngx-serial-console", never, { "theme": { "alias": "theme"; "required": false; }; }, {}, never, never, true, never>;
}
export { NgxSerialConsole };