<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi ... ALL,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Behavior: Gen FSM</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Scenario:</FONT></DIV>
<DIV><FONT face=Arial size=2>Want to be in state "open" (see below) for limited 
time (assume 5 sec) until some EXPECTED event (as_E) comes, 
</FONT><FONT face=Arial size=2>have to move to some other state if the 
expected event not received in that time. </FONT><FONT face=Arial 
size=2>All other events should be ignored in state "open".</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Problem: Below works fine if no events other than 
expected comes. But what happend if SOME un-expected events received before 
timeout? It always keep updating the timeout value to 5000. Removing the timeout 
value from {next_state, open, State,5000} for "OtherEvents" will cause to 
stuck in the "open" forever if the expected event not received.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Question: How the time out value should be use in 
this case ? Are there any way to set the timeout value ONCE for <FONT 
face=Arial size=2>all "OtherEvents".</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial 
size=2>-------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>Asume this as beginning point </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>   as(blah,blah), %%Calling Async 
Func</FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>{next_state, open, 
State,5000}; </FONT></DIV>
<DIV>
<DIV></FONT><FONT face=Arial 
size=2>-------------------------------------------</FONT></DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>open(timeout, State) -></FONT></DIV>
<DIV><FONT face=Arial size=2>    
do_something,<BR>    {next_state, Any_Appropriat, 
State}.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>open(as_E, State) -></FONT></DIV>
<DIV><FONT face=Arial size=2>    do_something,</FONT></DIV>
<DIV><FONT face=Arial size=2>    {next_state, Any_Appropriat, 
State}.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>open(OtherEvents, State) -></FONT></DIV>
<DIV><FONT face=Arial size=2>     {next_state, open, 
State,5000}.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sanjaya Vitharana</FONT></DIV></BODY></HTML>