C# Class System.IO.Ports.SerialPort

Inheritance: System.ComponentModel.Component
显示文件 Open project: runefs/Marvin Class Usage Examples

Private Properties

Property Type Description
GetDefaultPortName string
OnDataReceived void
OnDataReceived void
OnErrorReceived void
Read int
read_byte int

Public Methods

Method Description
CheckOpen ( ) : void
Close ( ) : void
DiscardInBuffer ( ) : void
DiscardOutBuffer ( ) : void
GetPortNames ( ) : string[]
Open ( ) : void
Read ( byte buffer, int offset, int count ) : int
ReadByte ( ) : int
ReadChar ( ) : int
ReadExisting ( ) : string
ReadLine ( ) : string
ReadTo ( string value ) : string
SerialPort ( ) : System
SerialPort ( IContainer container ) : System
SerialPort ( string portName ) : System
SerialPort ( string portName, int baudRate ) : System
SerialPort ( string portName, int baudRate, Parity parity ) : System
SerialPort ( string portName, int baudRate, Parity parity, int dataBits ) : System
SerialPort ( string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits ) : System
Write ( byte buffer, int offset, int count ) : void
Write ( char buffer, int offset, int count ) : void
Write ( string str ) : void
WriteLine ( string str ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
GetDefaultPortName ( ) : string
OnDataReceived ( System.IO.Ports.SerialDataReceivedEventArgs args ) : void
OnDataReceived ( System.IO.Ports.SerialPinChangedEventArgs args ) : void
OnErrorReceived ( System.IO.Ports.SerialErrorReceivedEventArgs args ) : void
Read ( char buffer, int offset, int count ) : int
read_byte ( ) : int

Method Details

CheckOpen() public method

public CheckOpen ( ) : void
return void

Close() public method

public Close ( ) : void
return void

DiscardInBuffer() public method

public DiscardInBuffer ( ) : void
return void

DiscardOutBuffer() public method

public DiscardOutBuffer ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

GetPortNames() public static method

public static GetPortNames ( ) : string[]
return string[]

Open() public method

public Open ( ) : void
return void

Read() public method

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
return int

ReadByte() public method

public ReadByte ( ) : int
return int

ReadChar() public method

public ReadChar ( ) : int
return int

ReadExisting() public method

public ReadExisting ( ) : string
return string

ReadLine() public method

public ReadLine ( ) : string
return string

ReadTo() public method

public ReadTo ( string value ) : string
value string
return string

SerialPort() public method

public SerialPort ( ) : System
return System

SerialPort() public method

public SerialPort ( IContainer container ) : System
container IContainer
return System

SerialPort() public method

public SerialPort ( string portName ) : System
portName string
return System

SerialPort() public method

public SerialPort ( string portName, int baudRate ) : System
portName string
baudRate int
return System

SerialPort() public method

public SerialPort ( string portName, int baudRate, Parity parity ) : System
portName string
baudRate int
parity Parity
return System

SerialPort() public method

public SerialPort ( string portName, int baudRate, Parity parity, int dataBits ) : System
portName string
baudRate int
parity Parity
dataBits int
return System

SerialPort() public method

public SerialPort ( string portName, int baudRate, Parity parity, int dataBits, StopBits stopBits ) : System
portName string
baudRate int
parity Parity
dataBits int
stopBits StopBits
return System

Write() public method

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
return void

Write() public method

public Write ( char buffer, int offset, int count ) : void
buffer char
offset int
count int
return void

Write() public method

public Write ( string str ) : void
str string
return void

WriteLine() public method

public WriteLine ( string str ) : void
str string
return void