From 61a08e70461fd094996b808f1a0d47be34c60c4f Mon Sep 17 00:00:00 2001 From: arthurkehrwald <50906979+arthurkehrwald@users.noreply.github.com> Date: Sun, 27 Oct 2024 19:22:08 +0100 Subject: [PATCH] Document mode_list BCP command --- docs/code/BCP_Protocol/index.md | 1 + docs/code/BCP_Protocol/mode_list.md | 32 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 docs/code/BCP_Protocol/mode_list.md diff --git a/docs/code/BCP_Protocol/index.md b/docs/code/BCP_Protocol/index.md index 6cc4c0787c..b81409e002 100644 --- a/docs/code/BCP_Protocol/index.md +++ b/docs/code/BCP_Protocol/index.md @@ -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) diff --git a/docs/code/BCP_Protocol/mode_list.md b/docs/code/BCP_Protocol/mode_list.md new file mode 100644 index 0000000000..08431ece5d --- /dev/null +++ b/docs/code/BCP_Protocol/mode_list.md @@ -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`) \ No newline at end of file