Module otpbp_gen_statem

Data Types

action()

action() = postpone | {postpone, Postpone::postpone()} | {next_event, EventType::event_type(), EventContent::term()} | enter_action()

callback_mode()

callback_mode() = state_functions | handle_event_function

callback_mode_result()

callback_mode_result() = callback_mode() | [callback_mode() | state_enter()]

data()

data() = term()

debug_opt()

debug_opt() = {debug, Dbgs::[trace | log | statistics | debug | {logfile, string()}]}

enter_action()

enter_action() = hibernate | {hibernate, Hibernate::hibernate()} | (Timeout::event_timeout()) | {timeout, Time::event_timeout(), EventContent::term()} | {timeout, Time::event_timeout(), EventContent::term(), Options::timeout_option() | [timeout_option()]} | {{timeout, Name::term()}, Time::generic_timeout(), EventContent::term()} | {{timeout, Name::term()}, Time::generic_timeout(), EventContent::term(), Options::timeout_option() | [timeout_option()]} | {state_timeout, Time::state_timeout(), EventContent::term()} | {state_timeout, Time::state_timeout(), EventContent::term(), Options::timeout_option() | [timeout_option()]} | reply_action()

event_handler_result()

event_handler_result(StateType) = {next_state, NextState::StateType, NewData::data()} | {next_state, NextState::StateType, NewData::data(), Actions::[action()] | action()} | state_callback_result(action())

event_timeout()

event_timeout() = timeout() | integer()

event_type()

event_type() = {call, From::from()} | cast | info | timeout | {timeout, Name::term()} | state_timeout | internal

from()

from() = {To::pid(), Tag::term()}

Reply-to specifier for call

generic_timeout()

generic_timeout() = timeout() | integer()

handle_event_result()

handle_event_result() = event_handler_result(state())

hibernate()

hibernate() = boolean()

init_result()

init_result(StateType) = {ok, State::StateType, Data::data()} | {ok, State::StateType, Data::data(), Actions::[action()] | action()} | ignore | {stop, Reason::term()}

postpone()

postpone() = boolean()

reply_action()

reply_action() = {reply, From::from(), Reply::term()}

server_name()

server_name() = {global, GlobalName::term()} | {via, RegMod::module(), Name::term()} | {local, atom()}

server_ref()

server_ref() = pid() | (LocalName::atom()) | {Name::atom(), Node::atom()} | {global, GlobalName::term()} | {via, RegMod::module(), ViaName::term()}

start_opt()

start_opt() = debug_opt() | {timeout, Time::timeout()} | {spawn_opt, [proc_lib:spawn_option()]}

start_ret()

start_ret() = {ok, pid()} | ignore | {error, term()}

state()

state() = state_name() | term()

For handle_event/4 callback function

state_callback_result()

state_callback_result(ActionType) = {keep_state, NewData::data()} | {keep_state, NewData::data(), Actions::[ActionType] | ActionType} | keep_state_and_data | {keep_state_and_data, Actions::[ActionType] | ActionType} | {repeat_state, NewData::data()} | {repeat_state, NewData::data(), Actions::[ActionType] | ActionType} | repeat_state_and_data | {repeat_state_and_data, Actions::[ActionType] | ActionType} | stop | {stop, Reason::term()} | {stop, Reason::term(), NewData::data()} | {stop_and_reply, Reason::term(), Replies::[reply_action()] | reply_action()} | {stop_and_reply, Reason::term(), Replies::[reply_action()] | reply_action(), NewData::data()}

state_enter()

state_enter() = state_enter

state_enter_result()

state_enter_result(State) = {next_state, State, NewData::data()} | {next_state, State, NewData::data(), Actions::[enter_action()] | enter_action()} | state_callback_result(enter_action())

state_function_result()

state_function_result() = event_handler_result(state_name())

state_name()

state_name() = atom()

state_timeout()

state_timeout() = timeout() | integer()

timeout_option()

timeout_option() = {abs, Abs::boolean()}

transition_option()

transition_option() = postpone() | hibernate() | event_timeout() | generic_timeout() | state_timeout()

Function Index

call/2
call/3
cast/2
enter_loop/4
enter_loop/5
enter_loop/6
format_status/2
init_it/6
reply/1
reply/2
start/3
start/4
start_link/3
start_link/4
stop/1
stop/3
system_code_change/4
system_continue/3
system_get_state/1
system_replace_state/2
system_terminate/4
wakeup_from_hibernate/3

Function Details

call/2

call(ServerRef::server_ref(), Request::term()) -> Reply::term()

call/3

call(ServerRef::server_ref(), Request::term(), Timeout::timeout() | {clean_timeout, T::timeout()} | {dirty_timeout, T::timeout()}) -> Reply::term()

cast/2

cast(ServerRef::server_ref(), Msg::term()) -> ok

enter_loop/4

enter_loop(Module::module(), Opts::[debug_opt()], State::state(), Data::data()) -> no_return()

enter_loop/5

enter_loop(Module::module(), Opts::[debug_opt()], State::state(), Data::data(), Server_or_Actions::server_name() | pid() | [action()]) -> no_return()

enter_loop/6

enter_loop(Module::module(), Opts::[debug_opt()], State::state(), Data::data(), Server::server_name() | pid(), Actions::[action()] | action()) -> no_return()

format_status/2

format_status(Opt, X2) -> any()

init_it/6

init_it(Starter, Parent, ServerRef, Module, Args, Opts) -> any()

reply/1

reply(Replies::[reply_action()] | reply_action()) -> ok

reply/2

reply(From::from(), Reply::term()) -> ok

start/3

start(Module::module(), Args::term(), Opts::[start_opt()]) -> start_ret()

start/4

start(ServerName::server_name(), Module::module(), Args::term(), Opts::[start_opt()]) -> start_ret()

start_link/3

start_link(Module::module(), Args::term(), Opts::[start_opt()]) -> start_ret()

start_link/4

start_link(ServerName::server_name(), Module::module(), Args::term(), Opts::[start_opt()]) -> start_ret()

stop/1

stop(ServerRef::server_ref()) -> ok

stop/3

stop(ServerRef::server_ref(), Reason::term(), Timeout::timeout()) -> ok

system_code_change/4

system_code_change(S, Mod, OldVsn, Extra) -> any()

system_continue/3

system_continue(Parent, Debug, S) -> any()

system_get_state/1

system_get_state(X1) -> any()

system_replace_state/2

system_replace_state(StateFun, S) -> any()

system_terminate/4

system_terminate(Reason, Parent, Debug, S) -> any()

wakeup_from_hibernate/3

wakeup_from_hibernate(Parent, Debug, S) -> any()


Generated by EDoc