@@ -312,12 +312,19 @@ message DispatchFilter {
312312}
313313
314314// Parameter for controlling which components a dispatch applies to
315- // either a set of component IDs, or a set of component categories.
315+ // either a set of component IDs, a set of component categories, or a set of
316+ // battery, EV charger or Inverter types.
316317// Examples:
317318// - To dispatch to a set of component IDs:
318319// components { component_ids { ids: [1, 2, 3] } }
319320// - To dispatch to a set of component categories:
320321// components { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
322+ // - To dispatch to a set of battery types:
323+ // components { batteries { types: [BATTERY_TYPE_LI_ION, BATTERY_TYPE_NA_ION] } }
324+ // - To dispatch to a set of EV charger types:
325+ // components { ev_chargers { types: [EV_CHARGER_TYPE_AC, EV_CHARGER_TYPE_DC] } }
326+ // - To dispatch to a set of inverter types:
327+ // components { inverters { types: [INVERTER_TYPE_SOLAR, INVERTER_TYPE_HYBRID] } }
321328message TargetComponents {
322329 // Wrapper for controlling dispatches with a set of component IDs
323330 // Required as we can't use `repeated` directly in a `oneof`
@@ -326,19 +333,49 @@ message TargetComponents {
326333 repeated uint64 ids = 1 ;
327334 }
328335
329- // Wrapper for controlling dispatches with a set of component categories
336+ // Wrapper for controlling dispatches with a set of component categories and optional types
330337 // Required as we can't use `repeated` directly in a `oneof`
331338 message CategorySet {
332339 // Set of component categories
333340 repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1 ;
334341 }
335342
343+ // Wrapper for controlling dispatches with a set of battery types
344+ // Required as we can't use `repeated` directly in a `oneof`
345+ message BatteryTypeSet {
346+ // Set of component categories
347+ repeated frequenz.api.common.v1.microgrid.components.BatteryType types = 1 ;
348+ }
349+
350+ // Wrapper for controlling dispatches with a set of EV charger types
351+ // Required as we can't use `repeated` directly in a `oneof`
352+ message EvChargerTypeSet {
353+ // Set of component categories
354+ repeated frequenz.api.common.v1.microgrid.components.EvChargerType types = 1 ;
355+ }
356+
357+ // Wrapper for controlling dispatches with a set of inverter types
358+ // Required as we can't use `repeated` directly in a `oneof`
359+ message InverterTypeSet {
360+ // Set of component categories
361+ repeated frequenz.api.common.v1.microgrid.components.InverterType types = 1 ;
362+ }
363+
336364 oneof components {
337365 // Set of component IDs
338366 IdSet component_ids = 1 ;
339367
340368 // Component categories
341- CategorySet component_categories = 2 ;
369+ CategoryTypeSet component_categories = 2 ;
370+
371+ // Battery types
372+ BatteryTypeSet batteries = 3 ;
373+
374+ // EV Charger types
375+ EvChargerTypeSet ev_chargers = 5 ;
376+
377+ // Inverter types
378+ InverterTypeSet inverters = 4 ;
342379 }
343380}
344381
0 commit comments