Constructors
constructor
- new Xmodem(sendRaw): Xmodem
Methods
clear
- clear(): void
Returns void
downloadFile
- downloadFile(filename): Promise<number>
Returns Promise<number>
handlePacket
- handlePacket(packet): Promise<number>
Returns Promise<number>
sendCommand
- sendCommand(command, buffer?, sequence?, crc16?): Promise<number>
Parameters
- command: XModem_Control
Optional
buffer: Uint8ArrayOptional
sequence: numberOptional
crc16: number
Returns Promise<number>
uploadFile
- uploadFile(filename, data): Promise<number>
Parameters
- filename: string
- data: Uint8Array
Returns Promise<number>
validateCrc16
- validateCrc16(packet): boolean
Returns boolean