Skip to content

microgrid_pb2

frequenz.api.microgrid.v1alpha18.microgrid_pb2 ¤

Generated protocol buffer code.

Attributes¤

frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_ACTIVE module-attribute ¤

POWER_TYPE_ACTIVE: ValueType

The requested power is active power.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_REACTIVE module-attribute ¤

POWER_TYPE_REACTIVE: ValueType

The requested power is reactive power.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.POWER_TYPE_UNSPECIFIED module-attribute ¤

POWER_TYPE_UNSPECIFIED: ValueType

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 ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_ACCEPTED: (
    ValueType
)

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 ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_FAILED: (
    ValueType
)

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 ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_OVERRIDDEN: (
    ValueType
)

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 ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_REJECTED: (
    ValueType
)

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 ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_SUCCESS: (
    ValueType
)

The request has been successfully processed.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_UNSPECIFIED module-attribute ¤

SET_ELECTRICAL_COMPONENT_POWER_REQUEST_STATUS_UNSPECIFIED: (
    ValueType
)

Default value. Users are discouraged from using this value.

Classes¤

frequenz.api.microgrid.v1alpha18.microgrid_pb2.AckElectricalComponentErrorRequest ¤

Bases: Message

Request parameters for the RPC AckElectricalComponentError.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The electrical component ID to acknowledge the error for.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.AugmentElectricalComponentBoundsRequest ¤

Bases: Message

Request parameters for the RPC AugmentElectricalComponentBounds.

Attributes¤
bounds property ¤
bounds: RepeatedCompositeFieldContainer[Bounds]

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 ¤
electrical_component_id: int

The ID of the target electrical component.

request_lifetime instance-attribute ¤
request_lifetime: int

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 ¤
target_metric: ValueType

The target metric whose bounds have to be set.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.AugmentElectricalComponentBoundsResponse ¤

Bases: Message

Response message for the RPC AugmentElectricalComponentBounds.

Attributes¤
valid_until_time property ¤
valid_until_time: Timestamp

The timestamp until which the added bounds will stay in effect. After this timestamp, the electrical component bounds added by this request will be removed. By default, this timestamp will be set to the current time plus 60 seconds.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.GetMicrogridResponse ¤

Bases: Message

Information describing a microgrid.

Attributes¤
microgrid property ¤
microgrid: Microgrid

The information about the local microgrid.

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 ¤
destination_electrical_component_ids: (
    RepeatedScalarFieldContainer[int]
)

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 ¤
source_electrical_component_ids: (
    RepeatedScalarFieldContainer[int]
)

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 ¤

Bases: Message

Response message for the RPC ListElectricalComponentConnections. Contains a list of connections.

Attributes¤
electrical_component_connections property ¤
electrical_component_connections: (
    RepeatedCompositeFieldContainer[
        ElectricalComponentConnection
    ]
)

The list of connections.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.ListElectricalComponentsRequest ¤

Bases: Message

Request parameters for the RPC ListElectricalComponents. Contains filtering parameters for listing electrical components.

Attributes¤
electrical_component_categories property ¤
electrical_component_categories: (
    RepeatedScalarFieldContainer[ValueType]
)

Return electrical components that have the specified categories only.

electrical_component_ids property ¤
electrical_component_ids: RepeatedScalarFieldContainer[int]

Return electrical components that have the specified IDs only.

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 ¤

Bases: Message

Request parameters for the RPC ListSensors. Contains filtering parameters for listing sensors.

Attributes¤
sensor_ids property ¤
sensor_ids: RepeatedScalarFieldContainer[int]

Return sensors that have the specified IDs only.

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
_globals['_MICROGRID'].methods_by_name['ReceiveElectricalComponentTelemetryStream']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['ReceiveElectricalComponentTelemetryStream']._serialized_options = b'\202\323\344\223\002/\022-/v1/components/{electrical_component_id}/data'

frequenz.api.microgrid.v1alpha18.microgrid_pb2.PutElectricalComponentInStandbyRequest ¤

Bases: Message

Request parameters for the RPC PutElectricalComponentInStandby.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The electrical component ID to set to standby.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.ReceiveElectricalComponentTelemetryStreamRequest ¤

Bases: Message

Request parameters for the RPC ReceiveElectricalComponentTelemetryStream.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The electrical component ID to subscribe to.

filter property ¤
filter: ComponentTelemetryStreamFilter

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.

Attributes¤
metrics property ¤
metrics: RepeatedScalarFieldContainer[ValueType]

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 ¤
filter: SensorTelemetryStreamFilter

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.

sensor_id instance-attribute ¤
sensor_id: int

The sensor ID to subscribe to.

Classes¤
SensorTelemetryStreamFilter ¤

Bases: Message

A message for specifying a filter to apply to the stream.

Attributes¤
metrics property ¤
metrics: RepeatedScalarFieldContainer[ValueType]

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 ¤

Bases: Message

A data sample from a sensor in the microgrid.

Attributes¤
telemetry property ¤
telemetry: SensorTelemetry

The sensor data.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.SetElectricalComponentPowerRequest ¤

Bases: Message

Request parameters for the RPC SetElectricalComponentPower.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The ID of the electrical component to set the output power of.

power instance-attribute ¤
power: float

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.

power_type instance-attribute ¤
power_type: ValueType

The requested power type.

request_lifetime instance-attribute ¤
request_lifetime: int

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
  _globals['_STOPELECTRICALCOMPONENTREQUEST']._serialized_end=3218
  _globals['_ACKELECTRICALCOMPONENTERRORREQUEST']._serialized_start=3220
  _globals['_ACKELECTRICALCOMPONENTERRORREQUEST']._serialized_end=3289
  _globals['_MICROGRID']._serialized_start=3788
  _globals['_MICROGRID']._serialized_end=6113
# @@protoc_insertion_point(module_scope)

frequenz.api.microgrid.v1alpha18.microgrid_pb2.SetElectricalComponentPowerResponse ¤

Bases: Message

Response message for the RPC SetElectricalComponentPower.

Attributes¤
status instance-attribute ¤
status: ValueType

The current status of the request to set the power of the electrical component.

valid_until_time property ¤
valid_until_time: Timestamp

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.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.StartElectricalComponentRequest ¤

Bases: Message

Request parameters for the RPC StartElectricalComponent.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The electrical component ID to start.

frequenz.api.microgrid.v1alpha18.microgrid_pb2.StopElectricalComponentRequest ¤

Bases: Message

Request parameters for the RPC StopElectricalComponent.

Attributes¤
electrical_component_id instance-attribute ¤
electrical_component_id: int

The electrical component ID to stop.