Click or drag to resize
ISerialPort Interface
All SerialPort objects in SerialPortNET implement this interface.

Namespace: SerialPortNET
Assembly: SerialPortNET (in SerialPortNET.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface ISerialPort : IDisposable

The ISerialPort type exposes the following members.

Properties
  NameDescription
Public propertyBaudRate
Gets or sets the serial baud rate.
Public propertyBytesToRead
Gets the number of bytes of data in the receive buffer.
Public propertyBytesToWrite
Gets the number of bytes of data in the send buffer.
Public propertyDataBits
Gets or sets the standard length of data bits per byte.
Public propertyDtrControl
Gets or sets a value that enables the Data Terminal Ready (DTR) signal during serial communication.
Public propertyIsOpen
Gets a value indicating the open or closed status of the SerialPort object.
Public propertyIsRunning
Gets a value indicating the running status of the SerialPort object.
Public propertyParity
Gets or sets the parity-checking protocol.
Public propertyPortName
Gets or sets the port for communications, including but not limited to all available COM ports.
Public propertyReceivedBytesThreshold
Gets or sets the number of bytes in the internal input buffer before a DataReceived event occurs.
Public propertyStopBits
Gets or sets the standard number of stop bits per byte.
Top
Methods
  NameDescription
Public methodClose
Closes this serial port instance.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable.)
Public methodOpen
Opens the port.
Public methodRead
Reads a number of bytes from the SerialPort input buffer and writes those bytes into a byte array at the specified offset.
Public methodReadAll
Reads all bytes from the SerialPort input buffer.
Public methodRunAsync
Run asynchronous operation.
Public methodStopAsync
Stop the asynchronous operation.
Public methodWrite
Writes a specified number of bytes to the serial port using data from a buffer.
Public methodWriteAll
Writes all bytes to the serial port.
Top
Events
  NameDescription
Public eventDataReceived
If RunAsync() is called, this event is raised when new data is available in the input buffer of the serial port.
Top
See Also