From 3dce452597e686f6fc88d236bf07bf69b6f59b0c Mon Sep 17 00:00:00 2001 From: Alberto Moretti Date: Wed, 14 Feb 2024 17:59:27 +0100 Subject: [PATCH 1/5] feat: topology protobuf and any task --- docs/task.proto.md | 16 +- docs/topology.proto.md | 119 ++++++++++++ pkg/grid/v1/device_event.pb.go | 227 ++++++++++++----------- pkg/grid/v1/topology.pb.go | 323 ++++++++++++++++++++++++++++++++- pkg/platform/v1/task.pb.go | 134 +++++++------- proto/grid/v1/topology.proto | 33 ++++ proto/platform/v1/task.proto | 4 +- 7 files changed, 659 insertions(+), 197 deletions(-) diff --git a/docs/task.proto.md b/docs/task.proto.md index 7e7c319..1593ff2 100644 --- a/docs/task.proto.md +++ b/docs/task.proto.md @@ -9,8 +9,9 @@ services. ## Imports -| Import | Description | -|--------|-------------| +| Import | Description | +|---------------------------|-------------| +| google/protobuf/any.proto | | @@ -99,8 +100,9 @@ direction LR class Parameter { + string name - + string value + + google.protobuf.Any value } +Parameter --> `google.protobuf.Any` ``` ### Task Diagram @@ -160,10 +162,10 @@ Notification --> `Parameter` A parameter of a `Task` or `Notification` -| Field | Ordinal | Type | Label | Description | -|---------|---------|----------|-------|----------------------| -| `name` | 1 | `string` | | The parameter name | -| `value` | 2 | `string` | | The parameter value | +| Field | Ordinal | Type | Label | Description | +|---------|---------|-----------------------|-------|----------------------| +| `name` | 1 | `string` | | The parameter name | +| `value` | 2 | `google.protobuf.Any` | | The parameter value | diff --git a/docs/topology.proto.md b/docs/topology.proto.md index 045084f..016631f 100644 --- a/docs/topology.proto.md +++ b/docs/topology.proto.md @@ -41,6 +41,65 @@ class Topology { + bytes tp } +``` +### TopologicalNode Diagram + +```mermaid +classDiagram +direction LR + +%% A topology Node information. +%% * To be used in ComputedTopology message. +%% + +class TopologicalNode { + + double BaseVoltage + + string BaseVoltageId + + string ConnectivityNodeContainerId + + List~string~ ConnectivityNodeIds + + List~string~ PowerTransferEndIds + + List~string~ TerminalIds +} + +``` +### TopologicalIsland Diagram + +```mermaid +classDiagram +direction LR + +%% A topology Island information. +%% * To be used in ComputedTopology message. +%% + +class TopologicalIsland { + + List~string~ TopologicalNodeIds +} + +``` +### ComputedTopology Diagram + +```mermaid +classDiagram +direction LR + +%% A processed topology information. +%% Headers used in rabbitMQ: +%% * `id` (string): id of the `Topology` +%% * `type` (string): always `ComputedTopology` +%% * `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset. +%% * `timestampId` (int64): related measurement Unix msec timestamp (if any) +%% * `subnetworkId` (string): the sub network id for which the topology was computed +%% + +class ComputedTopology { + + string eqId + + Map~string, TopologicalIsland~ topologicalIslands + + Map~string, TopologicalNode~ topologicalNodes +} +ComputedTopology .. ` TopologicalIsland` +ComputedTopology .. ` TopologicalNode` + ``` ## Message: Topology @@ -65,6 +124,66 @@ Headers used in rabbitMQ: +## Message: TopologicalNode + +**FQN**: grid.v1.TopologicalNode + +A topology Node information. +* To be used in ComputedTopology message. + + + +| Field | Ordinal | Type | Label | Description | +|-------------------------------|---------|----------|----------|------------------------------------------------------------------| +| `BaseVoltage` | 6 | `double` | | The BaseVoltage in the TopologicalNode. | +| `BaseVoltageId` | 5 | `string` | | The id of the BaseVoltage in the TopologicalNode. | +| `ConnectivityNodeContainerId` | 4 | `string` | | The id of the ConnectivityNodeContainer in the TopologicalNode. | +| `ConnectivityNodeIds` | 2 | `string` | Repeated | The list of ConnectivityNode ids in the TopologicalNode. | +| `PowerTransferEndIds` | 3 | `string` | Repeated | The list of PowerTransferEnd ids in the TopologicalNode. | +| `TerminalIds` | 1 | `string` | Repeated | The list of Terminal ids in the TopologicalNode. | + + + + +## Message: TopologicalIsland + +**FQN**: grid.v1.TopologicalIsland + +A topology Island information. +* To be used in ComputedTopology message. + + + +| Field | Ordinal | Type | Label | Description | +|----------------------|---------|----------|----------|------------------------------------------------------------| +| `TopologicalNodeIds` | 1 | `string` | Repeated | The list of TopologicalNode ids in the TopologicalIsland. | + + + + +## Message: ComputedTopology + +**FQN**: grid.v1.ComputedTopology + +A processed topology information. +Headers used in rabbitMQ: +* `id` (string): id of the `Topology` +* `type` (string): always `ComputedTopology` +* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset. +* `timestampId` (int64): related measurement Unix msec timestamp (if any) +* `subnetworkId` (string): the sub network id for which the topology was computed + + + +| Field | Ordinal | Type | Label | Description | +|----------------------|---------|-----------------------------|-------|-------------------------------------------------| +| `eqId` | 1 | `string` | | The id of the EQ file used. | +| `topologicalIslands` | 3 | `string, TopologicalIsland` | Map | The map of TopologicalIslands in the Topology. | +| `topologicalNodes` | 2 | `string, TopologicalNode` | Map | The map of TopologicalNodes in the Topology. | + + + + diff --git a/pkg/grid/v1/device_event.pb.go b/pkg/grid/v1/device_event.pb.go index f87a972..c4cb3b8 100644 --- a/pkg/grid/v1/device_event.pb.go +++ b/pkg/grid/v1/device_event.pb.go @@ -110,7 +110,7 @@ func (x *DeviceEvent) GetCode() string { return "" } -type CommunicationErrorEvent struct { +type CommunicationError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -118,8 +118,8 @@ type CommunicationErrorEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *CommunicationErrorEvent) Reset() { - *x = CommunicationErrorEvent{} +func (x *CommunicationError) Reset() { + *x = CommunicationError{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -127,13 +127,13 @@ func (x *CommunicationErrorEvent) Reset() { } } -func (x *CommunicationErrorEvent) String() string { +func (x *CommunicationError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CommunicationErrorEvent) ProtoMessage() {} +func (*CommunicationError) ProtoMessage() {} -func (x *CommunicationErrorEvent) ProtoReflect() protoreflect.Message { +func (x *CommunicationError) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -145,19 +145,19 @@ func (x *CommunicationErrorEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CommunicationErrorEvent.ProtoReflect.Descriptor instead. -func (*CommunicationErrorEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use CommunicationError.ProtoReflect.Descriptor instead. +func (*CommunicationError) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{1} } -func (x *CommunicationErrorEvent) GetEvent() *DeviceEvent { +func (x *CommunicationError) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type TimeQualityEvent struct { +type TimeQuality struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -165,8 +165,8 @@ type TimeQualityEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *TimeQualityEvent) Reset() { - *x = TimeQualityEvent{} +func (x *TimeQuality) Reset() { + *x = TimeQuality{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -174,13 +174,13 @@ func (x *TimeQualityEvent) Reset() { } } -func (x *TimeQualityEvent) String() string { +func (x *TimeQuality) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TimeQualityEvent) ProtoMessage() {} +func (*TimeQuality) ProtoMessage() {} -func (x *TimeQualityEvent) ProtoReflect() protoreflect.Message { +func (x *TimeQuality) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -192,19 +192,19 @@ func (x *TimeQualityEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimeQualityEvent.ProtoReflect.Descriptor instead. -func (*TimeQualityEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use TimeQuality.ProtoReflect.Descriptor instead. +func (*TimeQuality) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{2} } -func (x *TimeQualityEvent) GetEvent() *DeviceEvent { +func (x *TimeQuality) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type SyncStatusEvent struct { +type SyncStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -212,8 +212,8 @@ type SyncStatusEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *SyncStatusEvent) Reset() { - *x = SyncStatusEvent{} +func (x *SyncStatus) Reset() { + *x = SyncStatus{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -221,13 +221,13 @@ func (x *SyncStatusEvent) Reset() { } } -func (x *SyncStatusEvent) String() string { +func (x *SyncStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncStatusEvent) ProtoMessage() {} +func (*SyncStatus) ProtoMessage() {} -func (x *SyncStatusEvent) ProtoReflect() protoreflect.Message { +func (x *SyncStatus) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -239,19 +239,19 @@ func (x *SyncStatusEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncStatusEvent.ProtoReflect.Descriptor instead. -func (*SyncStatusEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncStatus.ProtoReflect.Descriptor instead. +func (*SyncStatus) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{3} } -func (x *SyncStatusEvent) GetEvent() *DeviceEvent { +func (x *SyncStatus) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type PowerEvent struct { +type Power struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -259,8 +259,8 @@ type PowerEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *PowerEvent) Reset() { - *x = PowerEvent{} +func (x *Power) Reset() { + *x = Power{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -268,13 +268,13 @@ func (x *PowerEvent) Reset() { } } -func (x *PowerEvent) String() string { +func (x *Power) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PowerEvent) ProtoMessage() {} +func (*Power) ProtoMessage() {} -func (x *PowerEvent) ProtoReflect() protoreflect.Message { +func (x *Power) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -286,19 +286,19 @@ func (x *PowerEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PowerEvent.ProtoReflect.Descriptor instead. -func (*PowerEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use Power.ProtoReflect.Descriptor instead. +func (*Power) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{4} } -func (x *PowerEvent) GetEvent() *DeviceEvent { +func (x *Power) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type ConfigEvent struct { +type Config struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -306,8 +306,8 @@ type ConfigEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *ConfigEvent) Reset() { - *x = ConfigEvent{} +func (x *Config) Reset() { + *x = Config{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -315,13 +315,13 @@ func (x *ConfigEvent) Reset() { } } -func (x *ConfigEvent) String() string { +func (x *Config) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigEvent) ProtoMessage() {} +func (*Config) ProtoMessage() {} -func (x *ConfigEvent) ProtoReflect() protoreflect.Message { +func (x *Config) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -333,19 +333,19 @@ func (x *ConfigEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigEvent.ProtoReflect.Descriptor instead. -func (*ConfigEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use Config.ProtoReflect.Descriptor instead. +func (*Config) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{5} } -func (x *ConfigEvent) GetEvent() *DeviceEvent { +func (x *Config) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type TriggerEvent struct { +type Trigger struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -353,8 +353,8 @@ type TriggerEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *TriggerEvent) Reset() { - *x = TriggerEvent{} +func (x *Trigger) Reset() { + *x = Trigger{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -362,13 +362,13 @@ func (x *TriggerEvent) Reset() { } } -func (x *TriggerEvent) String() string { +func (x *Trigger) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TriggerEvent) ProtoMessage() {} +func (*Trigger) ProtoMessage() {} -func (x *TriggerEvent) ProtoReflect() protoreflect.Message { +func (x *Trigger) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -380,19 +380,19 @@ func (x *TriggerEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TriggerEvent.ProtoReflect.Descriptor instead. -func (*TriggerEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use Trigger.ProtoReflect.Descriptor instead. +func (*Trigger) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{6} } -func (x *TriggerEvent) GetEvent() *DeviceEvent { +func (x *Trigger) GetEvent() *DeviceEvent { if x != nil { return x.Event } return nil } -type DataErrorEvent struct { +type DataError struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -400,8 +400,8 @@ type DataErrorEvent struct { Event *DeviceEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` //The base device event message } -func (x *DataErrorEvent) Reset() { - *x = DataErrorEvent{} +func (x *DataError) Reset() { + *x = DataError{} if protoimpl.UnsafeEnabled { mi := &file_grid_v1_device_event_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -409,13 +409,13 @@ func (x *DataErrorEvent) Reset() { } } -func (x *DataErrorEvent) String() string { +func (x *DataError) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DataErrorEvent) ProtoMessage() {} +func (*DataError) ProtoMessage() {} -func (x *DataErrorEvent) ProtoReflect() protoreflect.Message { +func (x *DataError) ProtoReflect() protoreflect.Message { mi := &file_grid_v1_device_event_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -427,12 +427,12 @@ func (x *DataErrorEvent) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DataErrorEvent.ProtoReflect.Descriptor instead. -func (*DataErrorEvent) Descriptor() ([]byte, []int) { +// Deprecated: Use DataError.ProtoReflect.Descriptor instead. +func (*DataError) Descriptor() ([]byte, []int) { return file_grid_v1_device_event_proto_rawDescGZIP(), []int{7} } -func (x *DataErrorEvent) GetEvent() *DeviceEvent { +func (x *DataError) GetEvent() *DeviceEvent { if x != nil { return x.Event } @@ -461,36 +461,33 @@ var file_grid_v1_device_event_proto_rawDesc = []byte{ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x45, 0x0a, 0x17, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0a, 0x05, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x40, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x75, + 0x6e, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x0b, 0x54, 0x69, 0x6d, + 0x65, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x3e, - 0x0a, 0x10, 0x54, 0x69, 0x6d, 0x65, 0x51, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x3d, - 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x38, 0x0a, - 0x0a, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x22, 0x3a, 0x0a, 0x0c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x45, 0x76, 0x65, - 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, - 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x3c, - 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x5a, 0x09, - 0x2e, 0x2f, 0x67, 0x72, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x33, + 0x0a, 0x05, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x22, 0x34, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x35, 0x0a, 0x07, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, + 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x22, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x2a, 0x0a, + 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x67, + 0x72, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -507,25 +504,25 @@ func file_grid_v1_device_event_proto_rawDescGZIP() []byte { var file_grid_v1_device_event_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_grid_v1_device_event_proto_goTypes = []interface{}{ - (*DeviceEvent)(nil), // 0: grid.v1.DeviceEvent - (*CommunicationErrorEvent)(nil), // 1: grid.v1.CommunicationErrorEvent - (*TimeQualityEvent)(nil), // 2: grid.v1.TimeQualityEvent - (*SyncStatusEvent)(nil), // 3: grid.v1.SyncStatusEvent - (*PowerEvent)(nil), // 4: grid.v1.PowerEvent - (*ConfigEvent)(nil), // 5: grid.v1.ConfigEvent - (*TriggerEvent)(nil), // 6: grid.v1.TriggerEvent - (*DataErrorEvent)(nil), // 7: grid.v1.DataErrorEvent - (*Event)(nil), // 8: grid.v1.Event + (*DeviceEvent)(nil), // 0: grid.v1.DeviceEvent + (*CommunicationError)(nil), // 1: grid.v1.CommunicationError + (*TimeQuality)(nil), // 2: grid.v1.TimeQuality + (*SyncStatus)(nil), // 3: grid.v1.SyncStatus + (*Power)(nil), // 4: grid.v1.Power + (*Config)(nil), // 5: grid.v1.Config + (*Trigger)(nil), // 6: grid.v1.Trigger + (*DataError)(nil), // 7: grid.v1.DataError + (*Event)(nil), // 8: grid.v1.Event } var file_grid_v1_device_event_proto_depIdxs = []int32{ 8, // 0: grid.v1.DeviceEvent.event:type_name -> grid.v1.Event - 0, // 1: grid.v1.CommunicationErrorEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 2: grid.v1.TimeQualityEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 3: grid.v1.SyncStatusEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 4: grid.v1.PowerEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 5: grid.v1.ConfigEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 6: grid.v1.TriggerEvent.event:type_name -> grid.v1.DeviceEvent - 0, // 7: grid.v1.DataErrorEvent.event:type_name -> grid.v1.DeviceEvent + 0, // 1: grid.v1.CommunicationError.event:type_name -> grid.v1.DeviceEvent + 0, // 2: grid.v1.TimeQuality.event:type_name -> grid.v1.DeviceEvent + 0, // 3: grid.v1.SyncStatus.event:type_name -> grid.v1.DeviceEvent + 0, // 4: grid.v1.Power.event:type_name -> grid.v1.DeviceEvent + 0, // 5: grid.v1.Config.event:type_name -> grid.v1.DeviceEvent + 0, // 6: grid.v1.Trigger.event:type_name -> grid.v1.DeviceEvent + 0, // 7: grid.v1.DataError.event:type_name -> grid.v1.DeviceEvent 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -553,7 +550,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunicationErrorEvent); i { + switch v := v.(*CommunicationError); i { case 0: return &v.state case 1: @@ -565,7 +562,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeQualityEvent); i { + switch v := v.(*TimeQuality); i { case 0: return &v.state case 1: @@ -577,7 +574,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncStatusEvent); i { + switch v := v.(*SyncStatus); i { case 0: return &v.state case 1: @@ -589,7 +586,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PowerEvent); i { + switch v := v.(*Power); i { case 0: return &v.state case 1: @@ -601,7 +598,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigEvent); i { + switch v := v.(*Config); i { case 0: return &v.state case 1: @@ -613,7 +610,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TriggerEvent); i { + switch v := v.(*Trigger); i { case 0: return &v.state case 1: @@ -625,7 +622,7 @@ func file_grid_v1_device_event_proto_init() { } } file_grid_v1_device_event_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataErrorEvent); i { + switch v := v.(*DataError); i { case 0: return &v.state case 1: diff --git a/pkg/grid/v1/topology.pb.go b/pkg/grid/v1/topology.pb.go index 20c61a7..0f429f0 100644 --- a/pkg/grid/v1/topology.pb.go +++ b/pkg/grid/v1/topology.pb.go @@ -78,6 +78,214 @@ func (x *Topology) GetTp() []byte { return nil } +// A topology Node information. +// To be used in ComputedTopology message. +type TopologicalNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TerminalIds []string `protobuf:"bytes,1,rep,name=TerminalIds,proto3" json:"TerminalIds,omitempty"` //The list of Terminal ids in the TopologicalNode. + ConnectivityNodeIds []string `protobuf:"bytes,2,rep,name=ConnectivityNodeIds,proto3" json:"ConnectivityNodeIds,omitempty"` //The list of ConnectivityNode ids in the TopologicalNode. + PowerTransferEndIds []string `protobuf:"bytes,3,rep,name=PowerTransferEndIds,proto3" json:"PowerTransferEndIds,omitempty"` //The list of PowerTransferEnd ids in the TopologicalNode. + ConnectivityNodeContainerId string `protobuf:"bytes,4,opt,name=ConnectivityNodeContainerId,proto3" json:"ConnectivityNodeContainerId,omitempty"` //The id of the ConnectivityNodeContainer in the TopologicalNode. + BaseVoltageId string `protobuf:"bytes,5,opt,name=BaseVoltageId,proto3" json:"BaseVoltageId,omitempty"` //The id of the BaseVoltage in the TopologicalNode. + BaseVoltage float64 `protobuf:"fixed64,6,opt,name=BaseVoltage,proto3" json:"BaseVoltage,omitempty"` //The BaseVoltage in the TopologicalNode. +} + +func (x *TopologicalNode) Reset() { + *x = TopologicalNode{} + if protoimpl.UnsafeEnabled { + mi := &file_grid_v1_topology_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopologicalNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopologicalNode) ProtoMessage() {} + +func (x *TopologicalNode) ProtoReflect() protoreflect.Message { + mi := &file_grid_v1_topology_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopologicalNode.ProtoReflect.Descriptor instead. +func (*TopologicalNode) Descriptor() ([]byte, []int) { + return file_grid_v1_topology_proto_rawDescGZIP(), []int{1} +} + +func (x *TopologicalNode) GetTerminalIds() []string { + if x != nil { + return x.TerminalIds + } + return nil +} + +func (x *TopologicalNode) GetConnectivityNodeIds() []string { + if x != nil { + return x.ConnectivityNodeIds + } + return nil +} + +func (x *TopologicalNode) GetPowerTransferEndIds() []string { + if x != nil { + return x.PowerTransferEndIds + } + return nil +} + +func (x *TopologicalNode) GetConnectivityNodeContainerId() string { + if x != nil { + return x.ConnectivityNodeContainerId + } + return "" +} + +func (x *TopologicalNode) GetBaseVoltageId() string { + if x != nil { + return x.BaseVoltageId + } + return "" +} + +func (x *TopologicalNode) GetBaseVoltage() float64 { + if x != nil { + return x.BaseVoltage + } + return 0 +} + +// A topology Island information. +// To be used in ComputedTopology message. +type TopologicalIsland struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TopologicalNodeIds []string `protobuf:"bytes,1,rep,name=TopologicalNodeIds,proto3" json:"TopologicalNodeIds,omitempty"` //The list of TopologicalNode ids in the TopologicalIsland. +} + +func (x *TopologicalIsland) Reset() { + *x = TopologicalIsland{} + if protoimpl.UnsafeEnabled { + mi := &file_grid_v1_topology_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TopologicalIsland) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TopologicalIsland) ProtoMessage() {} + +func (x *TopologicalIsland) ProtoReflect() protoreflect.Message { + mi := &file_grid_v1_topology_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TopologicalIsland.ProtoReflect.Descriptor instead. +func (*TopologicalIsland) Descriptor() ([]byte, []int) { + return file_grid_v1_topology_proto_rawDescGZIP(), []int{2} +} + +func (x *TopologicalIsland) GetTopologicalNodeIds() []string { + if x != nil { + return x.TopologicalNodeIds + } + return nil +} + +// A processed topology information. +// Headers used in rabbitMQ: +// `id` (string): id of the `Topology` +// `type` (string): always `ComputedTopology` +// `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset. +// `timestampId` (int64): related measurement Unix msec timestamp (if any) +// `subnetworkId` (string): the sub network id for which the topology was computed +type ComputedTopology struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + EqId string `protobuf:"bytes,1,opt,name=eqId,proto3" json:"eqId,omitempty"` //The id of the EQ file used. + TopologicalNodes map[string]*TopologicalNode `protobuf:"bytes,2,rep,name=topologicalNodes,proto3" json:"topologicalNodes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //The map of TopologicalNodes in the Topology. + TopologicalIslands map[string]*TopologicalIsland `protobuf:"bytes,3,rep,name=topologicalIslands,proto3" json:"topologicalIslands,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //The map of TopologicalIslands in the Topology. +} + +func (x *ComputedTopology) Reset() { + *x = ComputedTopology{} + if protoimpl.UnsafeEnabled { + mi := &file_grid_v1_topology_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputedTopology) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputedTopology) ProtoMessage() {} + +func (x *ComputedTopology) ProtoReflect() protoreflect.Message { + mi := &file_grid_v1_topology_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputedTopology.ProtoReflect.Descriptor instead. +func (*ComputedTopology) Descriptor() ([]byte, []int) { + return file_grid_v1_topology_proto_rawDescGZIP(), []int{3} +} + +func (x *ComputedTopology) GetEqId() string { + if x != nil { + return x.EqId + } + return "" +} + +func (x *ComputedTopology) GetTopologicalNodes() map[string]*TopologicalNode { + if x != nil { + return x.TopologicalNodes + } + return nil +} + +func (x *ComputedTopology) GetTopologicalIslands() map[string]*TopologicalIsland { + if x != nil { + return x.TopologicalIslands + } + return nil +} + var File_grid_v1_topology_proto protoreflect.FileDescriptor var file_grid_v1_topology_proto_rawDesc = []byte{ @@ -86,8 +294,58 @@ var file_grid_v1_topology_proto_rawDesc = []byte{ 0x31, 0x22, 0x38, 0x0a, 0x08, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x74, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x70, 0x42, 0x0b, 0x5a, 0x09, 0x2e, - 0x2f, 0x67, 0x72, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x74, 0x70, 0x22, 0xa1, 0x02, 0x0a, 0x0f, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x49, 0x64, + 0x73, 0x12, 0x30, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, + 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x73, 0x12, 0x30, 0x0a, 0x13, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x13, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x45, + 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x40, 0x0a, 0x1b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x42, 0x61, 0x73, 0x65, 0x56, + 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x42, 0x61, 0x73, 0x65, 0x56, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, + 0x0b, 0x42, 0x61, 0x73, 0x65, 0x56, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x01, 0x52, 0x0b, 0x42, 0x61, 0x73, 0x65, 0x56, 0x6f, 0x6c, 0x74, 0x61, 0x67, 0x65, 0x22, + 0x43, 0x0a, 0x11, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, + 0x6c, 0x61, 0x6e, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, + 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x73, 0x22, 0xa8, 0x03, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x71, 0x49, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x71, 0x49, 0x64, 0x12, 0x5b, 0x0a, + 0x10, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x79, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, + 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x12, 0x74, 0x6f, + 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, + 0x79, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, 0x6c, + 0x61, 0x6e, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x74, 0x6f, 0x70, 0x6f, 0x6c, + 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, 0x6c, 0x61, 0x6e, 0x64, 0x73, 0x1a, 0x5d, 0x0a, + 0x15, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x4e, 0x6f, 0x64, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x61, 0x0a, 0x17, + 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, 0x6c, 0x61, 0x6e, + 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x49, 0x73, + 0x6c, 0x61, 0x6e, 0x64, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, + 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x67, 0x72, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -102,16 +360,25 @@ func file_grid_v1_topology_proto_rawDescGZIP() []byte { return file_grid_v1_topology_proto_rawDescData } -var file_grid_v1_topology_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_grid_v1_topology_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_grid_v1_topology_proto_goTypes = []interface{}{ - (*Topology)(nil), // 0: grid.v1.Topology + (*Topology)(nil), // 0: grid.v1.Topology + (*TopologicalNode)(nil), // 1: grid.v1.TopologicalNode + (*TopologicalIsland)(nil), // 2: grid.v1.TopologicalIsland + (*ComputedTopology)(nil), // 3: grid.v1.ComputedTopology + nil, // 4: grid.v1.ComputedTopology.TopologicalNodesEntry + nil, // 5: grid.v1.ComputedTopology.TopologicalIslandsEntry } var file_grid_v1_topology_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 4, // 0: grid.v1.ComputedTopology.topologicalNodes:type_name -> grid.v1.ComputedTopology.TopologicalNodesEntry + 5, // 1: grid.v1.ComputedTopology.topologicalIslands:type_name -> grid.v1.ComputedTopology.TopologicalIslandsEntry + 1, // 2: grid.v1.ComputedTopology.TopologicalNodesEntry.value:type_name -> grid.v1.TopologicalNode + 2, // 3: grid.v1.ComputedTopology.TopologicalIslandsEntry.value:type_name -> grid.v1.TopologicalIsland + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_grid_v1_topology_proto_init() } @@ -132,6 +399,42 @@ func file_grid_v1_topology_proto_init() { return nil } } + file_grid_v1_topology_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopologicalNode); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grid_v1_topology_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TopologicalIsland); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_grid_v1_topology_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComputedTopology); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -139,7 +442,7 @@ func file_grid_v1_topology_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_grid_v1_topology_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/platform/v1/task.pb.go b/pkg/platform/v1/task.pb.go index 6d9f112..a1c0100 100644 --- a/pkg/platform/v1/task.pb.go +++ b/pkg/platform/v1/task.pb.go @@ -15,6 +15,7 @@ package v1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" reflect "reflect" sync "sync" ) @@ -144,8 +145,8 @@ type Parameter struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //The parameter name - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` //The parameter value + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //The parameter name + Value *anypb.Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` //The parameter value } func (x *Parameter) Reset() { @@ -187,11 +188,11 @@ func (x *Parameter) GetName() string { return "" } -func (x *Parameter) GetValue() string { +func (x *Parameter) GetValue() *anypb.Any { if x != nil { return x.Value } - return "" + return nil } type Task struct { @@ -333,58 +334,61 @@ var File_platform_v1_task_proto protoreflect.FileDescriptor var file_platform_v1_task_proto_rawDesc = []byte{ 0x0a, 0x16, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x22, 0x35, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, 0x0a, - 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x31, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, - 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xc9, - 0x01, 0x0a, 0x0c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x49, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2a, 0x81, 0x01, 0x0a, 0x08, 0x54, - 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x41, 0x53, 0x4b, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, - 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, - 0x47, 0x59, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, 0x53, - 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x04, 0x2a, 0xf7, - 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x8f, 0x01, + 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x31, 0x0a, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6c, + 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, + 0xc9, 0x01, 0x0a, 0x0c, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x49, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, + 0x72, 0x6d, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, + 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2a, 0x81, 0x01, 0x0a, 0x08, + 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x41, 0x53, 0x4b, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, + 0x12, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x50, 0x4f, 0x4c, + 0x4f, 0x47, 0x59, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x41, + 0x53, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x04, 0x2a, + 0xf7, 0x01, 0x0a, 0x10, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x4e, 0x4f, 0x54, 0x49, 0x46, + 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, + 0x41, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, + 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, + 0x48, 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, - 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, 0x4e, - 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x48, - 0x4f, 0x52, 0x54, 0x10, 0x02, 0x12, 0x29, 0x0a, 0x25, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x03, - 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x10, 0x04, 0x12, - 0x27, 0x0a, 0x23, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x43, 0x4f, - 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, + 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x10, 0x04, + 0x12, 0x27, 0x0a, 0x23, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x4f, 0x50, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x5f, 0x43, + 0x4f, 0x4d, 0x50, 0x55, 0x54, 0x45, 0x44, 0x10, 0x05, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -407,17 +411,19 @@ var file_platform_v1_task_proto_goTypes = []interface{}{ (*Parameter)(nil), // 2: platform.v1.Parameter (*Task)(nil), // 3: platform.v1.Task (*Notification)(nil), // 4: platform.v1.Notification + (*anypb.Any)(nil), // 5: google.protobuf.Any } var file_platform_v1_task_proto_depIdxs = []int32{ - 0, // 0: platform.v1.Task.taskType:type_name -> platform.v1.TaskType - 2, // 1: platform.v1.Task.parameters:type_name -> platform.v1.Parameter - 1, // 2: platform.v1.Notification.notificationType:type_name -> platform.v1.NotificationType - 2, // 3: platform.v1.Notification.parameters:type_name -> platform.v1.Parameter - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 5, // 0: platform.v1.Parameter.value:type_name -> google.protobuf.Any + 0, // 1: platform.v1.Task.taskType:type_name -> platform.v1.TaskType + 2, // 2: platform.v1.Task.parameters:type_name -> platform.v1.Parameter + 1, // 3: platform.v1.Notification.notificationType:type_name -> platform.v1.NotificationType + 2, // 4: platform.v1.Notification.parameters:type_name -> platform.v1.Parameter + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_platform_v1_task_proto_init() } diff --git a/proto/grid/v1/topology.proto b/proto/grid/v1/topology.proto index b8028ef..68c1e91 100644 --- a/proto/grid/v1/topology.proto +++ b/proto/grid/v1/topology.proto @@ -20,3 +20,36 @@ message Topology { int64 createdAt = 1; // The time of creation of the topology data (Unix msec timestamp). bytes tp = 2; // The TP profile file serialized as bytes. } + +/* A topology Node information. +* To be used in ComputedTopology message. +*/ +message TopologicalNode{ + repeated string TerminalIds = 1; //The list of Terminal ids in the TopologicalNode. + repeated string ConnectivityNodeIds = 2; //The list of ConnectivityNode ids in the TopologicalNode. + repeated string PowerTransferEndIds = 3; //The list of PowerTransferEnd ids in the TopologicalNode. + string ConnectivityNodeContainerId = 4; //The id of the ConnectivityNodeContainer in the TopologicalNode. + string BaseVoltageId = 5; //The id of the BaseVoltage in the TopologicalNode. + double BaseVoltage = 6; //The BaseVoltage in the TopologicalNode. +} + +/* A topology Island information. +* To be used in ComputedTopology message. +*/ +message TopologicalIsland{ + repeated string TopologicalNodeIds = 1; //The list of TopologicalNode ids in the TopologicalIsland. +} + +/* A processed topology information. +Headers used in rabbitMQ: +* `id` (string): id of the `Topology` +* `type` (string): always `ComputedTopology` +* `producerId` (string): the id of the producer (e.g. a PMU) linked to the dataset. +* `timestampId` (int64): related measurement Unix msec timestamp (if any) +* `subnetworkId` (string): the sub network id for which the topology was computed +*/ +message ComputedTopology{ + string eqId = 1; //The id of the EQ file used. + map topologicalNodes = 2; //The map of TopologicalNodes in the Topology. + map topologicalIslands = 3; //The map of TopologicalIslands in the Topology. +} \ No newline at end of file diff --git a/proto/platform/v1/task.proto b/proto/platform/v1/task.proto index a2a6462..b2670d9 100644 --- a/proto/platform/v1/task.proto +++ b/proto/platform/v1/task.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/any.proto"; + /* Messages to support coordination among processes/services in the platform. At the time being this is a proof of concept. Different changes may occurs @@ -34,7 +36,7 @@ enum NotificationType { message Parameter { string name = 1; //The parameter name - string value = 2; //The parameter value + google.protobuf.Any value = 2; //The parameter value } /* A task message. From 5c32230fe25b2a4b1b574eaee1d7e0037528d368 Mon Sep 17 00:00:00 2001 From: cosimomeli Date: Thu, 15 Feb 2024 10:05:03 +0100 Subject: [PATCH 2/5] Fix event_name --- .github/workflows/golang.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golang.yaml b/.github/workflows/golang.yaml index 227f1b2..7946686 100644 --- a/.github/workflows/golang.yaml +++ b/.github/workflows/golang.yaml @@ -21,11 +21,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request_target' }} with: ref: ${{github.event.pull_request.head.ref}} - uses: actions/checkout@v4 - if: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request_target' }} - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - uses: bufbuild/buf-setup-action@v1 - uses: bufbuild/buf-lint-action@v1 From 1abd7d22787fffae4a7fb120dd9cad153db70d3e Mon Sep 17 00:00:00 2001 From: cosimomeli Date: Thu, 15 Feb 2024 10:27:55 +0100 Subject: [PATCH 3/5] Use startsWith --- .github/workflows/golang.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golang.yaml b/.github/workflows/golang.yaml index 7946686..108e7cf 100644 --- a/.github/workflows/golang.yaml +++ b/.github/workflows/golang.yaml @@ -21,11 +21,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - if: ${{ github.event_name == 'pull_request_target' }} + if: ${{ startsWith(github.event_name, 'pull_request') }} with: ref: ${{github.event.pull_request.head.ref}} - uses: actions/checkout@v4 - if: ${{ github.event_name != 'pull_request_target' }} + if: ${{ !startsWith(github.event_name, 'pull_request') }} - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - uses: bufbuild/buf-setup-action@v1 - uses: bufbuild/buf-lint-action@v1 From 80caa55bf958876bb5923fd92ab8f03113e64dbb Mon Sep 17 00:00:00 2001 From: Cosimo Meli Date: Thu, 15 Feb 2024 11:02:50 +0100 Subject: [PATCH 4/5] Empty commit From b11a4d03e1445520e3e8e84d67c2fa90498fe00b Mon Sep 17 00:00:00 2001 From: chicco785 Date: Mon, 19 Feb 2024 10:47:59 +0000 Subject: [PATCH 5/5] docs(release_notes): update RELEASE_NOTES.md --- RELEASE_NOTES.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1577c69..77ea3de 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,10 @@ # ProtoBuf Release Notes -## 0.0.4-dev - 2024-02-13 +## 0.0.4-dev - 2024-02-19 + +### Features + +- Topology protobuf and any notification params (PR #39 by @hiimjako) ### Continuous Integration