microgrid_pb2
frequenz.api.microgrid.v1alpha18.microgrid_pb2 ¤
Generated protocol buffer code.
Attributes¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_ACTIVE
module-attribute
¤
The requested power is active power.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_REACTIVE
module-attribute
¤
The requested power is reactive power.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_UNSPECIFIED
module-attribute
¤
Default value. Users are discouraged from using this value. Using this will result in an error.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_ACCEPTED
module-attribute
¤
The request has been accepted, and the target power set-point will be applied to the electrical component.
Once the API service has received a request to set the power of an electrical component, it will validate the input parameters immediately. If the parameters are valid, the service will return this code immediately, and then proceed to apply the power set-point to the electrical component.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_FAILED
module-attribute
¤
The request has failed midway, and the electrical component is not at the desired power level.
This code indicates that the request to set the power of an electrical component has been accepted, but the service encountered an error while applying the power set-point to the electrical component.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_OVERRIDDEN
module-attribute
¤
The request has been overridden by another request.
This could happen if a new request to set the power of an electrical component arrives while the previous request is still being processed.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_REJECTED
module-attribute
¤
The request has been rejected because of invalid input parameters.
Once the API service has received a request to set the power of an electrical component, it will validate the input parameters immediately. If the parameters are invalid, the service will return this code immediately, and will not apply the power set-point to the electrical component.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_SUCCESS
module-attribute
¤
The request has been successfully processed.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_UNSPECIFIED
module-attribute
¤
Default value. Users are discouraged from using this value.
Classes¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.AckElectricalComponentErrorRequest ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.AugmentElectricalComponentBoundsRequest ¤
Bases: Message
Request parameters for the RPC AugmentElectricalComponentBounds
.
Attributes¤
bounds
property
¤
A list of bounds for the target metric. While incorporating these bounds, the API will ensure that overlapping pairs of bounds are merged into a single pair of bounds, and non-overlapping ones are kept separated.
electrical_component_id
instance-attribute
¤
The ID of the target electrical component.
request_lifetime
instance-attribute
¤
The duration, in seconds, until which the request will stay in effect. This duration has to be between 5 seconds and 15 minutes (including both limits), otherwise the request will be rejected. If not provided, it defaults to 5s.
target_metric
instance-attribute
¤
The target metric whose bounds have to be set.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.AugmentElectricalComponentBoundsResponse ¤
Bases: Message
Response message for the RPC AugmentElectricalComponentBounds
.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.GetMicrogridResponse ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListElectricalComponentConnectionsRequest ¤
Bases: Message
Request parameters for the RPC ListElectricalComponentConnections
.
Contains filtering parameters for listing connections.
Attributes¤
destination_electrical_component_ids
property
¤
Only return connections that end at the specified electrical component
ID(s).
If this list is empty, connections with any destination_component_id
will be returned.
source_electrical_component_ids
property
¤
Only return connections that start from the specified electrical
component ID(s).
If this list is empty, connections with any source_component_id
will be
returned.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListElectricalComponentConnectionsResponse ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListElectricalComponentsRequest ¤
Bases: Message
Request parameters for the RPC ListElectricalComponents
.
Contains filtering parameters for listing electrical components.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListElectricalComponentsResponse ¤
Bases: Message
A message containing a list of electrical components.
Used as the return type in the RPC ListElectricalComponents
.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListSensorRequest ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListSensorsResponse ¤
Bases: Message
Response message for the RPC ListSensors
.
A message containing a list of sensors.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.PowerType ¤
Bases: _PowerType
The type of power requested for an electrical component.
Source code in frequenz/api/microgrid/v1alpha18/microgrid_pb2.py
frequenz.api.microgrid.v1alpha18.microgrid_pb2.PutElectricalComponentInStandbyRequest ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ReceiveElectricalComponentTelemetryStreamRequest ¤
Bases: Message
Request parameters for the RPC ReceiveElectricalComponentTelemetryStream
.
Attributes¤
electrical_component_id
instance-attribute
¤
The electrical component ID to subscribe to.
filter
property
¤
The filter to apply to the stream.
This field is optional. If this is not provided, then the stream will return all metrics for the given electrical component. If this is provided, then the stream will return only the metrics specified in the filter.
Classes¤
ComponentTelemetryStreamFilter ¤
Bases: Message
A message for specifying a filter to apply to the stream.
property
¤List of metrics to return. Only the specified metrics will be returned.
Note
At least one metric must be specified. If no metric is specified, then the stream will return an error.
Note
Components may not support all metrics. If a electrical component does not support a given metric, then the returned data stream will not contain that metric.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ReceiveElectricalComponentTelemetryStreamResponse ¤
Bases: Message
A data sample from a electrical component in the microgrid. Electrical Components belonging to all categories and types can be represented using this message.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ReceiveSensorTelemetryStreamRequest ¤
Bases: Message
Request parameters for the RPC ReceiveSensorTelemetryStream
.
Attributes¤
filter
property
¤
The filter to apply to the stream.
This field is optional. If this is not provided, then the stream will return all metrics for the given sensor. If this is provided, then the stream will return only the metrics specified in the filter.
Classes¤
SensorTelemetryStreamFilter ¤
Bases: Message
A message for specifying a filter to apply to the stream.
property
¤List of metrics to return. Only the specified metrics will be returned.
Note
At least one metric must be specified. If no metric is specified, then the stream will return an error.
Note
Sensors may not support all metrics. If a sensor does not support a given metric, then the returned data stream will not contain that metric.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.ReceiveSensorTelemetryStreamResponse ¤
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SetElectricalComponentPowerRequest ¤
Bases: Message
Request parameters for the RPC SetElectricalComponentPower
.
Attributes¤
electrical_component_id
instance-attribute
¤
The ID of the electrical component to set the output power of.
power
instance-attribute
¤
The requested power output.
For Active power: - This value is in watts (W). - Negative values indicate discharge, i.e., supplying power towards the direction of the root node of the component graph. - Positive values indicate charge, i.e., consuming power from the direction of the root node of the component graph.
For Reactive power: - This value is in volt-amperes reactive (VAR). - Negative values indicate capacitive reactive power, i.e., the current is leading the voltage when viewed from the perspective of the electrical component. - Positive values indicate inductive reactive power, i.e., the current is lagging the voltage when viewed from the perspective of the electrical component.
request_lifetime
instance-attribute
¤
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.
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SetElectricalComponentPowerRequestStatus ¤
Bases: _SetElectricalComponentPowerRequestStatus
Response codes for the SetElectricalComponentPowerActive
and
SetElectricalComponentPowerReactive
RPCs. These codes indicate the ongoing
status of the request to set the power of an electrical component.
Often, electrical components are not able to immediately set their output power to the requested value. This can happen due to several reasons, including, but not limited to: - having to ramp up or down the power output from the current output. - having to wait for the electrical component to reach a stable state before applying the new power set-point. - communication latency between the API service and the electrical component.
In such cases, an initial response is sent to the client, indicating that the request has been accepted, and it is followed by a stream of responses indicating the ongoing status of the request.
Source code in frequenz/api/microgrid/v1alpha18/microgrid_pb2.py
frequenz.api.microgrid.v1alpha18.microgrid_pb2.SetElectricalComponentPowerResponse ¤
Bases: Message
Response message for the RPC SetElectricalComponentPower
.
Attributes¤
status
instance-attribute
¤
The current status of the request to set the power of the electrical component.
valid_until_time
property
¤
The timestamp until which the given power command will stay in effect. After this timestamp, the electrical component will be set to its standby state, if the API receives no further power commands. By default, this timestamp will be set to the current time plus 60 seconds.
When the request status is REJECTED
, FAILED
, or OVERRIDDEN
, the
valid_until_time
timestamp will not be set, and the request will no
longer remain in effect.