Search in sources :

Example 1 with XBeeTransmitStatusResponse

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

the class XBeeResponseFactoryTest method testGetResponse1.

@Test
public void testGetResponse1() {
    int[] data = getPacketData("00 07 8B 8F F7 7B 00 00 40 33");
    XBeeResponse frame = XBeeResponseFactory.getXBeeFrame(data);
    assertTrue(frame instanceof XBeeTransmitStatusResponse);
    System.out.println(frame);
    XBeeTransmitStatusResponse event = (XBeeTransmitStatusResponse) frame;
    assertEquals(Integer.valueOf(143), event.getFrameId());
    assertEquals(Integer.valueOf(0), event.getTransmitRetryCount());
    assertEquals(DeliveryStatus.SUCCESS, event.getDeliveryStatus());
    assertEquals(DiscoveryStatus.EXTENDED_TIMEOUT_DISCOVERY, event.getDiscoveryStatus());
}
Also used : XBeeResponse(com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeResponse) XBeeTransmitStatusResponse(com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeTransmitStatusResponse) Test(org.junit.Test)

Aggregations

XBeeResponse (com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeResponse)1 XBeeTransmitStatusResponse (com.zsmartsystems.zigbee.dongle.xbee.internal.protocol.XBeeTransmitStatusResponse)1 Test (org.junit.Test)1