Skip to content
Tim Watson edited this page Jul 12, 2012 · 1 revision

#Module systest_cli#

Behaviours: systest_proc.

##Function Index##

handle_interaction/3 handles interactions with the proc.
handle_kill/2 handles a kill instruction from the server.
handle_msg/3 handles generic messages from the server.
handle_status/2 handles a status request from the server.
handle_stop/2 handles a stop instruction from the server.
init/1
terminate/3 gives the handler a chance to clean up prior to being fully stopped.

##Function Details##

###handle_interaction/3##

handle_interaction(Data, Proc, Sh) -> any()

handles interactions with the proc. handle_interaction(Data, Proc, State) -> {reply, Reply, NewProc, NewState} | {reply, Reply, NewState} | {stop, Reason, NewProc, NewState} | {stop, Reason, NewState} | {NewProc, NewState} | NewState.

###handle_kill/2##

handle_kill(Proc, Sh) -> any()

handles a kill instruction from the server. handle_kill(Proc, State) -> {NewProc, NewState} | {stop, NewProc, NewState} | NewState.

###handle_msg/3##

handle_msg(Info, Proc, Sh) -> any()

handles generic messages from the server. handle_msg(Msg, Proc, State) -> {reply, Reply, NewProc, NewState} | {reply, Reply, NewState} | {stop, Reason, NewProc, NewState} | {stop, Reason, NewState} | {NewProc, NewState} | NewState.

###handle_status/2##

handle_status(Proc, Sh) -> any()

handles a status request from the server. handle_status(Proc, State) -> {reply, Reply, NewProc, NewState} | {reply, Reply, NewState} | {stop, NewProc, NewState}.

###handle_stop/2##

handle_stop(Proc, Sh) -> any()

handles a stop instruction from the server. handle_stop(Proc, State) -> {NewProc, NewProc} | {stop, NewProc, NewState} | {rpc_stop, {M,F,A}, NewState} | NewState.

###init/1##

init(Proc) -> any()

###terminate/3##

terminate(Reason, Proc, Sh) -> any()

gives the handler a chance to clean up prior to being fully stopped.

Clone this wiki locally