Click or drag to resize

SerialReceive Method

Receive at least one text character from the ASCOM serial port

Namespace:  ASCOM.Utilities
Assembly:  ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.4.0.2624)
Syntax
public string Receive()

Return Value

Type: String
The characters received
Exceptions
ExceptionCondition
TimeoutExceptionThrown when a receive timeout occurs.
SerialPortInUseExceptionThrown when unable to acquire the serial port
NotConnectedExceptionThrown when this command is used before setting Connect = True
Remarks
This method reads all of the characters currently in the serial receive buffer. It will not return unless it reads at least one character. A timeout will cause a TimeoutException to be raised. Use this for text data, as it returns a String.
See Also