com.buglabs.bug.module.bugbee.pub
Interface IBUGBeeControl

All Known Implementing Classes:
BUGBeeModletControl

public interface IBUGBeeControl


Field Summary
static short AF_DATA_CNF
           
static short ALL_ROUTERS_AND_COORD_ADDRESS
           
static byte BINDING_ALLOWED_INDEFINITELY_TIMEOUT
           
static byte BINDING_DISALLOWED_TIMEOUT
           
static byte CREATE_BINDING_REQUEST
           
static int DEV_COORD_STARTING
           
static int DEV_END_DEVICE
           
static int DEV_END_DEVICE_UNAUTH
           
static int DEV_HOLD
           
static int DEV_INIT
           
static int DEV_NWK_DISC
           
static int DEV_NWK_JOINING
           
static int DEV_NWK_ORPHAN
           
static int DEV_NWK_REJOIN
           
static int DEV_ROUTER
           
static int DEV_ZB_COORD
           
static byte DONT_RESET
           
static byte HW_RESET
           
static byte JOINING_OFF_TIMEOUT
           
static byte JOINING_ON_INDEFINITELY_TIMEOUT
           
static byte LOGICAL_TYPE_COORDINATOR
           
static byte LOGICAL_TYPE_END_DEVICE
           
static byte LOGICAL_TYPE_ROUTER
           
static int MSG_DONTWAIT
           
static int MSG_PEEK
           
static byte REMOVE_BINDING_REQUEST
           
static byte START_OP_CLEAR_CONFIG
           
static byte START_OP_CLEAR_STATE
           
static byte START_OP_CURRENT
           
static byte SW_RESET
           
static short ZB_ALLOW_BIND
           
static short ZB_ALLOW_BIND_CONFIRM
           
static short ZB_APP_REGISTER_REQ
           
static short ZB_BIND_CONFIRM
           
static short ZB_BIND_DEVICE
           
static short ZB_FIND_DEVICE_CONFIRM
           
static short ZB_FIND_DEVICE_REQUEST
           
static short ZB_GET_DEVICE_INFO
           
static short ZB_PERMIT_JOINING_REQ
           
static short ZB_RCV_DATA_IND
           
static byte ZB_RESET_BY_EXT
           
static byte ZB_RESET_BY_WATCHDOG
           
static short ZB_RESET_IND
           
static short ZB_SEND_DATA_CONFIRM
           
static short ZB_SEND_DATA_REQ
           
static short ZB_START_CONFIRM
           
static short ZB_START_REQUEST
           
static short ZDO_MGMT_LQI_RSP
           
static byte ZFAILURE
           
