Files
opsxshell/shared/types/serial.types.ts
T

27 lines
511 B
TypeScript

export type SerialParity = 'none' | 'odd' | 'even'
export type SerialFlowControl = 'none' | 'software' | 'hardware'
export interface SerialConfig {
path: string
baudRate: number
dataBits: 5 | 6 | 7 | 8
stopBits: 1 | 2
parity: SerialParity
flowControl: SerialFlowControl
}
export interface SerialPortSummary {
path: string
portType: string
}
export interface SerialDataEvent {
sessionId: string
data: number[]
}
export interface SerialErrorEvent {
sessionId: string
message: string
}