Class ProvisionedMeshNode
java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.transport.ProvisionedMeshNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final Logger
static final int
long
protected NetworkTransmitSettings
protected String
protected RelaySettings
protected Boolean
protected static final String
protected Integer
static 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 Integer
final Integer
getCrpl()
final byte[]
final byte[]
getFlags()
int
Returns the unicast address used by the last element in the nodeReturnsNetworkTransmitSettings
of this nodefinal Features
Returns theFeatures
of the nodeint
final String
int
Returns the number of elements in the nodefinal Integer
ReturnsRelaySettings
of this nodeint
getSeqAuth
(int src) final int
long
final Integer
getTtl()
final int
getUuid()
final Integer
final boolean
hasUnicastAddress
(int unicastAddress) Check if an unicast address is the address of an elementint
Increments the sequence numberboolean
Deprecated.final boolean
boolean
Returns true if the node is marked as excluded.boolean
isExist
(int modelId) protected final void
removeAddedAppKeyIndex
(int index) Removes an AppKey index that was added to the nodeprotected final void
removeAddedNetKeyIndex
(int index) Removes an NetKey index that was added to the nodeprotected final void
setAddedAppKeyIndex
(int index) Adds an AppKey index that was added to the nodefinal void
setAddedAppKeys
(List<NodeKey> addedAppKeyIndexes) protected final void
setAddedNetKeyIndex
(int index) Adds a NetKey index that was added to the nodefinal void
setAddedNetKeys
(List<NodeKey> addedNetKeyIndexes) protected final void
setAppKeyBindStatus
(ConfigModelAppStatus configModelAppStatus) Sets the bound app key data from theConfigModelAppStatus
protected final void
setAppKeyUnbindStatus
(ConfigModelAppStatus configModelAppStatus) Sets the unbind app key data from theConfigModelAppStatus
void
setBlackListed
(boolean blackListed) Deprecated.UsesetExcluded(boolean)
insteadfinal void
setCompanyIdentifier
(Integer companyIdentifier) protected final void
setCompositionData
(ConfigCompositionDataStatus configCompositionDataStatus) Sets the data from theConfigCompositionDataStatus
final void
setConfigured
(boolean configured) final void
void
setDeviceKey
(byte[] deviceKey) final void
setElements
(Map<Integer, Element> elements) void
setExcluded
(boolean excluded) final void
setFlags
(byte[] flags) void
setMeshUuid
(String meshUuid) void
setNetworkTransmitSettings
(NetworkTransmitSettings networkTransmitSettings) SetsNetworkTransmitSettings
of this nodefinal void
setNodeFeatures
(Features features) SetFeatures
of the nodefinal void
setNodeName
(String nodeName) final void
setProductIdentifier
(Integer productIdentifier) void
setRelaySettings
(RelaySettings relaySettings) SetsNetworkTransmitSettings
of this nodevoid
void
setSecurity
(int security) final void
setSequenceNumber
(int sequenceNumber) Sets the sequence numbervoid
setTimeStamp
(long timestamp) final void
final void
setUnicastAddress
(int unicastAddress) Sets the unicast address of the nodevoid
final void
setVersionIdentifier
(Integer versionIdentifier) protected final void
updateAddedAppKey
(int index) Update an app key's updated stateprotected final void
updateAddedNetKey
(int index) Update a net key's updated stateprotected final void
updateAppKeyList
(int netKeyIndex, List<Integer> indexes, List<ApplicationKey> keyIndexes) Update the added net key list of the nodeprotected final void
updateNetKeyList
(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
-Provisioner
netKeys
- List ofNetworkKey
appKeys
- 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 theFeatures
of the node -
setNodeFeatures
SetFeatures
of 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
ReturnsNetworkTransmitSettings
of this node -
setNetworkTransmitSettings
SetsNetworkTransmitSettings
of this node -
getRelaySettings
ReturnsRelaySettings
of this node -
setRelaySettings
SetsNetworkTransmitSettings
of 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