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.


Constructor Summary
Expect()
           
 
Method Summary
static boolean string(Uart input, String string, int timeout)
          Expect a string to be received.
 
Methods inherited from class java.lang.Object
equals
 

Constructor Detail

Expect

public Expect()
Method Detail

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.