SOContext

constructor(name: String, connectionType: ConnectionType, inTopics: Iterable<TopicIn<*>>, outTopics: Iterable<TopicOut<*>>, fileTopics: Iterable<FileTopic> = emptyList())

Parameters

name

the name of the context. This should be a unique name across all contexts.

connectionType

The ConnectionType which is needed for this SOContext. Context's should always prefer to use ConnectionType.BLE if possible, and only use ConnectionType.WIFI if a larger bandwidth is needed. This connectionType only specifies the minimum needed ConnectionType. This means, that if a context declares ConnectionType.BLE here, but the SOComm device is currently connected using ConnectionType.WIFI (or switched to WIFI during the use of this context), all data communication will be changed to use ConnectionType.WIFI as long as any context needs ConnectionType.WIFI.

inTopics

The TopicIns this context allows the SDK user to send to the SOComm device (publish items to the SOComm device).

outTopics

The TopicOuts this context allows the SDK user to receive from the SOComm device (subscribe to the SOComm device).

fileTopics

The list of FileTopic this context allows the SDK user to use. May only be set to a non-empty list, if connectionType is WIFI.