Skip to content

Commit c41109f

Browse files
follesoeclaude
andcommitted
Add SystemPerformanceInfo for comprehensive compute platform telemetry
Add new protocol messages to support detailed performance monitoring across both iMX6 (X3) and Jetson Orin NX (X3 Ultra/X7) platforms. New messages: CpuCoreLoad, GpuInfo, DlaInfo, MemoryInfo, ThermalZone, VideoCodecInfo, PowerRailInfo, and a composite SystemPerformanceInfo with corresponding SystemPerformanceInfoTel telemetry wrapper. Deprecates CPUInfo, CPUTemperature in favor of the new messages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 50a286b commit c41109f

File tree

2 files changed

+94
-3
lines changed

2 files changed

+94
-3
lines changed

protobuf_definitions/message_formats.proto

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ message WaterTemperature {
256256
float value = 1; // Water temperature (°C).
257257
}
258258

259-
// CPU temperature.
259+
// CPU temperature (deprecated, use SystemPerformanceInfo.thermal_zones instead).
260260
message CPUTemperature {
261261
float value = 1; // CPU temperature (°C).
262262
}
@@ -1286,7 +1286,7 @@ message PersistentStorageSettings {
12861286
bool acc_calibration = 9; // Indicates if accelerometer calibration data should be written to the data partition.
12871287
}
12881288

1289-
// CPU information.
1289+
// CPU information (deprecated, use SystemPerformanceInfo instead).
12901290
//
12911291
// Contains information about the CPU load and memory usage of the drone.
12921292
message CPUInfo {
@@ -1297,6 +1297,89 @@ message CPUInfo {
12971297
float comm_queue_load = 5; // Communication queue load (0..1).
12981298
}
12991299

1300+
// Per-core CPU utilization.
1301+
message CpuCoreLoad {
1302+
uint32 core_index = 1; // Core index (0-based).
1303+
float load = 2; // Core load (0..1).
1304+
float frequency_mhz = 3; // Current clock frequency (MHz).
1305+
}
1306+
1307+
// GPU utilization and status.
1308+
message GpuInfo {
1309+
float load = 1; // GPU load (0..1).
1310+
float frequency_mhz = 2; // Current GPU clock frequency (MHz).
1311+
float temperature = 3; // GPU temperature (°C).
1312+
}
1313+
1314+
// Deep Learning Accelerator (DLA) utilization.
1315+
//
1316+
// Jetson Orin NX has two DLA engines used for inference offload.
1317+
message DlaInfo {
1318+
uint32 engine_index = 1; // DLA engine index (0-based).
1319+
float load = 2; // DLA engine load (0..1).
1320+
float frequency_mhz = 3; // Current DLA clock frequency (MHz).
1321+
}
1322+
1323+
// System memory information.
1324+
message MemoryInfo {
1325+
uint64 total_bytes = 1; // Total RAM (bytes).
1326+
uint64 used_bytes = 2; // Used RAM (bytes).
1327+
uint64 cached_bytes = 3; // Cached RAM (bytes).
1328+
uint64 swap_total_bytes = 4; // Total swap (bytes).
1329+
uint64 swap_used_bytes = 5; // Used swap (bytes).
1330+
}
1331+
1332+
// Thermal zone identifiers.
1333+
enum ThermalZoneId {
1334+
THERMAL_ZONE_ID_UNSPECIFIED = 0; // Unspecified thermal zone.
1335+
THERMAL_ZONE_ID_CPU = 1; // CPU thermal zone.
1336+
THERMAL_ZONE_ID_GPU = 2; // GPU thermal zone.
1337+
THERMAL_ZONE_ID_SOC = 3; // System-on-chip thermal zone.
1338+
THERMAL_ZONE_ID_BOARD = 4; // Board thermal zone.
1339+
THERMAL_ZONE_ID_TJ = 5; // Junction temperature (Tj).
1340+
}
1341+
1342+
// Thermal zone reading.
1343+
message ThermalZone {
1344+
ThermalZoneId zone = 1; // Thermal zone identifier.
1345+
float temperature = 2; // Temperature (°C).
1346+
}
1347+
1348+
// Video codec engine utilization.
1349+
message VideoCodecInfo {
1350+
float encoder_load = 1; // Video encoder load (0..1).
1351+
float decoder_load = 2; // Video decoder load (0..1).
1352+
}
1353+
1354+
// Power rail measurement.
1355+
//
1356+
// Reports voltage, current, and power from INA sensor rails.
1357+
message PowerRailInfo {
1358+
string name = 1; // Rail name (e.g. "VDD_CPU", "VDD_GPU", "VDD_SOC", "VDD_IN").
1359+
float voltage_mv = 2; // Voltage (mV).
1360+
float current_ma = 3; // Current (mA).
1361+
float power_mw = 4; // Power (mW).
1362+
}
1363+
1364+
// System performance information.
1365+
//
1366+
// Comprehensive performance metrics for the drone's compute platform.
1367+
// Covers CPU, GPU, DLA, memory, thermals, power, and video codec utilization.
1368+
// Fields not applicable to a platform are left at their zero/empty defaults.
1369+
message SystemPerformanceInfo {
1370+
repeated CpuCoreLoad cpu_cores = 1; // Per-core CPU utilization.
1371+
float cpu_load_average = 2; // Overall CPU load (0..1).
1372+
GpuInfo gpu = 3; // GPU utilization.
1373+
repeated DlaInfo dla_engines = 4; // DLA engine utilization (Jetson only).
1374+
MemoryInfo memory = 5; // RAM and swap usage.
1375+
repeated ThermalZone thermal_zones = 6; // All thermal zone readings.
1376+
repeated PowerRailInfo power_rails = 7; // Power rail measurements (Jetson only).
1377+
VideoCodecInfo video_codec = 8; // Video encoder/decoder load (Jetson only).
1378+
float main_queue_load = 9; // Main queue load (0..1).
1379+
float guestport_queue_load = 10; // Guestport queue load (0..1).
1380+
float comm_queue_load = 11; // Communication queue load (0..1).
1381+
}
1382+
13001383
// Surface Unit battery information.
13011384
//
13021385
// This message is published by the Surface Unit, and re-published by

protobuf_definitions/telemetry.proto

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,19 @@ message MultibeamDiscoveryTel {
295295
MultibeamDiscovery discovery = 1; // Discovery data from a multibeam sonar.
296296
}
297297

298-
// Information about cpu and memory usage.
298+
// Information about cpu and memory usage (deprecated, use SystemPerformanceInfoTel instead).
299299
message CPUInfoTel {
300300
CPUInfo cpu_info = 1; // CPU information.
301301
}
302302

303+
// System performance telemetry message.
304+
//
305+
// Comprehensive performance metrics including per-core CPU, GPU, DLA,
306+
// memory, thermals, power rails, and video codec utilization.
307+
message SystemPerformanceInfoTel {
308+
SystemPerformanceInfo system_performance_info = 1; // System performance information.
309+
}
310+
303311
// Surface Unit telemetry message.
304312
message SurfaceUnitTel {
305313
SurfaceUnitBatteryInfo battery_info = 1; // Battery information.

0 commit comments

Comments
 (0)