# Components & Priorities

## Components/IDs explained
Each component has a unique id. Not all of them can be enabled/disabled -- some of them, such as effect and color, are used to determine the source type when examining the priority list.

|  ComponentID   |      Component       | Enable/Disable |                                    Comment                                    |
| :------------- | :------------------- | :------------: | :---------------------------------------------------------------------------- |
|      ALL       | Hyperion   |      Yes       | Enable or disable all components. Recovers/saves last state of all other components |
|   SMOOTHING    |      Smoothing       |      Yes       |                              Smoothing component                              |
|  BLACKBORDER   | Blackborder detector |      Yes       |                         Black bar detection component                         |
|   FORWARDER    | JSON & Flat-/Protcol buffers forwarder |      Yes       |                        JSON/Proto forwarder component                         |
| BOBLIGHTSERVER |   Boblight server    |      Yes       |                           Boblight server component                           |
|    GRABBER     |   Platform capture   |      Yes       |                          Platform Capture component                           |
|      V4L       |  USB capture device  |      Yes       |                         USB capture device component                          |
|   LEDDEVICE    |      Led device      |      Yes       |     Led device component start/stops output of the configured led device      |
|     COLOR      |     Solid color      |       No       |            All colors that has been set belongs to this component             |
|     EFFECT     |        Effect        |       No       |                     All effects belongs to this component                     |
|     IMAGE      |     Solid Image      |       No       |          All single/solid images belongs to this. NOT for streaming           |
| FLATBUFSERVER  |  Flatbuffers Server  |       No       |                All image stream sources from flatbuffer server                |
|  PROTOSERVER   |  Protobuffer Server  |       No       |               All image stream sources from Protobuffer server                |

## Priority Guidelines
Please adhere to the following priority guidelines to avoid user confusion and ensure
the best user experience possible:

The user expects that an effect or color should be higher in priority (lower in value)
than capturing, as colors/effects are usually run intermittently.

|          Type           | Priority/Range | Recommended |                  Comment                   |
| :---------------------  | :------------: | :---------: | :----------------------------------------  |
|    Boot Effect/Color    |       0        |      -      |                  Blocked                   |
|    Web Configuration    |       1        |      -      |                                            |
|**Remote/API Control**   |    **2-99**    |   **50**    |       Set effect/color/single image        |
|   **Image Streaming**   |  **100-199**   |   **150**   | For image streams (Flatbuffer/Protobuffer) |
|        Boblight         |      201       |      -      |                                            |
|       USB Capture       |      240       |      -      |                                            |
|    Platform Capture     |      250       |      -      |                                            |
| Background Effect/Color |      254       |      -      |                                            |
|        Reserved         |      255       |      -      |                                            |
