@@ -76,36 +76,63 @@ enum CommunicationComponentDiagnosticCode {
7676 // Hardware fault due to overheating.
7777 COMMUNICATION_COMPONENT_DIAGNOSTIC_CODE_OVER_TEMPERATURE = 8 ;
7878}
79+ // `CommunicationComponentCategory` enumerates possible types of communication
80+ // components within the microgrid.
81+ //
82+ // Categories help distinguish communication devices according to their roles,
83+ // capabilities, and protocols they handle within the microgrid infrastructure.
84+ enum CommunicationComponentCategory {
85+ // Unspecified communication component category.
86+ //
87+ // !!! caution
88+ // This default value should never be used explicitly and indicates that
89+ // the category has not been properly defined.
90+ COMMUNICATION_COMPONENT_CATEGORY_UNSPECIFIED = 0 ;
7991
80- // A single snapshot of a communication component's state, diagnostics, and timing.
92+ // Modbus Gateway used for protocol translation and managing Modbus
93+ // communication.
94+ COMMUNICATION_COMPONENT_CATEGORY_MODBUS_GATEWAY = 1 ;
95+
96+ // LTE Router providing cellular connectivity (LTE, 4G, 5G) for the microgrid.
97+ COMMUNICATION_COMPONENT_CATEGORY_ROUTER = 2 ;
98+
99+ // Ethernet Switch enabling wired network connections within the microgrid.
100+ COMMUNICATION_COMPONENT_CATEGORY_ETHERNET_SWITCH = 3 ;
101+
102+ // Digital Input/Output (DIO) Gateway enabling communication and control
103+ // of digital signals between microgrid devices.
104+ COMMUNICATION_COMPONENT_CATEGORY_DIO_GATEWAY = 4 ;
105+
106+ // Programmable Logic Controller (PLC) used for automation tasks,
107+ // process control, and operational logic in the microgrid.
108+ COMMUNICATION_COMPONENT_CATEGORY_PLC = 5 ;
109+
110+ // Serial Gateway (RS-232, RS-485, etc.) facilitating serial communication
111+ // between legacy equipment and modern network infrastructures.
112+ COMMUNICATION_COMPONENT_CATEGORY_SERIAL_GATEWAY = 6 ;
113+ }
114+
115+ // `CommunicationComponent` represents a communication component within a
116+ // microgrid.
81117//
82- // !!! note "snapshot semantics"
83- // all fields in this message represent the component's view at one point
84- // in time, so there is only a single `snapshot_time`. any parallel reads
85- // happening to produce this data are collapsed under that timestamp.
86- message CommunicationComponentStateSnapshot {
87- // the utc time when this snapshot was taken.
88- google.protobuf.Timestamp snapshot_time = 1 ;
118+ // Communication components are networked devices responsible for enabling
119+ // communication between electrical components, sensors, controllers, and other
120+ // network devices.
121+ message CommunicationComponent {
122+ // Unique identifier of the communication component.
123+ uint64 id = 1 ;
89124
90- // one or more high-level state codes active at snapshot_time.
91- //
92- // !!! note
93- // typical usage is a single state (e.g., online), but multiple may
94- // apply (e.g., connecting + degraded) if that makes sense.
95- repeated CommunicationComponentStateCode states = 2 ;
125+ // Unique identifier of the parent microgrid.
126+ uint64 microgrid_id = 2 ;
96127
97- // non-critical warnings detected for the component.
98- //
99- // !!! note
100- // warnings may coexist with an online state, indicating potential
101- // issues that do not prevent basic operation.
102- repeated CommunicationComponentDiagnostic warnings = 3 ;
128+ // Human-readable name of the communication component.
129+ string name = 3 ;
103130
104- // critical errors currently affecting the component.
105- //
106- // !!! note
107- // an error state code should accompany entries here .
108- repeated CommunicationComponentDiagnostic errors = 4 ;
131+ // Category identifying the type of the communication component.
132+ CommunicationComponentCategory category = 4 ;
133+
134+ // List of IP addresses assigned to this communication component .
135+ repeated string ip_addresses = 5 ;
109136}
110137
111138// Represents an error or warning condition reported by a microgrid
@@ -139,61 +166,34 @@ message CommunicationComponentDiagnostic {
139166 string message = 3 ;
140167}
141168
142- // `CommunicationComponent` represents a communication component within a
143- // microgrid.
169+ // A single snapshot of a communication component's state, diagnostics, and timing.
144170//
145- // Communication components are networked devices responsible for enabling
146- // communication between electrical components, sensors, controllers, and other
147- // network devices.
148- message CommunicationComponent {
149- // Unique identifier of the communication component.
150- uint64 id = 1 ;
151-
152- // Unique identifier of the parent microgrid.
153- uint64 microgrid_id = 2 ;
154-
155- // Human-readable name of the communication component.
156- string name = 3 ;
157-
158- // Category identifying the type of the communication component.
159- CommunicationComponentCategory category = 4 ;
160-
161- // List of IP addresses assigned to this communication component.
162- repeated string ip_addresses = 5 ;
163- }
171+ // !!! note "snapshot semantics"
172+ // all fields in this message represent the component's view at one point
173+ // in time, so there is only a single `snapshot_time`. any parallel reads
174+ // happening to produce this data are collapsed under that timestamp.
175+ message CommunicationComponentStateSnapshot {
176+ // the utc time when this snapshot was taken.
177+ google.protobuf.Timestamp snapshot_time = 1 ;
164178
165- // `CommunicationComponentCategory` enumerates possible types of communication
166- // components within the microgrid.
167- //
168- // Categories help distinguish communication devices according to their roles,
169- // capabilities, and protocols they handle within the microgrid infrastructure.
170- enum CommunicationComponentCategory {
171- // Unspecified communication component category.
179+ // one or more high-level state codes active at snapshot_time.
172180 //
173- // !!! caution
174- // This default value should never be used explicitly and indicates that
175- // the category has not been properly defined.
176- COMMUNICATION_COMPONENT_CATEGORY_UNSPECIFIED = 0 ;
177-
178- // Modbus Gateway used for protocol translation and managing Modbus
179- // communication.
180- COMMUNICATION_COMPONENT_CATEGORY_MODBUS_GATEWAY = 1 ;
181-
182- // LTE Router providing cellular connectivity (LTE, 4G, 5G) for the microgrid.
183- COMMUNICATION_COMPONENT_CATEGORY_ROUTER = 2 ;
184-
185- // Ethernet Switch enabling wired network connections within the microgrid.
186- COMMUNICATION_COMPONENT_CATEGORY_ETHERNET_SWITCH = 3 ;
187-
188- // Digital Input/Output (DIO) Gateway enabling communication and control
189- // of digital signals between microgrid devices.
190- COMMUNICATION_COMPONENT_CATEGORY_DIO_GATEWAY = 4 ;
181+ // !!! note
182+ // typical usage is a single state (e.g., online), but multiple may
183+ // apply (e.g., connecting + degraded) if that makes sense.
184+ repeated CommunicationComponentStateCode states = 2 ;
191185
192- // Programmable Logic Controller (PLC) used for automation tasks,
193- // process control, and operational logic in the microgrid.
194- COMMUNICATION_COMPONENT_CATEGORY_PLC = 5 ;
186+ // non-critical warnings detected for the component.
187+ //
188+ // !!! note
189+ // warnings may coexist with an online state, indicating potential
190+ // issues that do not prevent basic operation.
191+ repeated CommunicationComponentDiagnostic warnings = 3 ;
195192
196- // Serial Gateway (RS-232, RS-485, etc.) facilitating serial communication
197- // between legacy equipment and modern network infrastructures.
198- COMMUNICATION_COMPONENT_CATEGORY_SERIAL_GATEWAY = 6 ;
193+ // critical errors currently affecting the component.
194+ //
195+ // !!! note
196+ // an error state code should accompany entries here.
197+ repeated CommunicationComponentDiagnostic errors = 4 ;
199198}
199+
0 commit comments