use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeReadParameterResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ConBeeReadParameterResponseTest method readPanId.
@Test
public void readPanId() {
ConBeeReadParameterResponse readParameter = new ConBeeReadParameterResponse(new int[] { 0x0A, 0x04, 0x00, 0x0A, 0x00, 0x03, 0x00, 0x05, 0xD1, 0x06, 0x09, 0xFF });
System.out.println(readParameter);
assertEquals(4, readParameter.getSequence());
assertEquals(ConBeeStatus.SUCCESS, readParameter.getStatus());
assertEquals(ConBeeNetworkParameter.NWK_PANID, readParameter.getParameter());
assertEquals(new Integer(0x06D1), readParameter.getValue());
assertEquals(0x06D1, readParameter.getValue());
}
use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeReadParameterResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ConBeeReadParameterResponseTest method readApsExtendedPanId.
@Test
public void readApsExtendedPanId() {
ConBeeReadParameterResponse readParameter = new ConBeeReadParameterResponse(new int[] { 0x0A, 0x05, 0x00, 0x10, 0x00, 0x09, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCD, 0xFF });
System.out.println(readParameter);
assertEquals(5, readParameter.getSequence());
assertEquals(ConBeeStatus.SUCCESS, readParameter.getStatus());
assertEquals(ConBeeNetworkParameter.APS_EXTENDED_PANID, readParameter.getParameter());
assertEquals(new ExtendedPanId("0000000000000000"), readParameter.getValue());
}
use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeReadParameterResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeDongleConBee method getZigBeePanId.
@Override
public int getZigBeePanId() {
ConBeeReadParameterRequest readParameter = new ConBeeReadParameterRequest();
readParameter.setParameter(ConBeeNetworkParameter.NWK_PANID);
ConBeeReadParameterResponse response = (ConBeeReadParameterResponse) conbeeHandler.sendTransaction(new ConBeeSingleResponseTransaction(readParameter, ConBeeReadParameterResponse.class)).getResponse();
return (int) response.getValue();
}
use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeReadParameterResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeDongleConBee method getZigBeeChannel.
@Override
public int getZigBeeChannel() {
ConBeeReadParameterRequest readParameter = new ConBeeReadParameterRequest();
readParameter.setParameter(ConBeeNetworkParameter.CURRENT_CHANNEL);
ConBeeReadParameterResponse response = (ConBeeReadParameterResponse) conbeeHandler.sendTransaction(new ConBeeSingleResponseTransaction(readParameter, ConBeeReadParameterResponse.class)).getResponse();
return (int) response.getValue();
}
use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeReadParameterResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZigBeeDongleConBee method getZigBeeExtendedPanId.
@Override
public ExtendedPanId getZigBeeExtendedPanId() {
ConBeeReadParameterRequest readParameter = new ConBeeReadParameterRequest();
readParameter.setParameter(ConBeeNetworkParameter.NWK_EXTENDED_PANID);
ConBeeReadParameterResponse response = (ConBeeReadParameterResponse) conbeeHandler.sendTransaction(new ConBeeSingleResponseTransaction(readParameter, ConBeeReadParameterResponse.class)).getResponse();
return (ExtendedPanId) response.getValue();
}
Aggregations