Class UnitTelemetry
java.lang.Object
org.wpilib.internal.UnitTelemetry
Utility functions for logging unit-bearing values to telemetry.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetUnitMetadata(String unitSymbol) Returns JSON-encoded unit metadata for the given unit symbol.static StringgetUnitMetadata(Unit unit) Returns JSON-encoded unit metadata for the given unit.static voidlog(TelemetryTable table, String name, double value, String unitSymbol) Logs a double value with unit metadata.static voidlog(TelemetryTable table, String name, double value, Unit unit) Logs a double value with unit metadata.static voidlog(TelemetryTable table, String name, int value, Unit unit) Logs an int value with unit metadata.static voidlog(TelemetryTable table, String name, long value, Unit unit) Logs a long value with unit metadata.static voidlog(TelemetryTable table, String name, Measure<?> value) Logs a measure with unit metadata.
-
Method Details
-
getUnitMetadata
-
getUnitMetadata
-
log
Logs a measure with unit metadata.This logs the measure in terms of its base unit.
- Parameters:
table- telemetry tablename- entry namevalue- measure value
-
log
Logs a double value with unit metadata.This logs the value in terms of the given unit's base unit.
- Parameters:
table- telemetry tablename- entry namevalue- value in the given unitunit- value unit
-
log
Logs a double value with unit metadata.- Parameters:
table- telemetry tablename- entry namevalue- value in the given unitunitSymbol- unit symbol
-
log
Logs an int value with unit metadata.This logs the value in terms of the given unit's base unit.
- Parameters:
table- telemetry tablename- entry namevalue- value in the given unitunit- value unit
-
log
Logs a long value with unit metadata.This logs the value in terms of the given unit's base unit.
- Parameters:
table- telemetry tablename- entry namevalue- value in the given unitunit- value unit
-