Receive exactly the given number of characters from the ASCOM serial port and return as a string

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.1.1.2619)

Syntax

C#
public string ReceiveCounted(
	int Count
)
Visual Basic
Public Function ReceiveCounted ( _
	Count As Integer _
) As String
Visual C++
public:
virtual String^ ReceiveCounted(
	int Count
) sealed

Parameters

Count
Type: System..::..Int32
The number of characters to return

Return Value

String of length "Count" characters

Implements

ISerial..::..ReceiveCounted(Int32)

Remarks

If a timeout occurs a TimeoutException is raised.

Exceptions

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

See Also