Esp3RdVersionResponse extends Esp3ResponsePacket { public DeviceID getChipID() { return chipID; } Esp3RdVersionResponse(byte[] data); Version getAppVersion(); Version getApiVersion(); DeviceID getChipID(); String getAppDescription(); static final int ESP3_RESPONSE_RD_VERSION_APP_VERSION_INDEX; static final int ESP3_RESPONSE_RD_VERSION_API_VERSION_INDEX; static final int ESP3_RESPONSE_RD_VERSION_CHIP_ID_INDEX; static final int ESP3_RESPONSE_RD_VERSION_CHIP_VERSION_INDEX; static final int ESP3_RESPONSE_RD_VERSION_APP_DESC_INDEX; static final int ESP3_RESPONSE_RD_VERSION_APP_VERSION_LENGTH; static final int ESP3_RESPONSE_RD_VERSION_API_VERSION_LENGTH; static final int ESP3_RESPONSE_RD_VERSION_CHIP_ID_LENGTH; static final int ESP3_RESPONSE_RD_VERSION_CHIP_VERSION_LENGTH; static final int ESP3_RESPONSE_RD_VERSION_APP_DESC_LENGTH; static final int ESP3_RESPONSE_RD_VERSION_DATA_LENGTH; }
@Test public void testChipID() throws Exception { chipID = DeviceID.fromString("0x12345678"); byte[] dataBytes = createResponseDataBytes(); Esp3RdVersionResponse response = new Esp3RdVersionResponse(dataBytes); Assert.assertEquals(chipID, response.getChipID()); chipID = DeviceID.fromString("0x00000000"); dataBytes = createResponseDataBytes(); response = new Esp3RdVersionResponse(dataBytes); Assert.assertEquals(chipID, response.getChipID()); chipID = DeviceID.fromString("0xFFFFFFFF"); dataBytes = createResponseDataBytes(); response = new Esp3RdVersionResponse(dataBytes); Assert.assertEquals(chipID, response.getChipID()); }