Skip to content

Commit 10ab710

Browse files
Extended v1alpha1 documentation
Signed-off-by: tomni <thomas.nicolai@frequenz.com>
1 parent a03e25e commit 10ab710

1 file changed

Lines changed: 108 additions & 45 deletions

File tree

proto/frequenz/api/platformassets/v1alpha1/platformassets.proto

Lines changed: 108 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,102 @@ package frequenz.api.platformassets.v1alpha1;
1616
import "frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto";
1717
import "frequenz/api/common/v1alpha8/microgrid/microgrid.proto";
1818

19-
// Service providing access to manage and retrieve information
20-
// related to Gridpools and microgrids, and other platform assets.
19+
// PlatformAssetsService provides read-only access to platform asset metadata.
20+
//
21+
// The service exposes technical asset information required by downstream
22+
// services and applications, including microgrid metadata, electrical
23+
// component inventories, and the directed electrical component graph within a
24+
// microgrid.
25+
//
26+
// Platform assets describe the technical structure of a deployed or planned
27+
// microgrid. They are commonly used by reporting, forecasting, monitoring,
28+
// trading, optimization, and operational tooling to resolve stable asset
29+
// identifiers into their associated metadata.
30+
//
31+
// !!! important "Authentication"
32+
// All requests to FlexMarketService must be signed. The key identifier and
33+
// signature must be included in the request metadata (gRPC metadata /
34+
// HTTP headers). The signature must be computed using the HMAC-SHA256
35+
// algorithm and secret key. All requests to this service must be made
36+
// over TLS (HTTPS).
37+
//
2138
service PlatformAssetsService {
22-
// Returns details of a specific microgrid.
39+
// Returns metadata for a specific microgrid.
2340
rpc GetMicrogrid(GetMicrogridRequest) returns (GetMicrogridResponse);
2441

25-
// Returns list of a electrical components for a specific microgrid.
42+
// Lists electrical components for a specific microgrid.
2643
rpc ListMicrogridElectricalComponents(
2744
ListMicrogridElectricalComponentsRequest)
28-
returns (ListMicrogridElectricalComponentsResponse);
45+
returns (ListMicrogridElectricalComponentsResponse);
2946

30-
// Returns a list of the connections between electrical components for a
31-
// specific microgrid.
47+
// Lists directed electrical connections between components in a specific
48+
// microgrid.
3249
rpc ListMicrogridElectricalComponentConnections(
33-
ListMicrogridElectricalComponentConnectionsRequest)
34-
returns (ListMicrogridElectricalComponentConnectionsResponse);
50+
ListMicrogridElectricalComponentConnectionsRequest)
51+
returns (ListMicrogridElectricalComponentConnectionsResponse);
3552
}
3653

37-
// GetMicrogridRequest is the input parameter for fetching details
38-
// given a specific microgrid.
54+
// Filters for selecting electrical component connections in a microgrid.
55+
//
56+
// A connection must match all specified filter fields to be included in the
57+
// response.
58+
//
59+
// !!! note "Filter Semantics"
60+
// Each repeated field is evaluated using logical OR.
61+
//
62+
// Different filter fields are combined using logical AND.
63+
//
64+
// If no filters are provided, all known electrical connections in the
65+
// microgrid are returned.
66+
//
67+
message MicrogridElectricalComponentConnectionsFilter {
68+
// Optional. Return only connections whose source component ID is included in
69+
// this list.
70+
//
71+
// If empty, connections from any source component are returned.
72+
repeated uint64 source_component_ids = 1;
73+
74+
// Optional. Return only connections whose destination component ID is
75+
// included in this list.
76+
//
77+
// If empty, connections to any destination component are returned.
78+
repeated uint64 destination_component_ids = 2;
79+
}
80+
81+
// Filters for selecting electrical components in a microgrid.
82+
//
83+
// An electrical component must match all specified filter fields to be
84+
// included in the response.
85+
//
86+
// !!! note "Filter Semantics"
87+
// Each repeated field is evaluated using logical OR.
88+
//
89+
// Different filter fields are combined using logical AND.
90+
//
91+
// If no filters are provided, all electrical components in the microgrid
92+
// are returned.
93+
//
94+
message MicrogridElectricalComponentsFilter {
95+
// Optional. Return only components whose IDs are included in this list.
96+
//
97+
// If empty, no component-ID filtering is applied.
98+
repeated uint64 component_ids = 1;
99+
100+
// Optional. Return only components whose categories are included in this
101+
// list.
102+
//
103+
// If empty, no category filtering is applied.
104+
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
105+
ElectricalComponentCategory categories = 2;
106+
}
107+
108+
// Request message for retrieving metadata for a specific microgrid.
39109
message GetMicrogridRequest {
40110
// The unique identifier of the microgrid for which to fetch details.
41111
uint64 microgrid_id = 1;
42112
}
43113

