gen-fsm

How to visualize an Erlang gen_fsm

Do you know of any existing tool to graphically render the diagram of an Erlang gen_fsm starting from the source code? ...

Allowing a gen_fsm to timeout if it receives no messages

Normally if I'd like to have an Erlang process timeout I would use the following construct: receive Msg -> ok; %% handle message after 60000 -> %% Handle timeout and exit end. Is there a similar mechanism in the OTP servers such as gen_fsm? I will be spawning gen_fsm's for each active session with my application, and would li...

Erlang: Implementing a Finite State Machine using gen_fsm

I'm looking for an example of a simple FSM implemented in Erlang using the gen_fsm from OTP. ...

Can I handle any received message in gen_fsm state callbacks?

I noticed that messages sent to the pid of a gen_fsm process are matched in the state callbacks as events. Is this just accidental or can I rely on this feature? Normally I would expect general messages sent to a gen_fsm to show up in the handle_info/3 callback and thought I would have to re-send it using gen_fsm:send_event. Does gen_...