trackPayload

fun trackPayload(payload: ByteArray, isAck: Boolean = false, dsc: Int? = null, psc: Int = 0)

Tracks a payload count. If the payload isn't yet tracked, adds it at 0 (does NOT increment it), else does nothing.

Parameters

payload

The payload to track/increment

isAck

Whether this is an ACK payload (only used if payload doesn't exist yet)

dsc

Device state counter (for ACKs, null for writes, only used if payload doesn't exist yet)

psc

Payload state counter (for writes, or for ACKs that have PSC, only used if payload doesn't exist yet)