Skip to content

Commit 87c6734

Browse files
authored
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
1 parent ecb49c4 commit 87c6734

File tree

4 files changed

+472
-200
lines changed

4 files changed

+472
-200
lines changed

0 commit comments

Comments
 (0)