Back to product page

MultiWaitFor method


Waits and reads data until any of patterns is found.

Type

String

Syntax

  • C#
  • VB.NET
public String MultiWaitFor(String[] Pattern, ref Int32 MatchedId);
The MultiWaitFor(Pattern,MatchedId) syntax has these parts:
PatternCollection of tring patterns that should be received to notify as command success. (exact text or regular expression).
MatchedIdReference to variable that will hold index of matched pattern.
Return valueData received while MultiWaitFor was running.

public String MultiWaitFor(String[] Pattern, Int16 Timeout, ref Int32 MatchedId);
The MultiWaitFor(Pattern,Timeout,MatchedId) syntax has these parts:
PatternCollection of tring patterns that should be received to notify as command success. (exact text or regular expression).
TimeoutSeconds to wait for successful completion of the command.
MatchedIdReference to variable that will hold index of matched pattern.
Return valueData received while MultiWaitFor was running.

public Function MultiWaitFor(ByVal Pattern As String[], ByRef MatchedId As Int32) As String
The MultiWaitFor(Pattern,MatchedId) syntax has these parts:
PatternCollection of tring patterns that should be received to notify as command success. (exact text or regular expression).
MatchedIdReference to variable that will hold index of matched pattern.
Return valueData received while MultiWaitFor was running.

public Function MultiWaitFor(ByVal Pattern As String[], ByVal Timeout As Int16, ByRef MatchedId As Int32) As String
The MultiWaitFor(Pattern,Timeout,MatchedId) syntax has these parts:
PatternCollection of tring patterns that should be received to notify as command success. (exact text or regular expression).
TimeoutSeconds to wait for successful completion of the command.
MatchedIdReference to variable that will hold index of matched pattern.
Return valueData received while MultiWaitFor was running.

Remarks

This method is same as WaitFor method, but it allows more than one Pattern to be provided to match for. When Pattern is found, MatchedId variable will hold index of the matched pattern.

Platforms

Windows