-
-
Notifications
You must be signed in to change notification settings - Fork 62
Advanced Transition Payloads
Andrew Gresyk edited this page Apr 2, 2022
·
2 revisions
-
Transitions can have payloads.
-
Only one payload type can be set for the entire FSM instance.
-
Payload versions of transition methods accept either const or rvalue references.
-
Set payload type:
using Config = hfsm2::Config ::PayloadT<T>; using M = hfsm2::MachineT<Config>;
Method | Description |
---|---|
void Plan::changeWith(const StateID, const Payload&); void Plan::changeWith<TOrigin>(const Payload&);
|
Default transition with const payload
|
void Plan::changeWith(const StateID, Payload&&); void Plan::changeWith<TOrigin>(Payload&&);
|
Default transition with moved payload |