@ntrip/caster
Version:
NTRIP caster
31 lines (30 loc) • 1.17 kB
TypeScript
import SerialPort from 'serialport';
import { CasterTransportDefinition, CasterTransportInterface } from '../../caster';
import { SingleConnectionTransport } from '../transport';
export interface SerialTransportOptions {
type: 'server' | 'client';
mountpoint: string;
port: string;
portOptions: {
baudRate?: 921600 | 460800 | 230400 | 115200 | 57600 | 38400 | 19200 | 9600 | 4800 | 2400 | 1800 | 1200 | 600 | 300 | 200 | 150 | 134 | 110 | 75 | 50 | number;
dataBits?: 8 | 7 | 6 | 5;
stopBits?: 1 | 2;
parity?: 'none' | 'even' | 'mark' | 'odd' | 'space';
rtscts?: boolean;
disableRtsCts?: boolean;
xon?: boolean;
xoff?: boolean;
};
str?: string;
gga?: string;
}
export declare class SerialTransport extends SingleConnectionTransport {
private readonly options;
private serial;
protected constructor(manager: CasterTransportInterface, options: SerialTransportOptions);
static new(options: SerialTransportOptions): CasterTransportDefinition;
open(): void;
close(): void;
static list(): Promise<SerialPort.PortInfo[]>;
get description(): string;
}