Click or drag to resize

SerialPortReadStringUpToEndChars(CollectionString, String, Int32, Boolean, String) Method

Reads the serial port up to the first occurrence of one of the endChars sequences of the endCharsList collection. It works only if AutoReceive property is false.

Namespace: ZylSoft.Serial
Assembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax
public string ReadStringUpToEndChars(
	Collection<string> endCharsList,
	out string partialResult,
	int timeout,
	out bool timedout,
	out string endCharsFound
)

Parameters

endCharsList  CollectionString
Collection of terminator characters sequence.
partialResult  String
partialResult is empty string, if endChars sequence was found, otherwise contains the discarded data.
timeout  Int32
If the timeout (milliseconds) interval elapses and no endChars are found, the method will return with empty string (anti-blocking protection).
timedout  Boolean
Indicates if the read process was timed out.
endCharsFound  String
The terminator characters sequence, which was reached.

Return Value

String
Returns the contents of the input buffer up to the first occurrence of a endChars sequence, but endChars are not included in the result.
See Also