Class ProvisionedMeshNode
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.transport.ProvisionedMeshNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final Loggerstatic final intlongprotected NetworkTransmitSettingsprotected Stringprotected RelaySettingsprotected Booleanprotected static final Stringprotected Integerstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionProvisionedMeshNode(Provisioner provisioner, List<NetworkKey> netKeys, List<ApplicationKey> appKeys) Constructor to be used only by the libraryConstructor to be used only by hte library -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of added AppKey indexes to the nodeReturns the list of Network keys added to this nodefinal Integerfinal IntegergetCrpl()final byte[]final byte[]getFlags()intReturns the unicast address used by the last element in the nodeReturnsNetworkTransmitSettingsof this nodefinal FeaturesReturns theFeaturesof the nodeintfinal StringintReturns the number of elements in the nodefinal IntegerReturnsRelaySettingsof this nodeintgetSeqAuth(int src) final intlongfinal IntegergetTtl()final intgetUuid()final Integerfinal booleanhasUnicastAddress(int unicastAddress) Check if an unicast address is the address of an elementintIncrements the sequence numberbooleanDeprecated.final booleanbooleanReturns true if the node is marked as excluded.booleanisExist(int modelId) protected final voidremoveAddedAppKeyIndex(int index) Removes an AppKey index that was added to the nodeprotected final voidremoveAddedNetKeyIndex(int index) Removes an NetKey index that was added to the nodeprotected final voidsetAddedAppKeyIndex(int index) Adds an AppKey index that was added to the nodefinal voidsetAddedAppKeys(List<NodeKey> addedAppKeyIndexes) protected final voidsetAddedNetKeyIndex(int index) Adds a NetKey index that was added to the nodefinal voidsetAddedNetKeys(List<NodeKey> addedNetKeyIndexes) protected final voidsetAppKeyBindStatus(ConfigModelAppStatus configModelAppStatus) Sets the bound app key data from theConfigModelAppStatusprotected final voidsetAppKeyUnbindStatus(ConfigModelAppStatus configModelAppStatus) Sets the unbind app key data from theConfigModelAppStatusvoidsetBlackListed(boolean blackListed) Deprecated.UsesetExcluded(boolean)insteadfinal voidsetCompanyIdentifier(Integer companyIdentifier) protected final voidsetCompositionData(ConfigCompositionDataStatus configCompositionDataStatus) Sets the data from theConfigCompositionDataStatusfinal voidsetConfigured(boolean configured) final voidvoidsetDeviceKey(byte[] deviceKey) final voidsetElements(Map<Integer, Element> elements) voidsetExcluded(boolean excluded) final voidsetFlags(byte[] flags) voidsetMeshUuid(String meshUuid) voidsetNetworkTransmitSettings(NetworkTransmitSettings networkTransmitSettings) SetsNetworkTransmitSettingsof this nodefinal voidsetNodeFeatures(Features features) SetFeaturesof the nodefinal voidsetNodeName(String nodeName) final voidsetProductIdentifier(Integer productIdentifier) voidsetRelaySettings(RelaySettings relaySettings) SetsNetworkTransmitSettingsof this nodevoidvoidsetSecurity(int security) final voidsetSequenceNumber(int sequenceNumber) Sets the sequence numbervoidsetTimeStamp(long timestamp) final voidfinal voidsetUnicastAddress(int unicastAddress) Sets the unicast address of the nodevoidfinal voidsetVersionIdentifier(Integer versionIdentifier) protected final voidupdateAddedAppKey(int index) Update an app key's updated stateprotected final voidupdateAddedNetKey(int index) Update a net key's updated stateprotected final voidupdateAppKeyList(int netKeyIndex, List<Integer> indexes, List<ApplicationKey> keyIndexes) Update the added net key list of the nodeprotected final voidupdateNetKeyList(List<Integer> indexes) Update the added net key list of the node
-
Field Details
-
LOG
-
DISABLED
public static final int DISABLED- See Also:
-
ENABLED
public static final int ENABLED- See Also:
-
UNSUPPORTED
public static final int UNSUPPORTED- See Also:
-
LOW
public static final int LOW- See Also:
-
HIGH
public static final int HIGH- See Also:
-
TAG
-
mTimeStampInMillis
public long mTimeStampInMillis -
nodeName
-
ttl
-
secureNetworkBeaconSupported
-
networkTransmitSettings
-
relaySettings
-
-
Constructor Details
-
ProvisionedMeshNode
public ProvisionedMeshNode() -
ProvisionedMeshNode
Constructor to be used only by hte library- Parameters:
node-UnprovisionedMeshNode
-
ProvisionedMeshNode
public ProvisionedMeshNode(Provisioner provisioner, List<NetworkKey> netKeys, List<ApplicationKey> appKeys) Constructor to be used only by the library- Parameters:
provisioner-ProvisionernetKeys- List ofNetworkKeyappKeys- List ofApplicationKey
-
-
Method Details
-
getElements
-
hasUnicastAddress
public final boolean hasUnicastAddress(int unicastAddress) Check if an unicast address is the address of an element- Parameters:
unicastAddress- the address to check- Returns:
- if this address is the address of an element
-
setElements
-
getDeviceKey
public final byte[] getDeviceKey() -
setDeviceKey
public void setDeviceKey(byte[] deviceKey) -
getSequenceNumber
public final int getSequenceNumber() -
setSequenceNumber
public final void setSequenceNumber(int sequenceNumber) Sets the sequence numberThis is only meant to be used internally within the library. However this is open now for users to set the sequence number manually in provisioner node.
- Parameters:
sequenceNumber- sequence number of the node
-
getCompanyIdentifier
-
setCompanyIdentifier
-
getProductIdentifier
-
setProductIdentifier
-
getVersionIdentifier
-
setVersionIdentifier
-
getCrpl
-
setCrpl
-
getNodeFeatures
Returns theFeaturesof the node -
setNodeFeatures
SetFeaturesof the node- Parameters:
features- feature set supported by the node
-
getAddedNetKeys
Returns the list of Network keys added to this node -
setAddedNetKeys
-
setAddedNetKeyIndex
protected final void setAddedNetKeyIndex(int index) Adds a NetKey index that was added to the node- Parameters:
index- NetKey index
-
updateAddedNetKey
protected final void updateAddedNetKey(int index) Update a net key's updated state- Parameters:
index- NetKey index
-
updateNetKeyList
Update the added net key list of the node- Parameters:
indexes- NetKey index
-
removeAddedNetKeyIndex
protected final void removeAddedNetKeyIndex(int index) Removes an NetKey index that was added to the node- Parameters:
index- NetKey index
-
getAddedAppKeys
Returns the list of added AppKey indexes to the node -
setAddedAppKeys
-
setAddedAppKeyIndex
protected final void setAddedAppKeyIndex(int index) Adds an AppKey index that was added to the node- Parameters:
index- AppKey index
-
updateAddedAppKey
protected final void updateAddedAppKey(int index) Update an app key's updated state- Parameters:
index- AppKey index
-
updateAppKeyList
protected final void updateAppKeyList(int netKeyIndex, List<Integer> indexes, List<ApplicationKey> keyIndexes) Update the added net key list of the node- Parameters:
netKeyIndex- NetKey Indexindexes- AppKey indexes
-
removeAddedAppKeyIndex
protected final void removeAddedAppKeyIndex(int index) Removes an AppKey index that was added to the node- Parameters:
index- AppKey index
-
setCompositionData
Sets the data from theConfigCompositionDataStatus- Parameters:
configCompositionDataStatus- Composition data status object
-
setAppKeyBindStatus
Sets the bound app key data from theConfigModelAppStatus- Parameters:
configModelAppStatus- ConfigModelAppStatus containing the bound app key information
-
setAppKeyUnbindStatus
Sets the unbind app key data from theConfigModelAppStatus- Parameters:
configModelAppStatus- ConfigModelAppStatus containing the unbound app key information
-
getSeqAuth
-
isExist
public boolean isExist(int modelId) -
incrementSequenceNumber
public int incrementSequenceNumber()Increments the sequence number -
getMeshUuid
-
setMeshUuid
-
getUuid
-
setUuid
-
isConfigured
public final boolean isConfigured() -
setConfigured
public final void setConfigured(boolean configured) -
getNodeName
-
setNodeName
-
getUnicastAddress
public final int getUnicastAddress() -
setUnicastAddress
public final void setUnicastAddress(int unicastAddress) Sets the unicast address of the nodeThis is to be used only by the library
-
getNumberOfElements
public int getNumberOfElements()Returns the number of elements in the node -
getLastUnicastAddress
public int getLastUnicastAddress()Returns the unicast address used by the last element in the node -
getTtl
-
setTtl
-
getFlags
public final byte[] getFlags() -
setFlags
public final void setFlags(byte[] flags) -
getTimeStamp
public long getTimeStamp() -
setTimeStamp
public void setTimeStamp(long timestamp) -
getSecurity
public int getSecurity() -
setSecurity
public void setSecurity(int security) -
isBlackListed
Deprecated.UseisExcluded()insteadReturns true if the node is blacklisted or false otherwise -
setBlackListed
Deprecated.UsesetExcluded(boolean)insteadBlacklist a node.- Parameters:
blackListed- true if blacklisted
-
isSecureNetworkBeaconSupported
-
setSecureNetworkBeaconSupported
-
getNetworkTransmitSettings
ReturnsNetworkTransmitSettingsof this node -
setNetworkTransmitSettings
SetsNetworkTransmitSettingsof this node -
getRelaySettings
ReturnsRelaySettingsof this node -
setRelaySettings
SetsNetworkTransmitSettingsof this node -
isExcluded
public boolean isExcluded()Returns true if the node is marked as excluded.- Returns:
- true if marked as excluded or false otherwise.
-
getNodeIdentityState
public int getNodeIdentityState() -
setExcluded
public void setExcluded(boolean excluded)
-
isExcluded()instead