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

Classes

interface  TypeHandler

Static Public Member Functions

static void setReportWarning (BiConsumer< String, String > func)
static BiConsumer< String, String > getReportWarning ()
static void reportWarning (String path, String msg)
static< T > void registerTypeHandler (Class< T > cls, TypeHandler< T > handler)
static void registerBackend (String prefix, TelemetryBackend backend)
static< T > TypeHandler< T > getTypeHandler (T value)
static TelemetryBackend getBackend (String path)
static TelemetryTable getTable (String path)
static void reset ()

Detailed Description

Global registry for telemetry handlers (type handlers and telemetry backends).

Definition at line 23 of file TelemetryRegistry.java.

Member Function Documentation

◆ getBackend()

TelemetryBackend org.wpilib.telemetry.TelemetryRegistry.getBackend ( String path)
static

Gets the backend for logging an object. Should generally only be used internally or by custom backends.

Parameters
pathfull name
Returns
telemetry backend, or a discard backend if no match

Definition at line 260 of file TelemetryRegistry.java.

◆ getReportWarning()

BiConsumer< String, String > org.wpilib.telemetry.TelemetryRegistry.getReportWarning ( )
static

Get function used for reporting warning messages.

Returns
reporting function

Definition at line 130 of file TelemetryRegistry.java.

◆ getTable()

TelemetryTable org.wpilib.telemetry.TelemetryRegistry.getTable ( String path)
static

Get a telemetry table for a particular name.

Parameters
pathfull name
Returns
telemetry table

Definition at line 356 of file TelemetryRegistry.java.

◆ getTypeHandler()

static< T > TypeHandler< T > org.wpilib.telemetry.TelemetryRegistry.getTypeHandler ( T value)
static

Gets the handler for logging an object. Should generally only be used by TelemetryTable.

Parameters
<T>class
valuevalue
Returns
handler or null if no match

Definition at line 240 of file TelemetryRegistry.java.

◆ registerBackend()

void org.wpilib.telemetry.TelemetryRegistry.registerBackend ( String prefix,
TelemetryBackend backend )
static

Registers a backend for creating telemetry entries. When calling getEntry(), the longest prefix match is used.

Parameters
prefixprefix for entries covered by this backend
backendbackend

Definition at line 191 of file TelemetryRegistry.java.

◆ registerTypeHandler()

static< T > void org.wpilib.telemetry.TelemetryRegistry.registerTypeHandler ( Class< T > cls,
TypeHandler< T > handler )
static

Registers a handler for logging objects of a particular type. The handler should populate the provided TelemetryTable name as appropriate for the object's data.

Parameters
<T>class
clsclass object
handlerhandler (accepts TelemetryTable, entry name, and object)

Definition at line 156 of file TelemetryRegistry.java.

◆ reportWarning()

void org.wpilib.telemetry.TelemetryRegistry.reportWarning ( String path,
String msg )
static

Report a warning message (e.g. type mismatch).

Parameters
pathentry path
msgwarning message

Definition at line 142 of file TelemetryRegistry.java.

◆ reset()

void org.wpilib.telemetry.TelemetryRegistry.reset ( )
static

Clear all registered types and backends and closes all entries. Should typically only be used by unit test code.

Definition at line 364 of file TelemetryRegistry.java.

◆ setReportWarning()

void org.wpilib.telemetry.TelemetryRegistry.setReportWarning ( BiConsumer< String, String > func)
static

Set function used for reporting warning messages (e.g. type mismatches).

The reporting function may be called concurrently and must not throw.

Parameters
funcreporting function; parameters are path and message; pass null to use default

Definition at line 115 of file TelemetryRegistry.java.


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