[erlang-questions] gen-fsm problem

Bob Cowdery <>
Wed Mar 21 22:05:32 CET 2007


Serge

Thanks, after playing with the pattern to see what it was actually getting I spotted my deliberate mistake of wrapping the State in []. Too long playing with Jython which is at the other end of this link!

Bob


There's no matching function clause found when evaluating 
sm_sdr1000:idle({"INIT_ENVIRONMENT",
   {{0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0},
    {0,0}}},
  State).

You might've forgotten to include an idle function accepting this 
parameter: {"INIT_ENVIRONMENT", _}.

Serge

Bob Cowdery wrote:
> Hi all,
> 
> Could some kind person tell me how to figure out what's wrong here. It's my first gen-fsm module. Just stand-alone not part of a supervisor tree. As far as I can tell the state machine is initialised and it's in the right initial state and the event and state data matches the function-clause. The idle function is not entered.
> 
> Thanks
> Bob
> 
> 
> =ERROR REPORT==== 21-Mar-2007::19:23:33 ===
> ** State machine 'erlink-sm' terminating
> ** Last event in was {"INIT_ENVIRONMENT",
>                       {{0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0},
>                        {0,0}}}
> ** When State == idle
> **      Data  == [{<4683.45.0>,ui,st,dsp,hw,"D:\\srs\\state"}]
> ** Reason for termination =
> ** {function_clause,[{sm_sdr1000,idle,
>                                  [{"INIT_ENVIRONMENT",
>                                    {{0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0},
>                                     {0,0}}},
>                                   [{<4683.45.0>,ui,st,dsp,hw,"D:\\srs\\state"}]]
> },
>                      {gen_fsm,handle_msg,7},
>                      {proc_lib,init_p,5}]}
> 
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 

-- 
Serge Aleynikov
Routing R&D, IDT Telecom
Tel: +1 (973) 438-3436
Fax: +1 (973) 438-1464
_______________________________________________
erlang-questions mailing list

http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list