-module(bt_task). -include("./nodes.hrl"). -optional_callbacks([ init/2, %% TODO: exactly one of run/3 and run/4 must be defined; how to ensure that? run/3, run/4 ]). -callback init(Args :: map(), BB :: blackboard()) -> NewState :: term(). %% get the list of params that are required by this node. used for type checking. -callback get_params() -> List :: list(). %% tasks and decorators should have their own state? yes. can make it optional in tasks though. -callback run(Args :: map(), State:: term(), BB :: blackboard(), Event :: term()) -> {status(), NewState :: term(), NewBB :: blackboard()}. -callback run(Args :: map(), BB :: blackboard(), Event :: term()) -> {status(), NewBB :: blackboard()}.