Skip to content

Commit 86d87c4

Browse files
committed
Add a way to target specific battery, inverter and EV charger types
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 20fdd4a commit 86d87c4

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## New Features
1212

13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
13+
- Now specific types of batteries, inverters and EV chargers can be targeted.
1414

1515
## Bug Fixes
1616

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import "google/protobuf/struct.proto";
1818
import "google/protobuf/timestamp.proto";
1919

2020
import "frequenz/api/common/v1/microgrid/components/components.proto";
21+
import "frequenz/api/common/v1/microgrid/components/battery.proto";
22+
import "frequenz/api/common/v1/microgrid/components/ev_charger.proto";
23+
import "frequenz/api/common/v1/microgrid/components/inverter.proto";
2124
import "frequenz/api/common/v1/pagination/pagination_info.proto";
2225
import "frequenz/api/common/v1/pagination/pagination_params.proto";
2326

@@ -312,12 +315,19 @@ message DispatchFilter {
312315
}
313316

314317
// Parameter for controlling which components a dispatch applies to
315-
// either a set of component IDs, or a set of component categories.
318+
// either a set of component IDs, a set of component categories, or a set of
319+
// battery, EV charger or Inverter types.
316320
// Examples:
317321
// - To dispatch to a set of component IDs:
318322
// components { component_ids { ids: [1, 2, 3] } }
319323
// - To dispatch to a set of component categories:
320324
// components { component_categories { categories: [COMPONENT_CATEGORY_BATTERY, COMPONENT_CRYPTO_MINER] } }
325+
// - To dispatch to a set of battery types:
326+
// components { batteries { types: [BATTERY_TYPE_LI_ION, BATTERY_TYPE_NA_ION] } }
327+
// - To dispatch to a set of EV charger types:
328+
// components { ev_chargers { types: [EV_CHARGER_TYPE_AC, EV_CHARGER_TYPE_DC] } }
329+
// - To dispatch to a set of inverter types:
330+
// components { inverters { types: [INVERTER_TYPE_SOLAR, INVERTER_TYPE_HYBRID] } }
321331
message TargetComponents {
322332
// Wrapper for controlling dispatches with a set of component IDs
323333
// Required as we can't use `repeated` directly in a `oneof`
@@ -326,19 +336,49 @@ message TargetComponents {
326336
repeated uint64 ids = 1;
327337
}
328338

329-
// Wrapper for controlling dispatches with a set of component categories
339+
// Wrapper for controlling dispatches with a set of component categories and optional types
330340
// Required as we can't use `repeated` directly in a `oneof`
331341
message CategorySet {
332342
// Set of component categories
333343
repeated frequenz.api.common.v1.microgrid.components.ComponentCategory categories = 1;
334344
}
335345

346+
// Wrapper for controlling dispatches with a set of battery types
347+
// Required as we can't use `repeated` directly in a `oneof`
348+
message BatteryTypeSet {
349+
// Set of component categories
350+
repeated frequenz.api.common.v1.microgrid.components.BatteryType types = 1;
351+
}
352+
353+
// Wrapper for controlling dispatches with a set of EV charger types
354+
// Required as we can't use `repeated` directly in a `oneof`
355+
message EvChargerTypeSet {
356+
// Set of component categories
357+
repeated frequenz.api.common.v1.microgrid.components.EvChargerType types = 1;
358+
}
359+
360+
// Wrapper for controlling dispatches with a set of inverter types
361+
// Required as we can't use `repeated` directly in a `oneof`
362+
message InverterTypeSet {
363+
// Set of component categories
364+
repeated frequenz.api.common.v1.microgrid.components.InverterType types = 1;
365+
}
366+
336367
oneof components {
337368
// Set of component IDs
338369
IdSet component_ids = 1;
339370

340371
// Component categories
341372
CategorySet component_categories = 2;
373+
374+
// Battery types
375+
BatteryTypeSet batteries = 3;
376+
377+
// EV Charger types
378+
EvChargerTypeSet ev_chargers = 5;
379+
380+
// Inverter types
381+
InverterTypeSet inverters = 4;
342382
}
343383
}
344384

0 commit comments

Comments
 (0)