Search in sources :

Example 1 with EmberNeighborTableEntry

use of com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.structure.EmberNeighborTableEntry in project com.zsmartsystems.zigbee by zsmartsystems.

the class EzspGetNeighborResponseTest method testVersion.

@Test
public void testVersion() {
    EzspFrame.setEzspVersion(4);
    EzspGetNeighborResponse response = new EzspGetNeighborResponse(getPacketData("29 80 79 00 9E 72 FF 01 01 03 CC 43 6B 05 00 6F 0D 00"));
    System.out.println(response);
    assertEquals(true, response.isResponse());
    assertEquals(EzspGetNeighborResponse.FRAME_ID, response.getFrameId());
    assertEquals(EmberStatus.EMBER_SUCCESS, response.getStatus());
    EmberNeighborTableEntry neighbor = response.getValue();
    assertNotNull(neighbor);
    assertEquals(255, neighbor.getAverageLqi());
    assertEquals(1, neighbor.getInCost());
    assertEquals(1, neighbor.getOutCost());
    assertEquals(29342, neighbor.getShortId());
    assertEquals(29342, neighbor.getShortId());
    assertEquals(new IeeeAddress("000D6F00056B43CC"), neighbor.getLongId());
    assertEquals(3, neighbor.getAge());
}
Also used : EmberNeighborTableEntry(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.structure.EmberNeighborTableEntry) IeeeAddress(com.zsmartsystems.zigbee.IeeeAddress) EzspFrameTest(com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.EzspFrameTest) Test(org.junit.Test)

Aggregations

IeeeAddress (com.zsmartsystems.zigbee.IeeeAddress)1 EzspFrameTest (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.EzspFrameTest)1 EmberNeighborTableEntry (com.zsmartsystems.zigbee.dongle.ember.internal.ezsp.structure.EmberNeighborTableEntry)1 Test (org.junit.Test)1