Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document mode_list BCP command #546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/code/BCP_Protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The following BCP commands have been defined (and implemented) in MPF:
* [machine_variable](machine_variable.md)
* [mode_start](mode_start.md)
* [mode_stop](mode_stop.md)
* [mode_list](mode_list.md)
* [monitor_start](monitor_start.md)
* [monitor_stop](monitor_stop.md)
* [player_added](player_added.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/code/BCP_Protocol/mode_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# mode_list (BCP command)
This message informs the media controller about which modes are currently running. It is sent whenever a mode starts or stops, but only to clients currently [monitoring](monitor_start.md) the `mode` category.

## Origin
Pin controller


## Parameters
### running_modes
Type: JSON Array

Example (Formatted for legibility; the parameter does not contain line-breaks):
```
{
"running_modes": [
[
"base",
100
],
[
"game",
20
]
]
}
```

Each element of the array is another JSON Array with the following elements:

1. The name of the mode (`string`)
2. The priority of the mode (`int`)