Skip to content

microgrid_pb2

frequenz.api.microgrid.v1.microgrid_pb2 ¤

Generated protocol buffer code.

Classes¤

frequenz.api.microgrid.v1.microgrid_pb2.AckComponentErrorRequest ¤

Bases: Message

Request parameters for the RPC AckComponentError.

Attributes¤
component_id instance-attribute ¤
component_id: int

The component ID to acknowledge the error for.

frequenz.api.microgrid.v1.microgrid_pb2.AddComponentBoundsRequest ¤

Bases: Message

Request parameters for the RPC AddComponentBounds.

Attributes¤
component_id instance-attribute ¤
component_id: int

The ID of the target component.

target_metric instance-attribute ¤
target_metric: ValueType

The target metric whose bounds have to be set.

validity_duration instance-attribute ¤
validity_duration: ValueType

The duration for which the given bounds will stay in effect. If this field is not provided, then the bounds will be removed after a default duration of 5 seconds.

Functions¤
bounds ¤
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.

frequenz.api.microgrid.v1.microgrid_pb2.AddComponentBoundsResponse ¤

Bases: Message

Response message for the RPC AddComponentBounds.

Functions¤
ts ¤
ts() -> Timestamp

The timestamp until which the given bounds will stay in effect.

frequenz.api.microgrid.v1.microgrid_pb2.ComponentBoundsValidityDuration ¤

Bases: _ComponentBoundsValidityDuration

The duration for which a given list of bounds will stay in effect.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_MICROGRID'].methods_by_name['ListSensors']._serialized_options = b'\202\323\344\223\002\r\022\013/v1/sensors'
_globals['_MICROGRID'].methods_by_name['ListConnections']._loaded_options = None

frequenz.api.microgrid.v1.microgrid_pb2.GetMicrogridMetadataResponse ¤

Bases: Message

Metadata that describes a microgrid.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_MICROGRID'].methods_by_name['SetComponentPowerReactive']._serialized_options = b'\202\323\344\223\0028\0226/v1/components/{component_id}/setPowerReactive/{power}'
_globals['_MICROGRID'].methods_by_name['StartComponent']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['StartComponent']._serialized_options = b'\202\323\344\223\002%\022#/v1/components/{component_id}/start'
_globals['_MICROGRID'].methods_by_name['PutComponentInStandby']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['PutComponentInStandby']._serialized_options = b'\202\323\344\223\002\'\022%/v1/components/{component_id}/standby'
_globals['_MICROGRID'].methods_by_name['StopComponent']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['StopComponent']._serialized_options = b'\202\323\344\223\002$\022\"/v1/components/{component_id}/stop'
_globals['_MICROGRID'].methods_by_name['AckComponentError']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['AckComponentError']._serialized_options = b'\202\323\344\223\002(\022&/v1/components/{component_id}/errorAck'
_globals['_COMPONENTBOUNDSVALIDITYDURATION']._serialized_start=2783
_globals['_COMPONENTBOUNDSVALIDITYDURATION']._serialized_end=3068
_globals['_GETMICROGRIDMETADATARESPONSE']._serialized_start=429
_globals['_GETMICROGRIDMETADATARESPONSE']._serialized_end=523
_globals['_LISTCOMPONENTSREQUEST']._serialized_start=526
_globals['_LISTCOMPONENTSREQUEST']._serialized_end=656
_globals['_LISTCOMPONENTSRESPONSE']._serialized_start=658
_globals['_LISTCOMPONENTSRESPONSE']._serialized_end=758
_globals['_LISTSENSORREQUEST']._serialized_start=760
_globals['_LISTSENSORREQUEST']._serialized_end=877
_globals['_LISTSENSORSRESPONSE']._serialized_start=879
_globals['_LISTSENSORSRESPONSE']._serialized_end=967
Functions¤
microgrid ¤
microgrid() -> Microgrid

The location of the microgrid, in geographical co-ordinates.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_MICROGRID'].methods_by_name['AckComponentError']._loaded_options = None
_globals['_MICROGRID'].methods_by_name['AckComponentError']._serialized_options = b'\202\323\344\223\002(\022&/v1/components/{component_id}/errorAck'
_globals['_COMPONENTBOUNDSVALIDITYDURATION']._serialized_start=2783

frequenz.api.microgrid.v1.microgrid_pb2.ListComponentsRequest ¤

Bases: Message

