ZTCommand

open class ZTCommand(type: ZTCommand.Type)

ZTCommand

Author

Alexandre Lemoult <a.lemoult@zhortech.com>

Constructors

ZTCommand
Link copied to clipboard
fun ZTCommand(type: ZTCommand.Type)

Types

CommandAckPredicate
Link copied to clipboard
class CommandAckPredicate(predicate: AckFunPredicate, timeoutConfiguration: ZTCommand.TimeoutConfiguration?, error: Throwable?)
CommandPredicate
Link copied to clipboard
class CommandPredicate(predicate: FunPredicate)
CommandTimeoutConfigurationObservable
Link copied to clipboard
inner class CommandTimeoutConfigurationObservable(commandPredicate: ZTCommand.CommandPredicate?, timeoutConfiguration: ZTCommand.TimeoutConfiguration, error: Throwable)
Flag
Link copied to clipboard
open class Flag(byteValue: Byte)
TimeoutConfiguration
Link copied to clipboard
data class TimeoutConfiguration(timeout: Long, timeUnit: TimeUnit)
Type
Link copied to clipboard
open class Type(byteArray: ByteArray)

Functions

addAckFailed
Link copied to clipboard
fun addAckFailed(function: (cmdAck: ZTCommandAck) -> Boolean, error: Throwable): ZTCommand
addAckSuccess
Link copied to clipboard
fun addAckSuccess(function: (cmdAck: ZTCommandAck) -> Boolean, timeout: Long, timeUnit: TimeUnit, error: Throwable): ZTCommand
addExpect
Link copied to clipboard
fun addExpect(predicate: FunPredicate, timeout: Long, timeUnit: TimeUnit, error: Throwable): ZTCommand
checkCommand
Link copied to clipboard
fun checkCommand()
clean
Link copied to clipboard
fun clean()
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getArrayOfTimeoutsConfiguration
Link copied to clipboard
fun getArrayOfTimeoutsConfiguration(): MutableList<Completable>
getByteArray
Link copied to clipboard
fun getByteArray(): ByteArray
getCommandId
Link copied to clipboard
fun getCommandId(): Byte
getMessageType
Link copied to clipboard
fun getMessageType(): Byte?
getObservable
Link copied to clipboard
inline fun <T> getObservable(): T
hashCode
Link copied to clipboard
open override fun hashCode(): Int
isPairCommand
Link copied to clipboard
fun isPairCommand(): Boolean
observe
Link copied to clipboard
fun observe(): Completable
onAcknowledge
Link copied to clipboard
fun onAcknowledge(data: ByteArray)
onNext
Link copied to clipboard
fun onNext(data: ByteArray?): Boolean
onWriteError
Link copied to clipboard
fun onWriteError(error: Throwable)
onWriteSuccess
Link copied to clipboard
fun onWriteSuccess(data: ByteArray)
pair
Link copied to clipboard
fun pair(strategy: ZTPairResolutionStrategy): ZTCommand
setMessageType
Link copied to clipboard
fun setMessageType(messageType: Byte): ZTCommand
setTimeout
Link copied to clipboard
fun setTimeout(timeout: Long, timeUnit: TimeUnit): ZTCommand
withArgs
Link copied to clipboard
fun withArgs(buffer: ZTBuffer): ZTCommand
fun withArgs(vararg flags: ZTCommand.Flag): ZTCommand
fun withArgs(data: ByteArray): ZTCommand

Properties

commandCompletedSubject
Link copied to clipboard
val commandCompletedSubject: CompletableSubject
id
Link copied to clipboard
val id: UUID
pairResolutionStrategy
Link copied to clipboard
var pairResolutionStrategy: ZTPairResolutionStrategy? = null
pairResult
Link copied to clipboard
var pairResult: ZTPair<Any, Any>? = null
pairSubject
Link copied to clipboard
var pairSubject: SingleSubject<ZTPair<Any, Any>>? = null
subject
Link copied to clipboard
val subject: SingleSubject<ByteArray>
type
Link copied to clipboard
val type: ZTCommand.Type

Inheritors

ZTCalibrationCommand
Link copied to clipboard