static byte ZSUCCESS
           
 
Method Summary
 void allowBind(byte timeout)
           
 void bindDeviceRequest(byte bindingRequest, short commandId, IEEEAddress destination)
           
 void configurePA(boolean powerAmpOn, byte powerLevel)
           
 void findDeviceRequest(IEEEAddress device)
           
 short getApsAckWaitDuration()
           
 byte getApsFrameRetries()
           
 short getBindingTime()
           
 byte getBroadcastDeliveryTime()
           
 byte getBroadcastRetries()
           
 int getChannel()
           
 int getChannelList()
           
 java.lang.String getConfigPANID()
           
 java.lang.String getExtendedPANID()
           
 IEEEAddress getIEEEAddress()
           
 byte getIndirectMessageTimeout()
           
 byte getLogicalType()
           
 short getPANID()
           
 IEEEAddress getParentIEEEAddress()
           
 short getParentShortAddress()
           
 byte getPassiveAckTimeout()
           
 byte getPollFailureRetries()
           
 short getPollRate()
           
 java.lang.String getPreCfgKey()
           
 boolean getPreCfgKeyEnable()
           
 short getQueuePollRate()
           
 short getResponsePollRate()
           
 byte getRouteExpiryTime()
           
 boolean getSecurityMode()
           
 short getShortAddress()
           
 byte getStartUpOption()
           
 int getState()
           
 java.lang.String getUserDesc()
           
 void permitJoining(short deviceId, byte timeout)
           
 int read(byte[] buf, int len, int flags)
           
 void registerAppRequest(byte appEndPoint, short appProfileId, short deviceId, byte deviceVersion, short[] appInClusterList, short[] appOutClusterList)
           
 void reset(byte resetType)
           
 void sendZAccelCommand(short command, byte[] data)
           
 void setApsAckWaitDuration(short apsAckWaitDuration)
          The amount of time to wait for ACK packet before retransmission.
 void setApsFrameRetries(byte apsFrameRetries)
          Number of retransmissions of a data packet at the application layer.
 void setBindingTime(short bindingTime)
          The amount of time (in ms) a device will wait for a response to a binding request.
 void setBroadcastDeliveryTime(byte broadcastDeliveryTime)
          The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network.
 void setBroadcastRetries(byte broadcastRetries)
          Max number for broadcast packet retransmission.
 void setChannelList(int channelList)
          Bit mask of the channels on which this network can operate.
 void setIndirectMessageTimeout(byte indirectMessageTimeout)
          The amount of time (in sec) that a router or coordinator will buffer messages destined to their end-device child nodes.
 void setInterfaceState(boolean interfaceUp)
          Brings up the interface (if interfaceUp is true).
 void setLogicalType(byte logicalType)
          Set the ZigBee logical type of the device.
 void setPANID(short PANID)
          ZigBee network ID.
 void setPassiveAckTimeout(byte passiveAckTimeout)
          Duration to wait (in 100ms) before retransmitting a broadcast packet Default is 5.
 void setPollFailureRetries(byte pollFailureRetries)
          The number of times to retry before invoking the rejoin mechanism.
 void setPollRate(short pollRate)
          An End-device will wake up periodically with the non-zero duration to check for data with its parent device.
 void setPreCfgKey(java.lang.String preCfgKey)
          Maximum length is 16.
 void setPreCfgKeyEnable(boolean preCfgKeyEnable)
           
 void setQueuePollRate(short pollRate)
          Duration to retry if the first poll fails.
 void setResponsePollRate(short pollRate)
          Duration to poll for response after sending a data packet out.
 void setRouteExpiryTime(byte routeExpiryTime)
           
 void setSecurityMode(boolean securityMode)
          Enable or disable security mode.
 void setStartUpOption(byte option)
          Controls the device startup options.
 void setUserDesc(java.lang.String userDesc)
          Maximum length is 17.
 void startRequest()
           
 

Field Detail

DONT_RESET

static final byte DONT_RESET
See Also:
Constant Field Values

HW_RESET

static final byte HW_RESET
See Also:
Constant Field Values

SW_RESET

static final byte SW_RESET
See Also:
Constant Field Values

DEV_HOLD

static final int DEV_HOLD
See Also:
Constant Field Values

DEV_INIT

static final int DEV_INIT
See Also:
Constant Field Values

DEV_NWK_DISC

static final int DEV_NWK_DISC
See Also:
Constant Field Values

DEV_NWK_JOINING

static final int DEV_NWK_JOINING
See Also:
Constant Field Values

DEV_NWK_REJOIN

static final int DEV_NWK_REJOIN
See Also:
Constant Field Values

DEV_END_DEVICE_UNAUTH

static final int DEV_END_DEVICE_UNAUTH
See Also:
Constant Field Values

DEV_END_DEVICE

static final int DEV_END_DEVICE
See Also:
Constant Field Values

DEV_ROUTER

static final int DEV_ROUTER
See Also:
Constant Field Values

DEV_COORD_STARTING

static final int DEV_COORD_STARTING
See Also:
Constant Field Values

DEV_ZB_COORD

static final int DEV_ZB_COORD
See Also:
Constant Field Values

DEV_NWK_ORPHAN

static final int DEV_NWK_ORPHAN
See Also:
Constant Field Values

ALL_ROUTERS_AND_COORD_ADDRESS

static final short ALL_ROUTERS_AND_COORD_ADDRESS
See Also:
Constant Field Values

JOINING_OFF_TIMEOUT

static final byte JOINING_OFF_TIMEOUT
See Also:
Constant Field Values

JOINING_ON_INDEFINITELY_TIMEOUT

static final byte JOINING_ON_INDEFINITELY_TIMEOUT
See Also:
Constant Field Values

BINDING_DISALLOWED_TIMEOUT

static final byte BINDING_DISALLOWED_TIMEOUT
See Also:
Constant Field Values

BINDING_ALLOWED_INDEFINITELY_TIMEOUT

static final byte BINDING_ALLOWED_INDEFINITELY_TIMEOUT
See Also:
Constant Field Values

CREATE_BINDING_REQUEST

