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.SerialAssembly: 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
)
Public Function ReadStringUpToEndChars (
endCharsList As Collection(Of String),
<OutAttribute> ByRef partialResult As String,
timeout As Integer,
<OutAttribute> ByRef timedout As Boolean,
<OutAttribute> ByRef endCharsFound As String
) As String
public:
String^ ReadStringUpToEndChars(
Collection<String^>^ endCharsList,
[OutAttribute] String^% partialResult,
int timeout,
[OutAttribute] bool% timedout,
[OutAttribute] String^% endCharsFound
)
member ReadStringUpToEndChars :
endCharsList : Collection<string> *
partialResult : string byref *
timeout : int *
timedout : bool byref *
endCharsFound : string byref -> string
public String ReadStringUpToEndChars(
Collection<String> endCharsList,
/** @attribute OutAttribute */ /** @ref */String partialResult,
int timeout,
/** @attribute OutAttribute */ /** @ref */boolean timedout,
/** @attribute OutAttribute */ /** @ref */String endCharsFound
)
public function ReadStringUpToEndChars(
endCharsList : Collection<String>,
partialResult : String,
timeout : int,
timedout : boolean,
endCharsFound : String
) : String
function ReadStringUpToEndChars(endCharsList, partialResult, timeout, timedout, endCharsFound);
METHOD ReadStringUpToEndChars(
endCharsList AS Collection<STRING>,
partialResult OUT STRING,
timeout AS LONG,
timedout OUT LOGIC,
endCharsFound OUT STRING
) AS STRING
No code example is currently available or this language may not be supported.
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