@@ -115,7 +115,8 @@ message StreamMicrogridDispatchesResponse {
115115 Event event = 2 ;
116116}
117117
118- // Represents a dispatches data, including its type, start time, duration, component selector,
118+ // Represents a dispatches data, including its type, start time, duration,
119+ // and target components.
119120//
120121// Timezone Note: Timestamps are in UTC. It is the responsibility of each microgrid to translate UTC
121122// to its local timezone.
@@ -139,8 +140,8 @@ message DispatchData {
139140 // immediately starts and ends, e.g. switching a component on and off.
140141 optional uint32 duration = 3 ;
141142
142- // Dispatch microgrid component selector
143- ComponentSelector selector = 4 ;
143+ // The components this dispatch should apply to.
144+ TargetComponents target = 4 ;
144145
145146 // The "active" status
146147 // An active dispatch is eligible for processing, either immediately or at a scheduled
@@ -252,7 +253,7 @@ message DispatchFilter {
252253 }
253254
254255 // Optional filter by component ID or category.
255- repeated ComponentSelector selectors = 1 ;
256+ repeated TargetComponents targets = 1 ;
256257
257258 // Optional filter by active status.
258259 // If this field is not set, dispatches of any active status will be included.
@@ -314,10 +315,10 @@ message DispatchFilter {
314315// either a set of component IDs, or a set of component categories.
315316// Examples:
316317// - To dispatch to a set of component IDs:
317- // selector { component_ids { ids: [1, 2, 3] } }
318+ // components { component_ids { ids: [1, 2, 3] } }
318319// - To dispatch to a set of component categories:
319- // selector { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
320- message ComponentSelector {
320+ // components { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
321+ message TargetComponents {
321322 // Wrapper for controlling dispatches with a set of component IDs
322323 // Required as we can't use `repeated` directly in a `oneof`
323324 message IdSet {
@@ -332,7 +333,7 @@ message ComponentSelector {
332333 repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1 ;
333334 }
334335
335- oneof selector {
336+ oneof components {
336337 // Set of component IDs
337338 IdSet component_ids = 1 ;
338339
@@ -605,8 +606,8 @@ message UpdateMicrogridDispatchRequest {
605606 // Duration in seconds
606607 optional uint32 duration = 2 ;
607608
608- // The component selector
609- ComponentSelector selector = 3 ;
609+ // The target components
610+ TargetComponents target = 3 ;
610611
611612 // The "active" status
612613 optional bool is_active = 4 ;
0 commit comments