SerialReceive Method

Receive at least one text character from the ASCOM serial port

Definition

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 7.1.3+4851.c5da65c2b
C#
public string Receive()

Return Value

String
The characters received

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.

Exceptions

TimeoutExceptionThrown when a receive timeout occurs.
SerialPortInUseExceptionThrown when unable to acquire the serial port
NotConnectedExceptionThrown when this command is used before setting Connect = True

See Also