Request parameters for the RPC ListComponents. Contains filtering parameters for listing components.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_LISTCONNECTIONSRESPONSE']._serialized_end=1137
_globals['_RECEIVECOMPONENTDATASTREAMREQUEST']._serialized_start=1140
_globals['_RECEIVECOMPONENTDATASTREAMREQUEST']._serialized_end=1387
_globals['_RECEIVECOMPONENTDATASTREAMREQUEST_COMPONENTDATASTREAMFILTER']._serialized_start=1303
_globals['_RECEIVECOMPONENTDATASTREAMREQUEST_COMPONENTDATASTREAMFILTER']._serialized_end=1387
_globals['_RECEIVECOMPONENTDATASTREAMRESPONSE']._serialized_start=1389
_globals['_RECEIVECOMPONENTDATASTREAMRESPONSE']._serialized_end=1499
_globals['_RECEIVESENSORDATASTREAMREQUEST']._serialized_start=1502
_globals['_RECEIVESENSORDATASTREAMREQUEST']._serialized_end=1734
_globals['_RECEIVESENSORDATASTREAMREQUEST_SENSORDATASTREAMFILTER']._serialized_start=1653
_globals['_RECEIVESENSORDATASTREAMREQUEST_SENSORDATASTREAMFILTER']._serialized_end=1734
_globals['_RECEIVESENSORDATASTREAMRESPONSE']._serialized_start=1736
_globals['_RECEIVESENSORDATASTREAMRESPONSE']._serialized_end=1837
_globals['_ADDCOMPONENTBOUNDSREQUEST']._serialized_start=1840
_globals['_ADDCOMPONENTBOUNDSREQUEST']._serialized_end=2095
_globals['_ADDCOMPONENTBOUNDSRESPONSE']._serialized_start=2097
_globals['_ADDCOMPONENTBOUNDSRESPONSE']._serialized_end=2165
_globals['_SETCOMPONENTPOWERACTIVEREQUEST']._serialized_start=2167
_globals['_SETCOMPONENTPOWERACTIVEREQUEST']._serialized_end=2288
_globals['_SETCOMPONENTPOWERACTIVERESPONSE']._serialized_start=2290
_globals['_SETCOMPONENTPOWERACTIVERESPONSE']._serialized_end=2372
_globals['_SETCOMPONENTPOWERREACTIVEREQUEST']._serialized_start=2374
_globals['_SETCOMPONENTPOWERREACTIVEREQUEST']._serialized_end=2497
_globals['_SETCOMPONENTPOWERREACTIVERESPONSE']._serialized_start=2499
_globals['_SETCOMPONENTPOWERREACTIVERESPONSE']._serialized_end=2583
_globals['_STARTCOMPONENTREQUEST']._serialized_start=2585
_globals['_STARTCOMPONENTREQUEST']._serialized_end=2630
_globals['_PUTCOMPONENTINSTANDBYREQUEST']._serialized_start=2632
_globals['_PUTCOMPONENTINSTANDBYREQUEST']._serialized_end=2684
Functions¤
categories ¤
categories() -> RepeatedScalarFieldContainer[ValueType]

Return components that have the specified categories only.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_ADDCOMPONENTBOUNDSREQUEST']._serialized_end=2095
_globals['_ADDCOMPONENTBOUNDSRESPONSE']._serialized_start=2097
_globals['_ADDCOMPONENTBOUNDSRESPONSE']._serialized_end=2165
component_ids ¤
component_ids() -> RepeatedScalarFieldContainer[int]

Return components that have the specified IDs only.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
_globals['_RECEIVESENSORDATASTREAMREQUEST_SENSORDATASTREAMFILTER']._serialized_end=1734
_globals['_RECEIVESENSORDATASTREAMRESPONSE']._serialized_start=1736
_globals['_RECEIVESENSORDATASTREAMRESPONSE']._serialized_end=1837

frequenz.api.microgrid.v1.microgrid_pb2.ListComponentsResponse ¤

Bases: Message

A message containing a list of components. Used as the return type in the RPC ListComponents.

Source code in py/frequenz/api/microgrid/v1/microgrid_pb2.py
  _globals['_ACKCOMPONENTERRORREQUEST']._serialized_end=2780
  _globals['_MICROGRID']._serialized_start=3071
  _globals['_MICROGRID']._serialized_end=5153
# @@protoc_insertion_point(module_scope)

frequenz.api.microgrid.v1.microgrid_pb2.ListConnectionsRequest ¤

Bases: Message

Request parameters for the RPC ListConnections. Contains filtering parameters for listing connections.

Functions¤
ends ¤
ends() -> RepeatedScalarFieldContainer[int]

Only return connections that end at the specified component ID(s): if empty, connections with any end will be returned

starts ¤
starts() -> RepeatedScalarFieldContainer[int]

Only return connections that start from the specified component ID(s): if empty, connections with any start will be returned

frequenz.api.microgrid.v1.microgrid_pb2.ListConnectionsResponse ¤

Bases: Message

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

