by Jake Prem
def callback_mode do
:handle_event_function
# or
[:handle_event_function, :state_enter]
end
{:next_state, NextState, NewData, Actions[]}
{:next_state, NextState, NewData}
{:keep_state, NewData, Actions[]}
{:keep_state, NewData}
{:keep_state_and_data, Actions[]}
:keep_state_and_data
{:repeat_state, NewData, Actions[]}
{:repeat_state, NewData}
{:repeat_state_and_data, Actions[]}
...
{:stop, Reason, NewData}
{:stop, Reason}
{:stop_and_reply, Reason, NewData, ReplyActions[]}
{:stop_and_reply, Reason, ReplyActions[]}
{:postpone, Boolean}
{:hibernate, Boolean}
# Cancelled on state_change, or {:state_timeout, :infinity}
{:state_timeout, Time}
{{:timeout, Name}, Time}
{:timeout, Time}
# --------------------------------
{:reply, From, Reply}
{:next_event, EventType, EventContent}