@@ -257,27 +257,32 @@ message DispatchFilter {
257257}
258258
259259// Parameter for controlling which components a dispatch applies to
260- // either a set of component IDs, or all components belonging to a category.
261- //
262- // When specifying a set of IDs, all IDs should have the same component
263- // category, mixing components from different categories in one dispatch
264- // message is not supported.
260+ // either a set of component IDs, or a set of component categories.
265261message ComponentSelector {
266262 oneof selector {
267263 // Set of component IDs
268264 ComponentIDs component_ids = 1 ;
269265
270- // Component category
271- frequenz.api.common.v1.microgrid.components.ComponentCategory component_category = 2 ;
266+ // Component categories
267+ ComponentCategories component_category = 2 ;
272268 }
273269}
274270
275271// Wrapper for controlling dispatches with a set of component IDs
272+ // Required as we can't use `repeated` directly in a `oneof`
276273message ComponentIDs {
277274 // Set of component IDs
278275 repeated uint64 component_ids = 1 ;
279276}
280277
278+ // Wrapper for controlling dispatches with a set of component categories
279+ // Required as we can't use `repeated` directly in a `oneof`
280+ message ComponentCategories {
281+ // Set of component categories
282+ repeated frequenz.api.common.v1.microgrid.components.ComponentCategory component_categories = 1 ;
283+ }
284+
285+
281286// Ruleset governing when and how a dispatch should re-occur.
282287//
283288// Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC
0 commit comments