RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
org.wpilib.internal.UnitTelemetry Class Reference

Static Public Member Functions

static String getUnitMetadata (Unit unit)
static String getUnitMetadata (String unitSymbol)
static void log (TelemetryTable table, String name, Measure<?> value)
static void log (TelemetryTable table, String name, double value, Unit unit)
static void log (TelemetryTable table, String name, double value, String unitSymbol)
static void log (TelemetryTable table, String name, int value, Unit unit)
static void log (TelemetryTable table, String name, long value, Unit unit)

Detailed Description

Utility functions for logging unit-bearing values to telemetry.

Definition at line 16 of file UnitTelemetry.java.

Member Function Documentation

◆ getUnitMetadata() [1/2]

String org.wpilib.internal.UnitTelemetry.getUnitMetadata ( String unitSymbol)
static

Returns JSON-encoded unit metadata for the given unit symbol.

The returned string is suitable for use as the unit telemetry property value.

Parameters
unitSymbolunit symbol
Returns
JSON-encoded unit metadata

Definition at line 53 of file UnitTelemetry.java.

◆ getUnitMetadata() [2/2]

String org.wpilib.internal.UnitTelemetry.getUnitMetadata ( Unit unit)
static

Returns JSON-encoded unit metadata for the given unit.

The returned string is suitable for use as the unit telemetry property value.

Parameters
unitunit
Returns
JSON-encoded unit metadata

Definition at line 33 of file UnitTelemetry.java.

◆ log() [1/5]

void org.wpilib.internal.UnitTelemetry.log ( TelemetryTable table,
String name,
double value,
String unitSymbol )
static

Logs a double value with unit metadata.

Parameters
tabletelemetry table
nameentry name
valuevalue in the given unit
unitSymbolunit symbol

Definition at line 103 of file UnitTelemetry.java.

◆ log() [2/5]

void org.wpilib.internal.UnitTelemetry.log ( TelemetryTable table,
String name,
double value,
Unit unit )
static

Logs a double value with unit metadata.

This logs the value in terms of the given unit's base unit.

Parameters
tabletelemetry table
nameentry name
valuevalue in the given unit
unitvalue unit

Definition at line 90 of file UnitTelemetry.java.

◆ log() [3/5]

void org.wpilib.internal.UnitTelemetry.log ( TelemetryTable table,
String name,
int value,
Unit unit )
static

Logs an int value with unit metadata.

This logs the value in terms of the given unit's base unit.

Parameters
tabletelemetry table
nameentry name
valuevalue in the given unit
unitvalue unit

Definition at line 118 of file UnitTelemetry.java.

◆ log() [4/5]

void org.wpilib.internal.UnitTelemetry.log ( TelemetryTable table,
String name,
long value,
Unit unit )
static

Logs a long value with unit metadata.

This logs the value in terms of the given unit's base unit.

Parameters
tabletelemetry table
nameentry name
valuevalue in the given unit
unitvalue unit

Definition at line 132 of file UnitTelemetry.java.

◆ log() [5/5]

void org.wpilib.internal.UnitTelemetry.log ( TelemetryTable table,
String name,
Measure<?> value )
static

Logs a measure with unit metadata.

This logs the measure in terms of its base unit.

Parameters
tabletelemetry table
nameentry name
valuemeasure value

Definition at line 74 of file UnitTelemetry.java.


The documentation for this class was generated from the following file: