C# Class System.IO.Ports.SerialInterruptPortBase

Inheritance: SerialPortBase, ISerialPort, IDisposable
显示文件 Open project: toxsedyshev/imBMW

Protected Properties

Property Type Description
_port SerialPort

Public Methods

Method Description
Dispose ( ) : void

Releases resources used by a serial port.

Flush ( ) : void

Empties the contents of a serial port's buffer.

SerialInterruptPortBase ( SerialPortConfiguration config ) : System

Creates a new instance of SerialInterruptPort class, with hardware flow control and output pausing disabled. This corresponds to standard SerialPort class behavior.

SerialInterruptPortBase ( SerialPortConfiguration config, int writeBufferSize, int readBufferSize, int readTimeout = Timeout.Infinite ) : System

Creates a new instance of SerialInterruptPort class, allowing to specify buffer sizes.

Protected Methods

Method Description
OnBusyChanged ( bool busy ) : void
ReadDirect ( byte data, int offset, int length ) : int
WriteDirect ( byte data, int offset, int length ) : int

Method Details

Dispose() public method

Releases resources used by a serial port.
public Dispose ( ) : void
return void

Flush() public method

Empties the contents of a serial port's buffer.
public Flush ( ) : void
return void

OnBusyChanged() protected method

protected OnBusyChanged ( bool busy ) : void
busy bool
return void

ReadDirect() protected method

protected ReadDirect ( byte data, int offset, int length ) : int
data byte
offset int
length int
return int

SerialInterruptPortBase() public method

Creates a new instance of SerialInterruptPort class, with hardware flow control and output pausing disabled. This corresponds to standard SerialPort class behavior.
public SerialInterruptPortBase ( SerialPortConfiguration config ) : System
config SerialPortConfiguration An object that contains the configuration information for the serial port.
return System

SerialInterruptPortBase() public method

Creates a new instance of SerialInterruptPort class, allowing to specify buffer sizes.
public SerialInterruptPortBase ( SerialPortConfiguration config, int writeBufferSize, int readBufferSize, int readTimeout = Timeout.Infinite ) : System
config SerialPortConfiguration An object that contains the configuration information for the serial port.
writeBufferSize int The size of output buffer in bytes. Data output is paused for milliseconds every time this amount of data is sent. Can be zero to disable pausing.
readBufferSize int The size of input buffer in bytes. DataReceived event will fire only after this amount of data is received. Default is 1.
readTimeout int Timeout of port reading.
return System

WriteDirect() protected method

protected WriteDirect ( byte data, int offset, int length ) : int
data byte
offset int
length int
return int

Property Details

_port protected_oe property

protected SerialPort,System.IO.Ports _port
return SerialPort