Skip to content

Commit 0aff7bf

Browse files
Add enum ElectricalComponentControlMode
This enum is used to explicitly define whether an electrical component is intended to be active (enabled) or inactive (disabled). This intention directly determines the component's availability to downstream services and applications. Note that this enum differs from the `ElectricalComponentStatus` enum, which is used to report the actual operational state of the component. Signed-off-by: Tiyash Basu <[email protected]>
1 parent 8d13a45 commit 0aff7bf

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- Renamed `components` to `electrical_components` and related messages, fields, enums.
1414
- Added message linking microgrid and sensor IDs.
1515
- Added new message definitions for communication components.
16+
- Added a new enum `ElectricalComponentControlMode` to define control modes for electrical components.
1617

1718
## Bug Fixes
1819

proto/frequenz/api/common/v1/microgrid/electrical_components/electrical_components.proto

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,54 @@ enum ElectricalComponentStatus {
121121
ELECTRICAL_COMPONENT_STATUS_INACTIVE = 2;
122122
}
123123

124+
// `ElectricalComponentControlMode` explicitly defines whether an electrical
125+
// component is intended to be active (enabled) or inactive (disabled). This
126+
// intentional setting directly determines component availability to downstream
127+
// agents, applications, and services.
128+
//
129+
// !!! note "Control Mode & Component Availability"
130+
// The Control Mode explicitly represents the user's or automation's
131+
// intention to make the component either ACTIVE or INACTIVE. This directly
132+
// impacts availability:
133+
// - ACTIVE indicates the component is intended to be available and usable
134+
// by downstream agents and services.
135+
// - INACTIVE indicates the component is intended to be unavailable for use
136+
// by downstream agents and services.
137+
//
138+
// !!! note "Relationship with Operational State"
139+
// Control Mode explicitly represents intention, distinct from the
140+
// component's actual internal Operational State.
141+
// Operational State is independently reported by the component hardware
142+
// (e.g., READY, CHARGING, DISCHARGING, ERROR).
143+
//
144+
// !!! caution "Immediate Operational Impact"
145+
// Changing the Control Mode of an electrical component (e.g., via the
146+
// Microgrid API) takes immediate effect on its availability to downstream
147+
// agents and services. Setting a component to `INACTIVE` can thus instantly
148+
// interrupt ongoing operations or cause service disruptions. Setting a
149+
// component to `ACTIVE` may immediately connect it with other components,
150+
// potentially causing electrical damage. Therefore, ensure changes are
151+
// coordinated or planned appropriately to avoid unintended impact and/or
152+
// damages.
153+
//
154+
// !!! example "Control Mode Change Impact"
155+
// If a battery component's Control Mode is switched from `ACTIVE` to
156+
// `INACTIVE`, it immediately becomes unavailable to downstream
157+
// services and agents, potentially disrupting scheduled
158+
// charging/discharging cycles.
159+
enum ElectricalComponentControlMode {
160+
// The control mode is unspecified (should never be explicitly used).
161+
ELECTRICAL_COMPONENT_CONTROL_MODE_UNSPECIFIED = 0;
162+
163+
// The component is explicitly enabled and intended to be available for
164+
// downstream usage.
165+
ELECTRICAL_COMPONENT_CONTROL_MODE_ACTIVE = 1;
166+
167+
// The component is explicitly disabled and intended to be unavailable for
168+
// downstream usage.
169+
ELECTRICAL_COMPONENT_CONTROL_MODE_INACTIVE = 2;
170+
}
171+
124172
// Microgrid electrical component details.
125173
message ElectricalComponent {
126174
// The component ID.

0 commit comments

Comments
 (0)