Search in sources :

Example 1 with XBeeOtaFirmwareUpdateStatusEvent

use of com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeOtaFirmwareUpdateStatusEvent in project com.zsmartsystems.zigbee by zsmartsystems.

the class XBeeEventFactoryTest method testBootloaderEvent.

@Test
public void testBootloaderEvent() {
    int[] data = getPacketData("00 16 A0 00 13 A2 00 41 62 F6 1A 00 00 01 40 00 00 00 00 00 00 00 FF FF B8");
    XBeeEvent frame = XBeeEventFactory.getXBeeFrame(data);
    assertTrue(frame instanceof XBeeOtaFirmwareUpdateStatusEvent);
    System.out.println(frame);
    XBeeOtaFirmwareUpdateStatusEvent event = (XBeeOtaFirmwareUpdateStatusEvent) frame;
    assertEquals(Integer.valueOf(0), event.getBlockNumber());
    assertEquals(new IeeeAddress("0013A2004162F61A"), event.getIeeeAddress());
    assertEquals(Integer.valueOf(0), event.getNetworkAddress());
}
Also used : XBeeOtaFirmwareUpdateStatusEvent(com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeOtaFirmwareUpdateStatusEvent) XBeeEvent(com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeEvent) IeeeAddress(com.zsmartsystems.zigbee.IeeeAddress) Test(org.junit.Test)

Aggregations

IeeeAddress (com.zsmartsystems.zigbee.IeeeAddress)1 XBeeEvent (com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeEvent)1 XBeeOtaFirmwareUpdateStatusEvent (com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeOtaFirmwareUpdateStatusEvent)1 Test (org.junit.Test)1