ZTSegmentedProduct

abstract class ZTSegmentedProduct : ZTBaseProduct

ZTSegmentedProduct

Author

Alexandre Lemoult <a.lemoult@zhortech.com>

Constructors

ZTSegmentedProduct
Link copied to clipboard
fun ZTSegmentedProduct()

Functions

addActivityData
Link copied to clipboard
fun addActivityData(timestamp: Long, data: List<Any?>)
bindToConnection
Link copied to clipboard
fun Disposable.bindToConnection(): Disposable
checkFirmwareUpdate
Link copied to clipboard
fun checkFirmwareUpdate(): Observable<Optional<ZTDfuData>>
Request last available firmware version
createRestService
Link copied to clipboard
fun <T> createRestService(clazz: Class<*>): T
disconnect
Link copied to clipboard
fun disconnect()
doOnReady
Link copied to clipboard
fun doOnReady(): Single<ZTBaseProduct>
This methods is called automatically as soon as an active connection comes in.
forceStopActivity
Link copied to clipboard
fun forceStopActivity(): Completable
getDeviceIdentifier
Link copied to clipboard
fun getDeviceIdentifier(): String?
getSegmentDuration
Link copied to clipboard
abstract fun getSegmentDuration(): Long
observeRestoredActivity
Link copied to clipboard
fun observeRestoredActivity(): Observable<ZTActivity>
observeSegments
Link copied to clipboard
fun observeSegments(): Observable<ZTSegment>
observeStateChanges
Link copied to clipboard
fun observeStateChanges(): Observable<ZTProductState>
obtainLastActivityData
Link copied to clipboard
fun obtainLastActivityData()
onIndicateData
Link copied to clipboard
open override fun onIndicateData(data: ByteArray)
onNotifyData
Link copied to clipboard
open fun onNotifyData(data: ByteArray)
readBattery
Link copied to clipboard
fun readBattery(): Single<ZTBatteryLevel>
readFirmwareVersion
Link copied to clipboard
fun readFirmwareVersion(): Single<String>
readHardwareVersion
Link copied to clipboard
fun readHardwareVersion(): Single<String>
readPairedDevice
Link copied to clipboard
fun readPairedDevice(): Single<String>
readSerialNumber
Link copied to clipboard
fun readSerialNumber(): Single<String>
readState
Link copied to clipboard
open fun readState(): Single<ByteArray>
requestConnectionPriority
Link copied to clipboard
fun requestConnectionPriority(connectionPriority: ZTBleConnection.ConnectionPriority): Completable
startActivityWithAttributes
Link copied to clipboard
fun startActivityWithAttributes(attributes: ZTSerializable? = null): Completable
stopActivity
Link copied to clipboard
open override fun stopActivity(): Single<ZTActivity>

Properties

connection
Link copied to clipboard
val connection: ZTBleConnection?
The current active connection, could be null
connectionState
Link copied to clipboard
val connectionState: ZTConnectionState
The current connection state
device
Link copied to clipboard
open val device: ZTDevice?
The current active device, could be null
information
Link copied to clipboard
var information: ZTProductInformation? = null
The product information, serial, firmware, hardware etc
isObtainingData
Link copied to clipboard
val isObtainingData: Boolean
state
Link copied to clipboard
var state: ZTProductState
The parsed state of the device