public class UDNode
extends java.lang.Object
implements java.lang.Comparable
UDNode
represents a node in the device tree.
Each node, essentially, is a logical representation of a device which is linked to the system.
Note: UDNode
is created/instantiated by the underlying UD Network and
Services Layers and should not be created independently
Modifier and Type | Field and Description |
---|---|
java.lang.String |
address
Node's address
|
int |
dcPeriod
Duty Cycle period is used to calculate the amount of ON vs.
|
int |
deviceClass
Device classes (such as heat pump, pool pump, washer, dryer, etc.) may
be used as hints on how to duty cycle in DR mode
|
boolean |
isEnabled
Whether or not the node is enabled.
|
java.lang.String |
name
Node's name
|
java.lang.String |
parent
The parent's id in a hierarchy
|
java.lang.String |
parentName
Node's parent name
|
int |
parentType
The parent's hiearchy type
|
java.lang.String |
type
Node's type which identifies the type of device.
|
java.lang.String |
typeReadable
The Nodes type in a readable format.
|
static int |
UD_HIERARCHY_NODE_TYPE_FOLDER
The parent is a folder
|
static int |
UD_HIERARCHY_NODE_TYPE_GROUP
The parent is a scene/group
|
static int |
UD_HIERARCHY_NODE_TYPE_NODE
The parent is another node
|
static int |
UD_HIERARCHY_NODE_TYPE_NOTSET
There's no hierarchy associated with node
|
static java.lang.String |
UD_PRODUCT_FAMILY_ADR
The Auto DR product family (used for group nodes)
|
static java.lang.String |
UD_PRODUCT_FAMILY_BRULTECH
The Brultech product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_DEFAULT
The default product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_GNC
Generic family (used for groups containing nodes of different families)
|
static java.lang.String |
UD_PRODUCT_FAMILY_INSTEON
The Insteon product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_RCS
The RCS product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_UDI
The UDI product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_UPB
The UPB product family
|
static java.lang.String |
UD_PRODUCT_FAMILY_ZWAVE
Brultech ECM1240 Energy Monitor
|
java.lang.String |
uuid
The uuid of the
UDProxyDevice which this node belongs to |
int |
wattage
The approximate wattage which may be used for calculating energy utilization
|
Constructor and Description |
---|
UDNode()
Constructor
|
UDNode(java.lang.String address,
java.lang.String name)
Constructor
|
UDNode(XMLElement node,
java.lang.Object dev)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o)
Compares this node with another node.
|
boolean |
equals(java.lang.String s)
Tests for equality
|
java.lang.String |
getAction(java.lang.String control)
Returns the current action value associated for the given control
for this node
|
java.util.Enumeration |
getControls() |
UDDeviceType |
getDeviceType()
return
|
java.lang.String |
getFamilyId()
Returns the Family ID for this node, or null indicating the default family (e.g.
|
java.lang.String |
getFormattedDeviceId()
Returns a formatted device Id to be used only for display.
|
boolean |
getHasPendingDeviceWrites() |
UDNodeDeviceProperties |
getNodeDeviceProperties()
Get the node device properties for this node.
|
char |
getNodeFlag()
Gets the node flag
|
java.lang.String |
getPrimaryNode()
Returns the primary node from of all the nodes partially representing the underlying device.
|
java.lang.String |
getResponderType()
Gets the Responder Type.
|
long |
getRxEndpointMask()
Return the set of receiver device endpoints owned by this node,
where the bit position indicates the endpoint number.
|
java.lang.String |
getSubgroup()
Returns the subgroup number for the portion of the device that this node represents.
|
long |
getTxEndpointMask()
Return the set of transmitter device endpoints owned by this node,
where the bit position indicates the endpoint number.
|
void |
init()
Library use only
|
boolean |
isController()
Returns true if this node can be used as a controller.
|
boolean |
isDefaultFamilyId()
Returns true if the family for this node is the default family (e.g.
|
boolean |
isDevicePrimaryNode()
Whether or not this is the node the represents the device.
|
boolean |
isInError()
Returns whether or not the node has encountered an error
|
boolean |
isQueryable()
Returns true if this node can be queried
|
boolean |
isResponder()
Returns true if this node can be used as a responder
|
boolean |
isRootNode()
Whether or not this is the root node.
|
boolean |
isWritingToDevice() |
void |
processElement(XMLElement child,
java.lang.Object dev)
Library use only
|
void |
refresh(java.lang.Object dev,
XMLElement node)
Refreshes the current node with data from a DIML/XML representation
of a node.
|
void |
revise(XMLElement node,
java.lang.Object dev)
Revises the contents of the node.
|
void |
setDeviceType(UDDeviceType t)
Sets a more complete device type of the node (as compared to setType())
|
void |
setDeviceType(XMLElement xml)
Sets a more complete device type of the node (as compared to setType())
|
void |
setFamilyId(java.lang.String v)
Sets the Family ID for this node with null indicating the default product (e.g.
|
void |
setFormattedDeviceId(java.lang.String formattedDeviceId)
Sets a formatted device Id to be used only for display.
|
void |
setHasPendingDeviceWrites(boolean v) |
void |
setIsController(boolean v)
Sets whether this node can be used as a controller or not.
|
void |
setIsInError(boolean b)
Sets whether or not the node is in error
|
void |
setIsQueryable(boolean v)
Sets whether this node can be used as a controller or not.
|
void |
setIsResponder(boolean v)
Sets whether this node can be used as a controller or not.
|
void |
setIsWritingToDevice(boolean v) |
void |
setNodeDeviceProperties(UDNodeDeviceProperties v)
Set the node device properties for this node.
|
void |
setNodeFlag(char flag,
java.lang.Object dev)
Sets the operational flag for this node
|
void |
setParentType(java.lang.String t)
Sets the parent hierarchy type
|
void |
setPrimaryNode(java.lang.String primaryNode)
Sets the primary node from of all the nodes partially representing the underlying device.
|
void |
setResponderType(java.lang.String v)
Sets the Responder Type.
|
void |
setRxEndpointMask(long mask)
Set the set of receiver device endpoints owned by this node,
where the bit position indicates the endpoint number.
|
void |
setSubgroup(java.lang.String subgroup)
Sets the subgroup number for the portion of the device that this node represents.
|
void |
setTxEndpointMask(long mask)
Set the set of transmitter device endpoints owned by this node,
where the bit position indicates the endpoint number.
|
void |
setType(java.lang.String t)
Set's the node's type which identifies the type of device.
|
java.lang.String |
toString() |
java.lang.Object |
updateState(java.lang.String control,
java.lang.String value)
Updates the current value for the control for this node.
|
public static final int UD_HIERARCHY_NODE_TYPE_NOTSET
public static final int UD_HIERARCHY_NODE_TYPE_NODE
public static final int UD_HIERARCHY_NODE_TYPE_GROUP
public static final int UD_HIERARCHY_NODE_TYPE_FOLDER
public static final java.lang.String UD_PRODUCT_FAMILY_DEFAULT
public static final java.lang.String UD_PRODUCT_FAMILY_INSTEON
public static final java.lang.String UD_PRODUCT_FAMILY_UPB
public static final java.lang.String UD_PRODUCT_FAMILY_RCS
public static final java.lang.String UD_PRODUCT_FAMILY_ZWAVE
public static final java.lang.String UD_PRODUCT_FAMILY_ADR
public static final java.lang.String UD_PRODUCT_FAMILY_GNC
public static final java.lang.String UD_PRODUCT_FAMILY_UDI
public static final java.lang.String UD_PRODUCT_FAMILY_BRULTECH
public java.lang.String address
public java.lang.String name
public java.lang.String parentName
This attribute is used in the presentation layer only and should be disregarded
public java.lang.String type
The permissible values for this attrbute are device specific and are included in each device package (DeviceTypes.java)
public java.lang.String parent
public int parentType
public java.lang.String typeReadable
public boolean isEnabled
This feature is only available on 99 series
public int deviceClass
This feature is only available on 992 series
public int wattage
This feature is only available on 992 series
public int dcPeriod
This feature is only available on 992 series
public java.lang.String uuid
UDProxyDevice
which this node belongs topublic UDNode(java.lang.String address, java.lang.String name)
This constructor is invoked/instantiated by UD Network and Services Layer and, as such, should not be invoked independently
address
- - the address for this nodename
- - the name for this noepublic UDNode(XMLElement node, java.lang.Object dev)
This constructor is invoked/instantiated by UD Network and Services Layer and, as such, should not be invoked independently
node
- - the DIML/XML representation of the nodedev
- - the UDProxyDevice
which this node belongs topublic UDNode()
This constructor is invoked/instantiated by UD Network and Services Layer and, as such, should,not be invoked independently
public java.lang.String getSubgroup()
public void setSubgroup(java.lang.String subgroup)
subgroup
- - The subgroup number for the portion of the device that this node represents.public java.lang.String getPrimaryNode()
public void setPrimaryNode(java.lang.String primaryNode)
primaryNode
- - The primary node from of all the nodes partially representing the underlying device.public boolean isDefaultFamilyId()
public java.lang.String getFamilyId()
public void setFamilyId(java.lang.String v)
v
- The product ID (e.g. "ELK", "RCS", etc.)public java.lang.String getFormattedDeviceId()
public void setFormattedDeviceId(java.lang.String formattedDeviceId)
formattedDeviceId
- - The formatted device Id.public boolean getHasPendingDeviceWrites()
public void setHasPendingDeviceWrites(boolean v)
public boolean isWritingToDevice()
public void setIsWritingToDevice(boolean v)
public void revise(XMLElement node, java.lang.Object dev)
This method is invoked/instantiated by UD Network and Services Layer and, as such, should not be invoked independently
node
- - the DIML/XML representation of the nodedev
- - the UDProxyDevice
which this node belongs topublic void refresh(java.lang.Object dev, XMLElement node)
node
- - the node representation in DIML/XMLpublic void setNodeFlag(char flag, java.lang.Object dev)
flag
- - the flagdev
- - the UDProxyDevice
which this node
belongs topublic char getNodeFlag()
public void setParentType(java.lang.String t)
t
- public boolean isRootNode()
Each system will have one and only one root node which is represented in a UDGroup
public boolean isDevicePrimaryNode()
public boolean isInError()
public void setIsInError(boolean b)
b
- - true to set the node in error, false otherwisepublic java.lang.String getAction(java.lang.String control)
public java.util.Enumeration getControls()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object updateState(java.lang.String control, java.lang.String value)
This method is invoked by UD Networ and Services Layers and, as such, should not be invoked independently
public void setType(java.lang.String t)
The permissible values for this attribute are listed in package specific DeviceTypes.java
public void setDeviceType(UDDeviceType t)
t
- The device type of the nodepublic UDDeviceType getDeviceType()
public void setDeviceType(XMLElement xml)
v
- The XML describing the device typepublic void processElement(XMLElement child, java.lang.Object dev)
child
- dev
- public void init()
public int compareTo(java.lang.Object o)
This is the implementation of the Comparable
interface
compareTo
in interface java.lang.Comparable
o
- - the other node to be compared topublic boolean equals(java.lang.String s)
Whether or not the given string is equal to the address of this node
s
- - the String to be checkedpublic boolean isController()
public void setIsController(boolean v)
v
- public boolean isResponder()
public void setIsResponder(boolean v)
v
- public void setResponderType(java.lang.String v)
public java.lang.String getResponderType()
public boolean isQueryable()
public void setIsQueryable(boolean v)
v
- public UDNodeDeviceProperties getNodeDeviceProperties()
public void setNodeDeviceProperties(UDNodeDeviceProperties v)
public void setTxEndpointMask(long mask)
mask
- The endpoint mask.public long getTxEndpointMask()
public void setRxEndpointMask(long mask)
mask
- The endpoint mask.public long getRxEndpointMask()