java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.transport.MeshModel
Direct Known Subclasses:
SigModel, VendorModel

public abstract class MeshModel extends Object
Base mesh model class

This class contains properties such as Model Identifier, bound keys, key indexes, subscription and publication settings belonging to a mesh model.

  • Field Details

    • mModelId

      protected int mModelId
    • currentScene

      protected int currentScene
    • targetScene

      protected int targetScene
    • sceneNumbers

      protected List<Integer> sceneNumbers
  • Constructor Details

    • MeshModel

      public MeshModel(int modelId)
  • Method Details

    • getModelId

      public abstract int getModelId()
      Returns the 16-bit model id which could be a SIG Model or a Vendor Model
      Returns:
      modelId
    • getModelName

      public abstract String getModelName()
      Returns the Bluetooth SIG defined model name
      Returns:
      model name
    • getBoundAppKeyIndexes

      public List<Integer> getBoundAppKeyIndexes()
      Returns bound appkey indexes for this model
    • setBoundAppKeyIndex

      public void setBoundAppKeyIndex(int appKeyIndex)
    • setBoundAppKeyIndexes

      public void setBoundAppKeyIndexes(List<Integer> indexes)
    • removeBoundAppKeyIndex

      public void removeBoundAppKeyIndex(int appKeyIndex)
    • getSubscribedAddresses

      public List<Integer> getSubscribedAddresses()
      Returns the list of subscription addresses belonging to this model
      Returns:
      subscription addresses
    • getLabelUUID

      public List<UUID> getLabelUUID()
      Returns the list of label UUIDs subscribed to this model
    • getLabelUUID

      public UUID getLabelUUID(int address)
      Returns the label UUID for a given virtual address
      Parameters:
      address - 16-bit virtual address
    • setPublicationStatus

      protected void setPublicationStatus(ConfigModelPublicationStatus status, UUID labelUUID)
      Sets the data from the ConfigModelPublicationStatus
      Parameters:
      status - publication set status
    • updatePublicationStatus

      protected void updatePublicationStatus(ConfigModelPublicationStatus status)
      Updates the data from the ConfigModelPublicationStatus
      Parameters:
      status - publication set status
    • getPublicationSettings

      public PublicationSettings getPublicationSettings()
      Returns the publication settings used in this model
      Returns:
      publication settings
    • setPublicationSettings

      public void setPublicationSettings(PublicationSettings publicationSettings)
    • addSubscriptionAddress

      protected void addSubscriptionAddress(int subscriptionAddress)
      Sets the subscription address in a mesh model
      Parameters:
      subscriptionAddress - Subscription address
    • addSubscriptionAddress

      protected void addSubscriptionAddress(UUID labelUuid, int address)
      Sets the subscription address in a mesh model
      Parameters:
      labelUuid - Label uuid of the the subscription address
      address - Subscription address
    • removeSubscriptionAddress

      protected void removeSubscriptionAddress(Integer address)
      Removes the subscription address in a mesh model
      Parameters:
      address - Subscription address
    • removeSubscriptionAddress

      protected void removeSubscriptionAddress(UUID labelUuid, Integer address)
      Removes the subscription address in a mesh model
      Parameters:
      labelUuid - Label UUID
      address - Subscription address
    • removeAllSubscriptionAddresses

      protected void removeAllSubscriptionAddresses()
      Removes all the subscription addresses in a mesh model
    • overwriteSubscriptionAddress

      protected void overwriteSubscriptionAddress(Integer subscriptionAddress)
      Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new address
      Parameters:
      subscriptionAddress - Subscription address
    • overwriteSubscriptionAddress

      protected void overwriteSubscriptionAddress(UUID labelUuid, Integer address)
      Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new address
      Parameters:
      labelUuid - Label UUID
      address - Subscription address
    • updateSubscriptionAddressesList

      protected void updateSubscriptionAddressesList(List<Integer> addresses)
      Update the subscription addresses list
      Parameters:
      addresses - List of subscription addresses