Search in sources :

Example 1 with ConBeeQuerySendDataResponse

use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeQuerySendDataResponse in project com.zsmartsystems.zigbee by zsmartsystems.

the class ConBeeFrameTest method testCreateQuerySendDataStateResponse.

@Test
public void testCreateQuerySendDataStateResponse() {
    ConBeeFrame frame = ConBeeFrame.create(new int[] { 0x04, 0x00, 0x00, 0x13, 0x00, 0x0C, 0x00, 0x22, 0x21, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xFF });
    System.out.println(frame);
    assertNotNull(frame);
    assertTrue(frame instanceof ConBeeQuerySendDataResponse);
    ConBeeQuerySendDataResponse sendDataResponse = (ConBeeQuerySendDataResponse) frame;
    assertEquals(0, sendDataResponse.getSequence());
    assertEquals(33, sendDataResponse.getRequestId());
    assertEquals(ConBeeNetworkState.NET_CONNECTED, sendDataResponse.getDeviceState().getNetworkState());
}
Also used : ConBeeQuerySendDataResponse(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeQuerySendDataResponse) ConBeeFrame(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeFrame) Test(org.junit.Test)

Aggregations

ConBeeFrame (com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeFrame)1 ConBeeQuerySendDataResponse (com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeQuerySendDataResponse)1 Test (org.junit.Test)1