/** still similar like u8500 */ private void updateFlashModel() { try { ListDevicesType deviceList = (ListDevicesType) equipment.sendCommand( LCDefinitions.METHOD_NAME_FLASH_LIST_DEVICES, new Object[0], equipment); if (deviceList.getStatus() == 0) { SystemCollectDataType result2 = (SystemCollectDataType) equipment.sendCommand( LCDefinitions.METHOD_NAME_SYSTEM_COLLECT_DATA, new Object[] {2}, equipment); if (result2.getStatus() == 0) { equipment.setModel( EquipmentModel.FLASH, new EquipmentFlashModel(deviceList, result2.getCollectedData())); } else { equipment.setModel(EquipmentModel.FLASH, new EquipmentFlashModel(deviceList, null)); } } else { equipment.setStatus(EquipmentState.ERROR); } } catch (Exception e) { e.printStackTrace(); } }
/** Update what task services should be supported by this equipment. */ private void updateCommandModel() { try { SupportedCommandsType supportedCommands = (SupportedCommandsType) equipment.sendCommand( LCDefinitions.METHOD_NAME_SYSTEM_SUPPORTED_COMMANDS, new Object[0], equipment); if (supportedCommands != null && supportedCommands.getStatus() == 0) { new CommandModelHelper().updateModel(supportedCommands); } else { equipment.setStatus(EquipmentState.ERROR); } } catch (Exception e) { logger.error(e.getMessage(), e); } }