Topic

A handle on a topic of reference values: strings, arrays, structs, and lists of structs.

Numbers and booleans have their own handles, which don't box. A string that repeats is skipped unless keepDuplicates is set. Nothing else is, since an array or object can change in place.

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
fun set(value: T)

Logs value, stamped with the current time.

fun set(value: T, timestampMicros: Long)

Logs value with a timestamp in microseconds since the registry's origin.

fun set(value: T, at: ComparableTimeMark)

Logs value, stamped with at, a mark from the registry's time source.

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