The Serial type exposes the following members.

Constructors

  NameDescription
Public methodSerial
Initializes a new instance of the Serial class

Methods

  NameDescription
Public methodClearBuffers
Clears the ASCOM serial port receive and transmit buffers
Public methodDispose
Disposes of resources used by the profile object
Public methodLogMessage
Adds a message to the ASCOM serial trace file
Public methodReceive
Receive at least one text character from the ASCOM serial port
Public methodReceiveByte
Receive one binary byte from the ASCOM serial port
Public methodReceiveCounted
Receive exactly the given number of characters from the ASCOM serial port and return as a string
Public methodReceiveCountedBinary
Receive exactly the given number of characters from the ASCOM serial port and return as a byte array
Public methodReceiveTerminated
Receive characters from the ASCOM serial port until the given terminator string is seen
Public methodReceiveTerminatedBinary
Receive characters from the ASCOM serial port until the given terminator bytes are seen, return as a byte array
Public methodTransmit
Transmits a string through the ASCOM serial port
Public methodTransmitBinary
Transmit an array of binary bytes through the ASCOM serial port

Properties

  NameDescription
Public propertyAvailableCOMPorts
Returns a list of all available ASCOM serial ports with COMnnn ports sorted into ascending port number order
Public propertyConnected
Gets or sets the connected state of the ASCOM serial port.
Public propertyDataBits
Gets or sets the number of data bits in each byte
Public propertyDTREnable
Gets or sets the state of the DTR line
Public propertyHandshake
Gets or sets the type of serial handshake used on the serial link
Public propertyParity
Gets or sets the type of parity check used over the serial link
Public propertyPort
Gets or sets the number of the ASCOM serial port (Default is 1, giving COM1 as the serial port name).
Public propertyPortName
Sets the ASCOM serial port name as a string
Public propertyReceiveTimeout
The maximum time that the ASCOM serial port will wait for incoming receive data (seconds, default = 5)
Public propertyReceiveTimeoutMs
The maximum time that the ASCOM serial port will wait for incoming receive data (milliseconds, default = 5000)
Public propertyRTSEnable
Gets or sets use of the RTS handshake control line
Public propertySpeed
Gets and sets the baud rate of the ASCOM serial port
Public propertyStopBits
Gets or sets the number of stop bits used on the serial link

See Also