stamp.util
Class Expect
java.lang.Object
|
+--stamp.util.Expect
- public class Expect
- extends Object
Class to wait for an input from a UART with a timeout.
|
Method Summary |
static boolean |
string(Uart input,
String string,
int timeout)
Expect a string to be received. |
Expect
public Expect()
string
public static boolean string(Uart input,
String string,
int timeout)
- Expect a string to be received.
Received data from the Uart until the
string is seen or
the timeout occurs.
- Parameters:
input - Uart to receive data from.string - String to wait for.timeout - number of seconds to wait for the string to be received.- Returns:
- trye if the string is seen, false if the timeout occurs.