SerialReceiveTerminatedBinary Method

Receive characters from the ASCOM serial port until the given terminator bytes are seen, return as a byte array

Definition

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 7.1.3+4851.c5da65c2b
C#
public byte[] ReceiveTerminatedBinary(
	byte[] TerminatorBytes
)

Parameters

TerminatorBytes  Byte
Array of bytes that indicates end of message

Return Value

Byte
Byte array of received characters

Remarks

If a timeout occurs, a TimeoutException is raised.

This function exists in the COM component but is not documented in the help file.

Exceptions

SerialPortInUseExceptionThrown when unable to acquire the serial port
NotConnectedExceptionThrown when this command is used before setting Connect = True

See Also