Functions¤
connections ¤
connections() -> (
    RepeatedCompositeFieldContainer[ComponentConnection]
)

The list of connections.

frequenz.api.microgrid.v1.microgrid_pb2.ListSensorRequest ¤

Bases: Message

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

Functions¤
categories ¤
categories() -> RepeatedScalarFieldContainer[ValueType]

Return sensors that have the specified categories only.

sensor_ids ¤
sensor_ids() -> RepeatedScalarFieldContainer[int]

Return sensors that have the specified IDs only.

frequenz.api.microgrid.v1.microgrid_pb2.ListSensorsResponse ¤

Bases: Message

Response message for the RPC ListSensors. A message containing a list of sensors.

frequenz.api.microgrid.v1.microgrid_pb2.PutComponentInStandbyRequest ¤

Bases: Message

Request parameters for the RPC PutComponentInStandby.

Attributes¤
component_id instance-attribute ¤
component_id: int

The component ID to set to standby.

frequenz.api.microgrid.v1.microgrid_pb2.ReceiveComponentDataStreamRequest ¤

Bases: Message

Request parameters for the RPC ReceiveComponentDataStream.

Attributes¤
component_id instance-attribute ¤
component_id: int

The component ID to subscribe to.

Classes¤
ComponentDataStreamFilter ¤

Bases: Message

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

Functions¤
metrics ¤
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 component does not support a given metric, then the returned data stream will not contain that metric.

Functions¤
filter ¤
filter() -> ComponentDataStreamFilter

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 component. If this is provided, then the stream will return only the metrics specified in the filter.

frequenz.api.microgrid.v1.microgrid_pb2.ReceiveComponentDataStreamResponse ¤

Bases: Message

A data sample from a component in the microgrid. Components belonging to all categories and types can be represented using this message.

frequenz.api.microgrid.v1.microgrid_pb2.ReceiveSensorDataStreamRequest ¤

Bases: Message

Request parameters for the RPC ReceiveSensorDataStream.

Attributes¤
sensor_id instance-attribute ¤
sensor_id: int

The sensor ID to subscribe to.

Classes¤
SensorDataStreamFilter ¤

Bases: Message

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

Functions¤
metrics ¤
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.

Functions¤
filter ¤
filter() -> SensorDataStreamFilter

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 component. If this is provided, then the stream will return only the metrics specified in the filter.

frequenz.api.microgrid.v1.microgrid_pb2.ReceiveSensorDataStreamResponse ¤

Bases: Message

A data sample from a sensor in the microgrid.

Functions¤
data ¤
data() -> SensorData

The sensor data.

frequenz.api.microgrid.v1.microgrid_pb2.SetComponentPowerActiveRequest ¤

Bases: Message

Request parameters for the RPC SetComponentPowerActive.

Attributes¤
component_id instance-attribute ¤
component_id: int

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

power instance-attribute ¤
power: float

The output active power level, in watts. -ve values are for discharging, and +ve values are for charging.

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.v1.microgrid_pb2.SetComponentPowerActiveResponse ¤

Bases: Message

Response message for the RPC SetComponentPowerActive.

Functions¤
valid_until ¤
valid_until() -> Timestamp

The timestamp until which the given power command will stay in effect. After this timestamp, the component power will be set to 0, if the API receives no further power commands. By default, this timestamp will be set to the current time plus 60 seconds.

frequenz.api.microgrid.v1.microgrid_pb2.SetComponentPowerReactiveRequest ¤

Bases: Message

Request parameters for the RPC SetComponentPowerReactive.

Attributes¤
component_id instance-attribute ¤
component_id: int

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

power instance-attribute ¤
power: float

The output reactive power level, in VAr.

The standard of polarity is as per the IEEE 1459-2010 standard definitions: - positive reactive is inductive (current is lagging the voltage) - negative reactive is capacitive (current is leading the voltage)

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.v1.microgrid_pb2.SetComponentPowerReactiveResponse ¤

Bases: Message

Response message for the RPC SetComponentPowerReactive.

Functions¤
valid_until ¤
valid_until() -> Timestamp

The timestamp until which the given power command will stay in effect. After this timestamp, the component power will be set to 0, if the API receives no further power commands. By default, this timestamp will be set to the current time plus 60 seconds.

frequenz.api.microgrid.v1.microgrid_pb2.StartComponentRequest ¤

Bases: Message

Request parameters for the RPC StartComponent.

Attributes¤
component_id instance-attribute ¤
component_id: int

The component ID to start.

frequenz.api.microgrid.v1.microgrid_pb2.StopComponentRequest ¤

Bases: Message

Request parameters for the RPC StopComponent.

Attributes¤
component_id instance-attribute ¤
component_id: int

The component ID to stop.