static final byte CREATE_BINDING_REQUEST
See Also:
Constant Field Values

REMOVE_BINDING_REQUEST

static final byte REMOVE_BINDING_REQUEST
See Also:
Constant Field Values

START_OP_CLEAR_STATE

static final byte START_OP_CLEAR_STATE
See Also:
Constant Field Values

START_OP_CLEAR_CONFIG

static final byte START_OP_CLEAR_CONFIG
See Also:
Constant Field Values

START_OP_CURRENT

static final byte START_OP_CURRENT
See Also:
Constant Field Values

LOGICAL_TYPE_COORDINATOR

static final byte LOGICAL_TYPE_COORDINATOR
See Also:
Constant Field Values

LOGICAL_TYPE_ROUTER

static final byte LOGICAL_TYPE_ROUTER
See Also:
Constant Field Values

LOGICAL_TYPE_END_DEVICE

static final byte LOGICAL_TYPE_END_DEVICE
See Also:
Constant Field Values

MSG_PEEK

static final int MSG_PEEK
See Also:
Constant Field Values

MSG_DONTWAIT

static final int MSG_DONTWAIT
See Also:
Constant Field Values

ZB_APP_REGISTER_REQ

static final short ZB_APP_REGISTER_REQ
See Also:
Constant Field Values

ZB_START_REQUEST

static final short ZB_START_REQUEST
See Also:
Constant Field Values

ZB_START_CONFIRM

static final short ZB_START_CONFIRM
See Also:
Constant Field Values

ZB_PERMIT_JOINING_REQ

static final short ZB_PERMIT_JOINING_REQ
See Also:
Constant Field Values

ZB_BIND_DEVICE

static final short ZB_BIND_DEVICE
See Also:
Constant Field Values

ZB_BIND_CONFIRM

static final short ZB_BIND_CONFIRM
See Also:
Constant Field Values

ZB_ALLOW_BIND

static final short ZB_ALLOW_BIND
See Also:
Constant Field Values

ZB_ALLOW_BIND_CONFIRM

static final short ZB_ALLOW_BIND_CONFIRM
See Also:
Constant Field Values

ZB_SEND_DATA_REQ

static final short ZB_SEND_DATA_REQ
See Also:
Constant Field Values

ZB_SEND_DATA_CONFIRM

static final short ZB_SEND_DATA_CONFIRM
See Also:
Constant Field Values

ZB_RCV_DATA_IND

static final short ZB_RCV_DATA_IND
See Also:
Constant Field Values

ZB_GET_DEVICE_INFO

static final short ZB_GET_DEVICE_INFO
See Also:
Constant Field Values

ZB_FIND_DEVICE_REQUEST

static final short ZB_FIND_DEVICE_REQUEST
See Also:
Constant Field Values

ZB_FIND_DEVICE_CONFIRM

static final short ZB_FIND_DEVICE_CONFIRM
See Also:
Constant Field Values

ZB_RESET_IND

static final short ZB_RESET_IND
See Also:
Constant Field Values

ZDO_MGMT_LQI_RSP

static final short ZDO_MGMT_LQI_RSP
See Also:
Constant Field Values

AF_DATA_CNF

static final short AF_DATA_CNF
See Also:
Constant Field Values

ZSUCCESS

static final byte ZSUCCESS
See Also:
Constant Field Values

ZFAILURE

static final byte ZFAILURE
See Also:
Constant Field Values

ZB_RESET_BY_EXT

static final byte ZB_RESET_BY_EXT
See Also:
Constant Field Values

ZB_RESET_BY_WATCHDOG

static final byte ZB_RESET_BY_WATCHDOG
See Also:
Constant Field Values
Method Detail

reset

void reset(byte resetType)
           throws java.io.IOException
Throws:
java.io.IOException

getState

int getState()
             throws java.io.IOException
Throws:
java.io.IOException

getIEEEAddress

IEEEAddress getIEEEAddress()
                           throws java.io.IOException
Throws:
java.io.IOException

getShortAddress

short getShortAddress()
                      throws java.io.IOException
Throws:
java.io.IOException

getParentIEEEAddress

IEEEAddress getParentIEEEAddress()
                                 throws java.io.IOException
Throws:
java.io.IOException

getParentShortAddress

short getParentShortAddress()
                            throws java.io.IOException
Throws:
java.io.IOException

