MessagesTrait.MessageStruct

class MessagesTrait.MessageStruct : ClusterStruct


Information about a single message.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

MessageStruct(
    messageId: ByteArray,
    priority: MessagesTrait.MessagePriorityEnum,
    messageControl: MessagesTrait.MessageControlBitmap,
    startTime: UInt?,
    duration: ULong?,
    messageText: String,
    responses: OptionalValue<List<MessagesTrait.MessageResponseOptionStruct>>
)

Creates the MessageStruct class.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

Returns the value of the field for the given tag ID.

Public properties

ULong?

The amount of time, in milliseconds, after the startTime during which the message is available to be presented.

MessagesTrait.MessageControlBitmap

Control information related to the message.

ByteArray

A globally unique ID for this message.

String

A string that contains the message to be presented.

MessagesTrait.MessagePriorityEnum

The priority level for this message.

OptionalValue<List<MessagesTrait.MessageResponseOptionStruct>>

A list of responses that the user can select to dismiss the message.

UInt?

The time, in UTC, at which the message becomes available to be presented.

Public constructors

MessageStruct

MessageStruct(
    messageId: ByteArray = ByteArray(0),
    priority: MessagesTrait.MessagePriorityEnum = MessagePriorityEnum.Low,
    messageControl: MessagesTrait.MessageControlBitmap = MessageControlBitmap(),
    startTime: UInt? = null,
    duration: ULong? = null,
    messageText: String = "",
    responses: OptionalValue<List<MessagesTrait.MessageResponseOptionStruct>> = OptionalValue.absent()
)

Creates the MessageStruct class.

Public functions

getDescriptor

@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

duration

val durationULong?

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.

messageControl

val messageControlMessagesTrait.MessageControlBitmap

Control information related to the message.

messageId

val messageIdByteArray

A globally unique ID for this message.

messageText

val messageTextString

A string that contains the message to be presented.

priority

val priorityMessagesTrait.MessagePriorityEnum

The priority level for this message.

responses

val responsesOptionalValue<List<MessagesTrait.MessageResponseOptionStruct>>

A list of responses that the user can select to dismiss the message.

startTime

val startTimeUInt?

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