Skip to content

Commit

Permalink
Support user-provided lifetimes for set active/reactive power RPCs (#236
Browse files Browse the repository at this point in the history
)

The request messages `SetComponentPowerActiveRequest` and
`SetComponentPowerReactiveRequest` have a new field named
`request_lifetime` which allows the user to specify the duration for
which the power setpoints are valid. If this field is not specified in a
request, the power setpoint will be valid for 60 seconds.

Closes #184.
  • Loading branch information
tiyash-basu-frequenz committed Apr 12, 2024
2 parents 9cefb6a + 767c7b0 commit 3d41bf8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
can select between 5 seconds, 1 minute, 5 minutes, and 15 minutes. If set to
`UNSPECIFIED`, the bounds will be valid for a default duration of 5 seconds.

- The request messages `SetComponentPowerActiveRequest` and
`SetComponentPowerReactiveRequest` have a new field named `request_lifetime`
which allows the user to specify the duration for which the power setpoints
are valid. If this field is not specified in a request, the power setpoint
will be valid for 60 seconds.

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
12 changes: 12 additions & 0 deletions proto/frequenz/api/microgrid/v1/microgrid.proto
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ message SetComponentPowerActiveRequest {
// The output active power level, in watts.
// -ve values are for discharging, and +ve values are for charging.
float power = 2;

// The duration, in seconds, until which the request will stay in effect.
// This duration has to be between 10 seconds and 15 minutes (including both
// limits), otherwise the request will be rejected.
// If not provided, it defaults to 60s.
optional uint64 request_lifetime = 3;
}

// Response message for the RPC `SetComponentPowerActive`.
Expand All @@ -512,6 +518,12 @@ message SetComponentPowerReactiveRequest {
// - positive reactive is inductive (current is lagging the voltage)
// - negative reactive is capacitive (current is leading the voltage)
float power = 2;

// The duration, in seconds, until which the request will stay in effect.
// This duration has to be between 10 seconds and 15 minutes (including both
// limits), otherwise the request will be rejected.
// If not provided, it defaults to 60s.
optional uint64 request_lifetime = 3;
}

// Response message for the RPC `SetComponentPowerReactive`.
Expand Down

0 comments on commit 3d41bf8

Please sign in to comment.