Current section
Files
Jump to
Current section
Files
src/bt_engine/bt_node_behaviours/nodes.hrl
%% record definitions for nodes
-record(decorator, {
name :: string(),
module :: atom(),
args :: map(),
state :: term(),
child :: term(),
metadata :: metadata()
}).
-record(sequence, {
name :: string(),
namespace :: namespace(),
children :: list(term()),
metadata :: metadata()
}).
%% TODO: add selector
-record(selector, {
name :: string(),
namespace :: namespace(),
children :: list(term()),
metadata :: metadata()
}).
-record(task, {
name :: string(),
module :: atom(),
args :: map(),
state :: term(),
metadata :: metadata()
}).
-record (metadata, {
status=not_run :: status() | not_run,
%% these are all optional right now, not filling them since not using them.
prev_state :: term(),
prev_bb :: blackboard(),
next_bb :: blackboard()
}).
-type namespace() :: list(string()).
-type decorator() :: #decorator{}.
-type sequence() :: #sequence{}.
-type selector() :: #selector{}.
-type task() :: #task{}.
-type blackboard() :: map().
-type event() :: term().
-type status() :: success | failure | running.
-type metadata() :: #metadata{}.
-type bt_node() :: decorator() | sequence() | selector() | task().