Метод | Описание | |
---|---|---|
AvailablePorts ( ) : Primitive |
Returns a list of available serial ports.
|
|
ClosePort ( ) : Primitive |
Closes the open serial port.
|
|
OpenPort ( Primitive portName, Primitive baudRate ) : Primitive |
Opens a serial port for use. Assumes 8 databits, no parity.
|
|
RXAll ( ) : Primitive |
Reads all available bytes in the open comm port input buffer.
|
|
RXByte ( ) : Primitive |
Reads one byte from the open serial port and returns that byte as an integer.
|
|
RXChar ( ) : Primitive |
Reads one byte from the open serial port and returns that byte as a unicode character.
|
|
SetDataBits ( Primitive dataBits ) : Primitive |
Sets current port data bits. 5 to 8 (default).
|
|
SetEncoding ( Primitive encoding ) : Primitive |
Sets current port encoding for send and receive text conversion.
|
|
SetHandshake ( Primitive handshake ) : Primitive |
Sets or clears hardware flow control for the current port.
|
|
SetParity ( Primitive parity ) : Primitive |
Sets current port parity.
|
|
SetStopBits ( Primitive stopBits ) : Primitive |
Current port stop bits.
|
|
SwapPort ( Primitive portName ) : Primitive |
Switch the current active port to a previously opened port.
|
|
TXByte ( Primitive dataByte ) : Primitive |
Sends one byte to the serial port.
|
|
TXString ( Primitive dataString ) : Primitive |
Sends a string to the serial port.
|
Метод | Описание | |
---|---|---|
DataReceivedEvent ( Object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void | ||
ErrorReceivedEvent ( Object sender, System.IO.Ports.SerialErrorReceivedEventArgs e ) : void |
public static AvailablePorts ( ) : Primitive | ||
Результат | Primitive |
public static OpenPort ( Primitive portName, Primitive baudRate ) : Primitive | ||
portName | Primitive | /// String identifying which port to open in the form of "COM8". /// |
baudRate | Primitive | /// Integer baud rate, for example 9600. /// |
Результат | Primitive |
public static SetDataBits ( Primitive dataBits ) : Primitive | ||
dataBits | Primitive | The data bits: /// 5 to 8 (default). /// |
Результат | Primitive |
public static SetEncoding ( Primitive encoding ) : Primitive | ||
encoding | Primitive | The encoding: /// "Ascii" (default), "Unicode", "UTF7", "UTF8", "UTF32" or "BigEndianUnicode". /// |
Результат | Primitive |
public static SetHandshake ( Primitive handshake ) : Primitive | ||
handshake | Primitive | /// "H" to select hardware flow control, "HX" for hardware and software flow control, "X" for software fow control, any other character to clear. /// |
Результат | Primitive |
public static SetParity ( Primitive parity ) : Primitive | ||
parity | Primitive | The parity: /// "None" (default), "Even", "Mark", "Odd" or "Space". /// |
Результат | Primitive |
public static SetStopBits ( Primitive stopBits ) : Primitive | ||
stopBits | Primitive | The stop bits: /// "One" (default), "None", "OnePointFive" or "Two". /// |
Результат | Primitive |
public static SwapPort ( Primitive portName ) : Primitive | ||
portName | Primitive | String identifying a port that is already opened. |
Результат | Primitive |
public static TXByte ( Primitive dataByte ) : Primitive | ||
dataByte | Primitive | /// The byte to be written to the port. /// |
Результат | Primitive |
public static TXString ( Primitive dataString ) : Primitive | ||
dataString | Primitive | /// String value to be sent. /// |
Результат | Primitive |