Skip to content
Andrew Gresyk edited this page May 10, 2019 · 18 revisions

hfsm.dev API Cheat Sheet

Globals

Machine and MachineT<>

Using default settings:

using M = hfsm2::Machine;

Customizable version:

using M = hfsm2::MachineT<
              TContext,                // data shared between states and external code
              Config<>,                // optional: config, see below
              TPayload                 // optional: transition payload
          >;

Config<>

hfsm2::Config<
    TUtility,                          // optional: customizable Expected Utility Value type (default: float)
    NMaxPlanTasks,                     // optional: max number of plans' entries across the entire FSM (default: 2x number of sub-states in all regions)
    NMaxSubstitutions = 4              // optional: max number of guard substitutions
>

Regions

Type Root Headless Root Region Headless Region
Composite M::Root<THead,
TSubStates>
M::PeerRoot<
TSubStates>
M::Composite<THead,
TSubStates>
M::CompositePeers<
TSubStates>