Search in sources :

Example 1 with ConBeeFrame

use of com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeFrame 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)

Example 2 with ConBeeFrame

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

the class ConBeeFrameTest method testCreateDeviceStateResponse.

@Test
public void testCreateDeviceStateResponse() {
    ConBeeFrame frame = ConBeeFrame.create(new int[] { 0x07, 0x00, 0x00, 0x08, 0x00, 0xA2, 0x00, 0x00, 0x4F, 0xFF });
    System.out.println(frame);
    assertNotNull(frame);
    assertTrue(frame instanceof ConBeeDeviceStateResponse);
    assertEquals(0, frame.getSequence());
}
Also used : ConBeeFrame(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeFrame) ConBeeDeviceStateResponse(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeDeviceStateResponse) Test(org.junit.Test)

Example 3 with ConBeeFrame

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

the class ConBeeFrameTest method testCreateEnqueueSendDataResponse.

@Test
public void testCreateEnqueueSendDataResponse() {
    ConBeeFrame frame = ConBeeFrame.create(new int[] { 0x12, 0x0D, 0x00, 0x09, 0x00, 0x02, 0x00, 0x22, 0x00, 0xB4, 0xFF });
    System.out.println(frame);
    assertNotNull(frame);
    assertTrue(frame instanceof ConBeeEnqueueSendDataResponse);
    assertEquals(13, frame.getSequence());
}
Also used : ConBeeEnqueueSendDataResponse(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeEnqueueSendDataResponse) ConBeeFrame(com.zsmartsystems.zigbee.dongle.conbee.internal.frame.ConBeeFrame) Test(org.junit.Test)

Aggregations

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