Class MeshModel
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.transport.MeshModel
- Direct Known Subclasses:
SigModel
,VendorModel
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 Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addSubscriptionAddress
(int subscriptionAddress) Sets the subscription address in a mesh modelprotected void
addSubscriptionAddress
(UUID labelUuid, int address) Sets the subscription address in a mesh modelReturns bound appkey indexes for this modelReturns the list of label UUIDs subscribed to this modelgetLabelUUID
(int address) Returns the label UUID for a given virtual addressabstract int
Returns the 16-bit model id which could be a SIG Model or a Vendor Modelabstract String
Returns the Bluetooth SIG defined model nameReturns the publication settings used in this modelReturns the list of subscription addresses belonging to this modelprotected void
overwriteSubscriptionAddress
(Integer subscriptionAddress) Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new addressprotected void
overwriteSubscriptionAddress
(UUID labelUuid, Integer address) Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new addressprotected void
Removes all the subscription addresses in a mesh modelvoid
removeBoundAppKeyIndex
(int appKeyIndex) protected void
removeSubscriptionAddress
(Integer address) Removes the subscription address in a mesh modelprotected void
removeSubscriptionAddress
(UUID labelUuid, Integer address) Removes the subscription address in a mesh modelvoid
setBoundAppKeyIndex
(int appKeyIndex) void
setBoundAppKeyIndexes
(List<Integer> indexes) void
setPublicationSettings
(PublicationSettings publicationSettings) protected void
setPublicationStatus
(ConfigModelPublicationStatus status, UUID labelUUID) Sets the data from theConfigModelPublicationStatus
protected void
Updates the data from theConfigModelPublicationStatus
protected void
updateSubscriptionAddressesList
(List<Integer> addresses) Update the subscription addresses list
-
Field Details
-
mModelId
protected int mModelId -
currentScene
protected int currentScene -
targetScene
protected int targetScene -
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
Returns the Bluetooth SIG defined model name- Returns:
- model name
-
getBoundAppKeyIndexes
Returns bound appkey indexes for this model -
setBoundAppKeyIndex
public void setBoundAppKeyIndex(int appKeyIndex) -
setBoundAppKeyIndexes
-
removeBoundAppKeyIndex
public void removeBoundAppKeyIndex(int appKeyIndex) -
getSubscribedAddresses
Returns the list of subscription addresses belonging to this model- Returns:
- subscription addresses
-
getLabelUUID
Returns the list of label UUIDs subscribed to this model -
getLabelUUID
Returns the label UUID for a given virtual address- Parameters:
address
- 16-bit virtual address
-
setPublicationStatus
Sets the data from theConfigModelPublicationStatus
- Parameters:
status
- publication set status
-
updatePublicationStatus
Updates the data from theConfigModelPublicationStatus
- Parameters:
status
- publication set status
-
getPublicationSettings
Returns the publication settings used in this model- Returns:
- publication settings
-
setPublicationSettings
-
addSubscriptionAddress
protected void addSubscriptionAddress(int subscriptionAddress) Sets the subscription address in a mesh model- Parameters:
subscriptionAddress
- Subscription address
-
addSubscriptionAddress
Sets the subscription address in a mesh model- Parameters:
labelUuid
- Label uuid of the the subscription addressaddress
- Subscription address
-
removeSubscriptionAddress
Removes the subscription address in a mesh model- Parameters:
address
- Subscription address
-
removeSubscriptionAddress
Removes the subscription address in a mesh model- Parameters:
labelUuid
- Label UUIDaddress
- Subscription address
-
removeAllSubscriptionAddresses
protected void removeAllSubscriptionAddresses()Removes all the subscription addresses in a mesh model -
overwriteSubscriptionAddress
Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new address- Parameters:
subscriptionAddress
- Subscription address
-
overwriteSubscriptionAddress
Overwrites the subscription addresses in a mesh model by clearing the existing addresses and adding a new address- Parameters:
labelUuid
- Label UUIDaddress
- Subscription address
-
updateSubscriptionAddressesList
Update the subscription addresses list- Parameters:
addresses
- List of subscription addresses
-