TransactionMessage

A message with Transaction Identifier.

The Transaction Identifier will automatically be set and incremented each time a message is sent. The counter is reused for all the types that extend this protocol.

Properties

Link copied to clipboard

Defines if a message should start a new transaction.

Link copied to clipboard

Defines if the message should be sent as an acknowledged message.

Link copied to clipboard

Defines if the message should be sent or was sent as Segmented Access Message. By default, this returns false. To force segmentation for shorter messages return true despite payload length. If payload size is longer than 11 bytes this field is not checked as the message must be segmented.

Link copied to clipboard

Whether the message is a Vendor Message, or not.

Link copied to clipboard
abstract val opCode: UInt
Link copied to clipboard
abstract val parameters: ByteArray?

Access layer payload, including the Op Code.

Link copied to clipboard

Defines if the message should be sent or has been sent using 32-bit or 64-bit TransMIC value. By default MeshMessageSecurity.Low is used. Only Segmented Access Messages can use 64-bit MIC. If the payload is shorter than 11 bytes, make sure you return true from MeshMessage.isSegmented, otherwise this field will be ignored.

Link copied to clipboard
abstract var tid: UByte?

Transaction Identifier of the message. if not set, this field will automatically be set when the message is being sent or received.

Functions

Link copied to clipboard
open fun isNewTransaction(previousTid: UByte, timestamp: Instant): Boolean

Checks whether this message is a continuation of another transaction message sent before at the given timestamp