@Test public void testAshFrameData() throws Exception { AshFrameData frame; EzspVersionRequest request = new EzspVersionRequest(); TestUtilities.setField(EzspFrame.class, request, "sequenceNumber", 1); request.setDesiredProtocolVersion(4); frame = new AshFrameData(request); System.out.println(frame); assertTrue(Arrays.equals(new int[] { 0, 67, 33, 168, 80, 155, 152, 126 }, frame.getOutputBuffer())); request = new EzspVersionRequest(); TestUtilities.setField(EzspFrame.class, request, "sequenceNumber", 2); request.setDesiredProtocolVersion(4); frame = new AshFrameData(request); frame.setAckNum(3); frame.setFrmNum(4); System.out.println(frame); assertTrue(Arrays.equals(new int[] { 67, 64, 33, 168, 80, 255, 254, 126 }, frame.getOutputBuffer())); request = new EzspVersionRequest(); TestUtilities.setField(EzspFrame.class, request, "sequenceNumber", 3); request.setDesiredProtocolVersion(4); frame = new AshFrameData(request); frame.setAckNum(6); frame.setFrmNum(2); frame.setReTx(); System.out.println(frame); assertTrue(Arrays.equals(new int[] { 46, 65, 33, 168, 80, 177, 236, 126 }, frame.getOutputBuffer())); AshFrame inFrame = AshFrame.createFromInput(new int[] { 46, 65, 33, 168, 80, 177, 236 }); assertTrue(inFrame instanceof AshFrameData); assertEquals(6, inFrame.getAckNum()); assertEquals(2, inFrame.getFrmNum()); assertEquals(FrameType.DATA, inFrame.getFrameType()); }
public AshFrameData(EzspFrameRequest ezspRequestFrame) { frameType = FrameType.DATA; dataBuffer = ezspRequestFrame.serialize(); }
AshFrameData extends AshFrame { public AshFrameData(EzspFrameRequest ezspRequestFrame) { frameType = FrameType.DATA; dataBuffer = ezspRequestFrame.serialize(); } }
AshFrameData extends AshFrame { public AshFrameData(EzspFrameRequest ezspRequestFrame) { frameType = FrameType.DATA; dataBuffer = ezspRequestFrame.serialize(); } AshFrameData(EzspFrameRequest ezspRequestFrame);  AshFrameData(int[] frameBuffer); }
AshFrameData extends AshFrame { public AshFrameData(EzspFrameRequest ezspRequestFrame) { frameType = FrameType.DATA; dataBuffer = ezspRequestFrame.serialize(); } AshFrameData(EzspFrameRequest ezspRequestFrame);  AshFrameData(int[] frameBuffer); void setReTx(); boolean getReTx(); int[] getDataBuffer(); @Override String toString(); }
AshFrameData extends AshFrame { public AshFrameData(EzspFrameRequest ezspRequestFrame) { frameType = FrameType.DATA; dataBuffer = ezspRequestFrame.serialize(); } AshFrameData(EzspFrameRequest ezspRequestFrame);  AshFrameData(int[] frameBuffer); void setReTx(); boolean getReTx(); int[] getDataBuffer(); @Override String toString();  }