44-
// GetMicrogridResponse is the response for fetching details
45-
// given a specific microgrid.
114+
// Response message containing metadata for a specific microgrid.
46115
message GetMicrogridResponse {
47116
// Details of the requested microgrid.
48117
frequenz.api.common.v1alpha8.microgrid.Microgrid microgrid = 1;
@@ -54,27 +123,28 @@ message ListMicrogridElectricalComponentsRequest {
54123
// are to be listed.
55124
uint64 microgrid_id = 1;
56125

57-
// Return components that have the specified IDs only.
58-
repeated uint64 component_ids = 2;
59-
60-
// Return components that have the specified categories only.
61-
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
62-
ElectricalComponentCategory categories = 3;
126+
// Optional. Filtering criteria for narrowing the returned components.
127+
//
128+
// If omitted, all electrical components in the microgrid are returned.
129+
MicrogridElectricalComponentsFilter filter = 2;
63130
}
64131

65-
// A message containing a list of electrical components.
132+
// Response message containing electrical components for a microgrid.
66133
message ListMicrogridElectricalComponentsResponse {
67-
// Unique microgrid identifier used in the request.
134+
// The unique identifier of the microgrid the returned components belong to.
68135
uint64 microgrid_id = 1;
69136

70-
// List of electrical components matching the filter criteria.
137+
// Electrical components matching the request filters.
71138
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
72139
ElectricalComponent components = 2;
73140
}
74141

75-
// ListMicrogridElectricalComponentConnectionsRequest is used for listing
76-
// the electrical connections between components in a microgrid. Connections
77-
// define a directed graph of electrical energy flow.
142+
// Request message for listing directed electrical connections between
143+
// components in a microgrid.
144+
//
145+
// Connections define the directed electrical component graph of a microgrid.
146+
// The source component is closer to the grid-connection point or logical root,
147+
// while the destination component is further downstream.
78148
//
79149
// !!! note "Component Graph"
80150
// A component graph in the context of a microgrid refers to a directed
@@ -87,33 +157,26 @@ message ListMicrogridElectricalComponentsResponse {
87157
// an underlying component. This graph provides a structured view of how
88158
// electrical energy flows within the microgrid.
89159
//
90-
// !!! note "Filtering"
91-
// Filtering can be done based on the source_component_id or
92-
// destination_component_id. If these fields are left empty, connections
93-
// with any source or destination will be returned.
94-
//
95160
message ListMicrogridElectricalComponentConnectionsRequest {
96-
// Mandatory field. The ID of the microgrid
97-
// for which connections are to be listed.
161+
// The unique identifier of the microgrid whose electrical component
162+
// connections should be listed.
98163
uint64 microgrid_id = 1;
99164

100-
// Only return connections that originate from these component IDs.
101-
// If empty, no filtering is applied.
102-
repeated uint64 source_component_ids = 2;
103-
104-
// Only return connections that terminate at these component IDs.
105-
// If empty, no filtering is applied.
106-
repeated uint64 destination_component_ids = 3;
165+
// Optional filtering criteria for narrowing the returned connections.
166+
//
167+
// If omitted, all known electrical connections in the microgrid are returned.
168+
MicrogridElectricalComponentConnectionsFilter filter = 2;
107169
}
108170

109-
// ListMicrogridElectricalComponentConnectionsResponse holds the list of
110-
// electrical connections that match the filter criteria specified in the
111-
// ListMicrogridElectricalComponentConnectionsRequest.
171+
// Response message containing directed electrical connections for a microgrid.
172+
//
173+
// The response contains all connections matching the requested filters. If no
174+
// connection matches the filters, `connections` is empty.
112175
message ListMicrogridElectricalComponentConnectionsResponse {
113-
// The ID of the microgrid for which connections are returned.
176+
// The unique identifier of the microgrid the returned connections belong to.
114177
uint64 microgrid_id = 1;
115178

116-
// Contains the list of connections that match the filtering criteria.
179+
// Electrical component connections matching the request filters.
117180
repeated frequenz.api.common.v1alpha8.microgrid.electrical_components.
118-
ElectricalComponentConnection connections =2;
181+
ElectricalComponentConnection connections = 2;
119182
}

0 commit comments

Comments
 (0)