getConfigPANID

java.lang.String getConfigPANID()
                                throws java.io.IOException
Throws:
java.io.IOException

getExtendedPANID

java.lang.String getExtendedPANID()
                                  throws java.io.IOException
Throws:
java.io.IOException

getChannel

int getChannel()
               throws java.io.IOException
Throws:
java.io.IOException

setInterfaceState

void setInterfaceState(boolean interfaceUp)
                       throws java.io.IOException
Brings up the interface (if interfaceUp is true). This must be done before packets can be sent or received.

Throws:
java.io.IOException

registerAppRequest

void registerAppRequest(byte appEndPoint,
                        short appProfileId,
                        short deviceId,
                        byte deviceVersion,
                        short[] appInClusterList,
                        short[] appOutClusterList)
                        throws java.io.IOException
Throws:
java.io.IOException

startRequest

void startRequest()
                  throws java.io.IOException
Throws:
java.io.IOException

permitJoining

void permitJoining(short deviceId,
                   byte timeout)
                   throws java.io.IOException
Throws:
java.io.IOException

allowBind

void allowBind(byte timeout)
               throws java.io.IOException
Throws:
java.io.IOException

bindDeviceRequest

void bindDeviceRequest(byte bindingRequest,
                       short commandId,
                       IEEEAddress destination)
                       throws java.io.IOException
Throws:
java.io.IOException

findDeviceRequest

void findDeviceRequest(IEEEAddress device)
                       throws java.io.IOException
Throws:
java.io.IOException

configurePA

void configurePA(boolean powerAmpOn,
                 byte powerLevel)
                 throws java.io.IOException
Throws:
java.io.IOException

sendZAccelCommand

void sendZAccelCommand(short command,
                       byte[] data)
                       throws java.io.IOException
Throws:
java.io.IOException

setStartUpOption

void setStartUpOption(byte option)
                      throws java.io.IOException
Controls the device startup options. Default is 0.

Throws:
java.io.IOException

getStartUpOption

byte getStartUpOption()
                      throws java.io.IOException
Throws:
java.io.IOException

setLogicalType

void setLogicalType(byte logicalType)
                    throws java.io.IOException
Set the ZigBee logical type of the device. Default is COORDINATOR.

Throws:
java.io.IOException

getLogicalType

byte getLogicalType()
                    throws java.io.IOException
Throws:
java.io.IOException

setPollRate

void setPollRate(short pollRate)
                 throws java.io.IOException
An End-device will wake up periodically with the non-zero duration to check for data with its parent device. Range 1-0xFFFF, in ms unit. If the value is zero, the device will not automatically wake up to poll for data. It needs an external trigger or an internal event (software timer even) to wake up the device. Default is 2000.

Throws:
java.io.IOException

getPollRate

short getPollRate()
                  throws java.io.IOException
Throws:
java.io.IOException

setQueuePollRate

void setQueuePollRate(short pollRate)
                      throws java.io.IOException
Duration to retry if the first poll fails. Default is 100.

Throws:
java.io.IOException

getQueuePollRate

short getQueuePollRate()
                       throws java.io.IOException
Throws:
java.io.IOException

setResponsePollRate

void setResponsePollRate(short pollRate)
                         throws java.io.IOException
Duration to poll for response after sending a data packet out. Default is 100.

Throws:
java.io.IOException

getResponsePollRate

short getResponsePollRate()
                          throws java.io.IOException
Throws:
java.io.IOException

setPollFailureRetries

void setPollFailureRetries(byte pollFailureRetries)
                           throws java.io.IOException
The number of times to retry before invoking the rejoin mechanism. Default is 2.

Throws:
java.io.IOException

getPollFailureRetries

byte getPollFailureRetries()
                           throws java.io.IOException
Throws:
java.io.IOException

setIndirectMessageTimeout

void setIndirectMessageTimeout(byte indirectMessageTimeout)
                               throws java.io.IOException
The amount of time (in sec) that a router or coordinator will buffer messages destined to their end-device child nodes. Recommend that this is at least greater than the poll rate. Default is 7.

Throws:
java.io.IOException

getIndirectMessageTimeout

byte getIndirectMessageTimeout()
                               throws java.io.IOException
Throws:
java.io.IOException

setApsFrameRetries

void setApsFrameRetries(byte apsFrameRetries)
                        throws java.io.IOException
