anchor.diff:  	]).
   
   -define(STEP_SIZE, 100).
  +-define(TIMEOUT, 60000).
   
   start_node() ->
       [] = os:cmd("epmd -daemon"),
  
positive.code: %% Commands
  
  receive_answer(Handler) ->
      receive_answer(Handler, 30000).
  
  receive_answer(_, T) when T=<0 -> 
      R = exit(),
  
negative.code:     end.
  
  wait_for_result(Handler, Mote) ->
      wait_for_result(Handler, Mote, handler_timeout(Handler)).
  
  wait_for_result(_,_,T) when T=<0 -> throw(timeout);
  wait_for_result(Handler, Mote, T) ->
      StepSize = handler_step_size(Handler),
      case state() of
  	{running, _} ->
  	    case mote_read(Handler, Mote) of
  		"" ->
  		    ok = simulation_step(Handler, StepSize),
  		    wait_for_result(Handler, Mote, T-StepSize);
  		S ->
  		    case re:run(S, "DEBUG[^\n]*\n") of
  			{match, [{_,_}]} ->
  			    ok = simulation_step(Handler, StepSize),
  			    %% io:format("<<~p>>~n", [S]),
  			    wait_for_result(Handler, Mote, T-StepSize);
  			_ ->
  			    S
  		    end
  