C# Class System.IO.Ports.SerialInterruptPort

Provides a connection to a serial communications port that supports line delimited reading and interruptable writing, including timeouts and DataReceived event implementation.
Inheritance: SerialInterruptPortBase, ISerialPort, IDisposable
显示文件 Open project: toxsedyshev/imBMW

Public Properties

Property Type Description
BusyValue bool

Protected Properties

Property Type Description
_busy Microsoft.SPOT.Hardware.InterruptPort

Public Methods

Method Description
Dispose ( ) : void

Releases resources used by a serial port.

SerialInterruptPort ( 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.

SerialInterruptPort ( SerialPortConfiguration config, Cpu busySignal, int writeBufferSize, int readBufferSize, int readTimeout = Timeout.Infinite ) : System

Creates a new instance of SerialInterruptPort class, allowing to specify buffer sizes and blocking input port.

Private Methods

Method Description
OnBusyChanged ( uint port, uint state, System.DateTime time ) : void

Method Details

Dispose() public method

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

SerialInterruptPort() 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 SerialInterruptPort ( SerialPortConfiguration config ) : System
config SerialPortConfiguration An object that contains the configuration information for the serial port.
return System

SerialInterruptPort() public method

Creates a new instance of SerialInterruptPort class, allowing to specify buffer sizes and blocking input port.
public SerialInterruptPort ( SerialPortConfiguration config, Cpu busySignal, int writeBufferSize, int readBufferSize, int readTimeout = Timeout.Infinite ) : System
config SerialPortConfiguration An object that contains the configuration information for the serial port.
busySignal Microsoft.SPOT.Hardware.Cpu A to use as a output hardware flow control. Can be if none used.
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

Property Details

BusyValue public_oe property

The value of input pin when pauding the data output is requested. Default is true, that is, the input is of active high type.
public bool BusyValue
return bool

_busy protected_oe property

protected InterruptPort,Microsoft.SPOT.Hardware _busy
return Microsoft.SPOT.Hardware.InterruptPort