C# Класс Solar.Car.CanUsbHardware

A customized SerialPort, with support for our BUGGY CAN-USB cable. * asynchronously reads lines from a SerialPort, firing the LineReceived event. * locks the SerialPort for all reading and writing. * drains the SerialPort Read buffer when closing (WARNING this can infinite loop)
Наследование: ICanUsbHardware
Показать файл Открыть проект

Открытые методы

Метод Описание
CanUsbHardware ( ) : System

Initializes a new instance of the SolarCar.SyncSerialPort class.

Close ( ) : void

Releases the SerialPort and performs other cleanup operations before the SolarCar.SyncSerialPort is reclaimed by garbage collection.

Dispose ( ) : void
LockReadData ( ) : void

Event Handler for this.port's SerialPort.DataReceived event. Acquires the SerialPort, reads data into buffer. It is invoked on a separate thread by SerialPort. Lines terminated by the NewLine character are passed to the LineReceivedDelegate.

LockWriteLine ( string line ) : void

Acquire the SerialPort, and write a line.

Open ( ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Описание методов

CanUsbHardware() публичный Метод

Initializes a new instance of the SolarCar.SyncSerialPort class.
public CanUsbHardware ( ) : System
Результат System

Close() публичный Метод

Releases the SerialPort and performs other cleanup operations before the SolarCar.SyncSerialPort is reclaimed by garbage collection.
public Close ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

LockReadData() публичный Метод

Event Handler for this.port's SerialPort.DataReceived event. Acquires the SerialPort, reads data into buffer. It is invoked on a separate thread by SerialPort. Lines terminated by the NewLine character are passed to the LineReceivedDelegate.
public LockReadData ( ) : void
Результат void

LockWriteLine() публичный Метод

Acquire the SerialPort, and write a line.
public LockWriteLine ( string line ) : void
line string Line.
Результат void

Open() публичный Метод

public Open ( ) : void
Результат void