You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add option to emit response event on each callback & RunScriptCallback command for "once-off" callbacks (#403)
# Summary
Largely, this is a refactor of the `commands` module, we now use a
shared command `RunScriptCallback` to initiate internal callbacks. This
command can also be used by consumers of BMS removing the need to have a
full blown system to initiate one off callbacks.
At the same time, this adds a `trigger_response` field to the script
callback event, when this is set to true:
- Event handlers will emit a `ScriptCallbackResponseEvent` with the
response payload from the script
- Just as the `RunScriptCallback` command will do the same
This should give users more flexibility in running "once-off" callbacks,
especially if they require scripts to output something from them. At the
moment the best bet is to either:
- have an event handler in a temporary schedule
- run custom logic with event handler state
0 commit comments