MessagesCommands

interface MessagesCommands

Known direct subclasses
Messages

API for the Messages trait.


Summary

Public functions

suspend Unit

Cancels the messages in the passed fields.

suspend Unit
presentMessagesRequest(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit
)

Appends the message in the passed fields to the messages attribute.

Public functions

cancelMessagesRequest

suspend fun cancelMessagesRequest(messageIds: List<ByteArray>): Unit

Cancels the messages in the passed fields.

presentMessagesRequest

suspend fun presentMessagesRequest(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}
): Unit

Appends the message in the passed fields to the messages attribute. If appending the message would cause the number of messages to be greater than the capacity of the list, the device will not append any message to messages, and will return a status code of RESOURCE_EXHAUSTED.

Parameters
priority: MessagesTrait.MessagePriorityEnum

The priority level for this message.

messageControl: MessagesTrait.MessageControlBitmap

The control information related to the message.

startTime: UInt?

The time, in UTC, at which the message becomes available to be presented. A null value indicates that the message is available immediately.

duration: ULong?

The amount of time, in milliseconds, after the startTime during which the message is available to be presented. A null value means that the duration time remains the same until it's actively changed.

messageText: String

A string that contains the message to be presented to the user.

optionalArgs: MessagesTrait.PresentMessagesRequestCommand.OptionalArgs.() -> Unit = {}

Receiver for the optional arguments of this command