public final class PanStamp extends Object
| Constructor and Description |
|---|
PanStamp(Network gw,
int address)
create a new mote for the given address in the given network
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(PanStampListener l)
add an event listener
|
int |
getAddress()
Get the address of this device.
|
int |
getChannel()
Return the network channel
|
Network |
getGateway()
Get the gateway this device is attached to.
|
int |
getManufacturerId()
Get the device manufacturer id.
|
String |
getName()
Get the device name (as defined by the endpoint definition).
|
int |
getNetwork()
Return the network ID
|
int |
getProductId()
Get the device product id.
|
Register |
getRegister(int id)
Get the register with the given register ID for this device.
|
List<Register> |
getRegisters()
Get the list of registers defined for this device
|
int |
getSecurityOption()
Return the current security option
|
int |
getSyncState()
Return the current sync state
|
int |
getTxInterval()
Return the transmit interval
|
boolean |
hasRegister(int id)
Determine if the device has a register with the given ID.
|
void |
removeListener(PanStampListener l)
remove an event listener
|
void |
setAddress(int addr)
Set the address of the panStamp
|
void |
setChannel(int channel)
Set the network channel of the device
|
void |
setNetwork(int network)
Set the network id of the device
|
void |
setSecurityOption(int option)
Set the security option of the device.
|
void |
setTxInterval(int txInterval)
Set the transmit interval (in seconds) of the device.
|
public PanStamp(Network gw, int address) throws NetworkException
gw - The gateway to which this device is connectedaddress - The address of the deviceNetworkException - Thrown if there is a
problem creating the device.public int getAddress()
public int getChannel()
throws NetworkException
NetworkException - Thrown if there is a problem getting the channel
valuepublic int getTxInterval()
throws NetworkException
NetworkException - Thrown if there is a problem getting the
interval valuepublic int getSecurityOption()
throws NetworkException
NetworkException - Thrown if there is a problem getting the
security option valuepublic int getSyncState()
throws NetworkException
NetworkExceptionpublic int getNetwork()
throws NetworkException
NetworkException - Thrown if there is a problem getting the network
ID valuepublic void setAddress(int addr)
throws NetworkException
addr - The address to setNetworkException - Thrown if there is a problem reading the
interval.public void setNetwork(int network)
throws NetworkException
network - The network idNetworkException - Thrown if there is a problem setting the IDpublic void setChannel(int channel)
throws NetworkException
channel - The channel to set.NetworkException - Thrown if there is a problem setting the channelpublic void setSecurityOption(int option)
throws NetworkException
option - The security option to set.NetworkException - Thrown if there is a problem setting the option.public void setTxInterval(int txInterval)
throws NetworkException
txInterval - The interval to set.NetworkException - Thrown if there is a problem setting the
interval.public int getManufacturerId()
throws NetworkException
NetworkException - Thrown if there is a problem reading the id.public int getProductId()
throws NetworkException
NetworkException - Thrown if there is a problem reading the id.public Network getGateway()
public String getName()
public Register getRegister(int id)
id - ID of register to returnpublic List<Register> getRegisters()
public boolean hasRegister(int id)
id - The id of the register required.public void addListener(PanStampListener l)
l - The listener to addpublic void removeListener(PanStampListener l)
l - The listener to removeCopyright © 2015. All rights reserved.