Esp3RdVersionResponse extends Esp3ResponsePacket { public Version getApiVersion() { return apiVersion; } 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 testApiVersion() throws Exception { apiVersionMain = (byte)0xFF; apiVersionBeta = 0x03; apiVersionAlpha = 0x02; apiVersionBuild = 0x01; byte[] dataBytes = createResponseDataBytes(); Esp3RdVersionResponse response = new Esp3RdVersionResponse(dataBytes); Assert.assertEquals(apiVersionMain, response.getApiVersion().getMainVersion()); Assert.assertEquals(apiVersionBeta, response.getApiVersion().getBetaVersion()); Assert.assertEquals(apiVersionAlpha, response.getApiVersion().getAlphaVersion()); Assert.assertEquals(apiVersionBuild, response.getApiVersion().getBuild()); }