TelemetryTopic

abstract class TelemetryTopic(source)

A handle on one telemetry path, which values are set on.

Get one from a TelemetryTable, and hold on to it instead of looking it up every loop. A handle is cheap to set: it keeps the entry it logs to, and only asks the registry for new ones when the backends change. That makes it safe to create before any backend is registered, and it keeps working when OpModes swap one backend for another.

A path isn't published to any backend until its first value is set.

Setting a value never throws. A value that can't be logged is reported through the registry's warning handler and dropped.

A handle may be used from any thread. Concurrent sets on one handle are safe but land in no guaranteed order.

Inheritors

Properties

Link copied to clipboard

Whether to log a value that is the same as the last one.

Link copied to clipboard

The full path of the topic, such as /Drive/leftVelocity

Link copied to clipboard

The topic's properties, such as its unit, which backends pass on to dashboards and log files.

Link copied to clipboard
var unit: String?

The unit of the topic's values, such as m or rad/s, or null if it has none. It is the TelemetryProperties.UNIT property, with the same timing rules as properties.

Functions

Link copied to clipboard
open override fun toString(): String