Esp3RdVersionResponse extends Esp3ResponsePacket { public Version getAppVersion() { return appVersion; } 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 testAppVersion() throws Exception { appVersionMain = 0x01; appVersionBeta = 0x02; appVersionAlpha = 0x03; appVersionBuild = (byte)0xFF; byte[] dataBytes = createResponseDataBytes(); Esp3RdVersionResponse response = new Esp3RdVersionResponse(dataBytes); Assert.assertEquals(appVersionMain, response.getAppVersion().getMainVersion()); Assert.assertEquals(appVersionBeta, response.getAppVersion().getBetaVersion()); Assert.assertEquals(appVersionAlpha, response.getAppVersion().getAlphaVersion()); Assert.assertEquals(appVersionBuild, response.getAppVersion().getBuild()); }