Number of retransmissions of a data packet at the application layer. Default is 3.

Throws:
java.io.IOException

getApsFrameRetries

byte getApsFrameRetries()
                        throws java.io.IOException
Throws:
java.io.IOException

setApsAckWaitDuration

void setApsAckWaitDuration(short apsAckWaitDuration)
                           throws java.io.IOException
The amount of time to wait for ACK packet before retransmission. Default is 3000.

Throws:
java.io.IOException

getApsAckWaitDuration

short getApsAckWaitDuration()
                            throws java.io.IOException
Throws:
java.io.IOException

setBindingTime

void setBindingTime(short bindingTime)
                    throws java.io.IOException
The amount of time (in ms) a device will wait for a response to a binding request. Default is 8000.

Throws:
java.io.IOException

getBindingTime

short getBindingTime()
                     throws java.io.IOException
Throws:
java.io.IOException

setUserDesc

void setUserDesc(java.lang.String userDesc)
                 throws java.io.IOException
Maximum length is 17.

Throws:
java.io.IOException

getUserDesc

java.lang.String getUserDesc()
                             throws java.io.IOException
Throws:
java.io.IOException

setPANID

void setPANID(short PANID)
              throws java.io.IOException
ZigBee network ID. Default is 0xFFFF.

Throws:
java.io.IOException

getPANID

short getPANID()
               throws java.io.IOException
Throws:
java.io.IOException

setChannelList

void setChannelList(int channelList)
                    throws java.io.IOException
Bit mask of the channels on which this network can operate. Default is 0x00000800.

Throws:
java.io.IOException

getChannelList

int getChannelList()
                   throws java.io.IOException
Throws:
java.io.IOException

setPreCfgKey

void setPreCfgKey(java.lang.String preCfgKey)
                  throws java.io.IOException
Maximum length is 16.

Throws:
java.io.IOException

getPreCfgKey

java.lang.String getPreCfgKey()
                              throws java.io.IOException
Throws:
java.io.IOException

setPreCfgKeyEnable

void setPreCfgKeyEnable(boolean preCfgKeyEnable)
                        throws java.io.IOException
Throws:
java.io.IOException

getPreCfgKeyEnable

boolean getPreCfgKeyEnable()
                           throws java.io.IOException
Throws:
java.io.IOException

setSecurityMode

void setSecurityMode(boolean securityMode)
                     throws java.io.IOException
Enable or disable security mode. Default is disabled.

Throws:
java.io.IOException

getSecurityMode

boolean getSecurityMode()
                        throws java.io.IOException
Throws:
java.io.IOException

setBroadcastRetries

void setBroadcastRetries(byte broadcastRetries)
                         throws java.io.IOException
Max number for broadcast packet retransmission. Default is 2.

Throws:
java.io.IOException

getBroadcastRetries

byte getBroadcastRetries()
                         throws java.io.IOException
Throws:
java.io.IOException

setPassiveAckTimeout

void setPassiveAckTimeout(byte passiveAckTimeout)
                          throws java.io.IOException
Duration to wait (in 100ms) before retransmitting a broadcast packet Default is 5.

Throws:
java.io.IOException

getPassiveAckTimeout

byte getPassiveAckTimeout()
                          throws java.io.IOException
Throws:
java.io.IOException

setBroadcastDeliveryTime

void setBroadcastDeliveryTime(byte broadcastDeliveryTime)
                              throws java.io.IOException
The maximum amount of time (in units of 100ms) that it can take for a broadcast packet to propagate through the entire network. This includes time for all retransmissions. This parameter must be set with caution. It must be set to a value of at least (ZCD_NV_BCAST_RETRIES + 1) * (ZCD_NV_PASSIVE_ACK_TIMEOUT). To be safe, the actual value should be higher than the above minimum by about 500ms or more. Default is 30.

Throws:
java.io.IOException

getBroadcastDeliveryTime

byte getBroadcastDeliveryTime()
                              throws java.io.IOException
Throws:
java.io.IOException

setRouteExpiryTime

void setRouteExpiryTime(byte routeExpiryTime)
                        throws java.io.IOException
Throws:
java.io.IOException

getRouteExpiryTime

byte getRouteExpiryTime()
                        throws java.io.IOException
Throws:
java.io.IOException

read

int read(byte[] buf,
         int len,
         int flags)
         throws java.io.IOException
Throws:
java.io.IOException