SceneServerModelEventHandler

This event handler should be used when defining Scene Server model. In addition to handling messages, the Scene Server delegate should also clear the current whenever StoredWithSceneModelDelegate.store and StoredWithSceneModelDelegate.recall are called.

Whenever the state changes due toa ny other reason than receiving a Scene Recall message, the delegate should call StoredWithSceneModelDelegate.networkDidExitStoredWithSceneState to clear the current scene.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Defines the model supports subscription.

Link copied to clipboard
abstract val meshNetwork: MeshNetwork
Link copied to clipboard

Map of supported message types.

Link copied to clipboard
val modelEventFlow: SharedFlow<ModelEvent>

Flow of model events.

Link copied to clipboard

Lambda function that returns a MeshMessage to be published.

Functions

Link copied to clipboard

This method should be called whenever the State of the model changes for any reason other than receiving Scene Recall message.

Link copied to clipboard
suspend fun publish(manager: MeshNetworkManager): MessageHandle?
suspend fun publish(message: MeshMessage, manager: MeshNetworkManager): MessageHandle?