TopicOut

abstract class TopicOut<T>(path: String, isRetained: Boolean) : Topic<T>

Defines a Topic which is used to transmit data from the SOComm device to an outside SDK client.

SOCommOutsideAPI <--- SOCommInsideAPI

Parameters

path

Defines the path for the given topic. The path is a unique string across all topics. Think of it like the path of MQTT (just without the wildcard options).

isRetained

Whether this topic should be retained. If set to true, the latest item on the topic will always be cached (retained) and on new subscriptions to the topic, the latest, retained item will be emitted instantly.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(path: String, isRetained: Boolean)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun deserialize(byteArray: ByteArray): T

De-Serializes the given byteArray into the type T.

Link copied to clipboard
abstract fun serialize(item: T): ByteArray

Serializes the given item into a ByteArray to be transmitted over the air.

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