Get the status of the device

@return the status
@throws DevFailed
9747
public String updateStatus(final DeviceState state) throws DevFailed {
        xlogger.entry();
        if (getStatusMethod != null) {
            try {
                status = (String) getStatusMethod.invoke(businessObject);
            } catch (final IllegalArgumentException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final IllegalAccessException e) {
                throw DevFailedUtils.newDevFailed(e);
            } catch (final InvocationTargetException e) {
                if (e.getCause() instanceof DevFailed) {
                    throw (DevFailed) e.getCause();
                } else {
                    throw DevFailedUtils.newDevFailed("INVOCATION_ERROR", ExceptionUtils.getStackTrace(e.getCause())
                            + " InvocationTargetException");
                }
            }
        } else {
            if (status.isEmpty()) {
                status = "The device is in " + state + " state.";
            }
        }
        StringBuilder statusAlarm = new StringBuilder();
        for (final String string : attributeAlarm.values()) {
            statusAlarm = statusAlarm.append(string);
        }

        return status + statusAlarm;
    }
895980
Command get_command(final String cmd_name) throws DevFailed {
	Command ret_cmd = null;
	final Vector cmd_list = device_class.get_command_list();
	for (int i = 0; i < cmd_list.size(); i++) {
	    final Command cmd = (Command) cmd_list.elementAt(i);
	    if (cmd.get_name().toLowerCase().equals(cmd_name.toLowerCase())) {
		ret_cmd = cmd;
	    }
	}

	if (ret_cmd == null) {
	    Except.throw_exception("API_CommandNotFound", "Command " + cmd_name + " not found",
		    "DeviceImpl.get_command");
	}

	return ret_cmd;
    }
526370
@Command(name = "DevLockStatus", inTypeDesc = DEVICE_NAME, outTypeDesc = "Device locking status")
    public DevVarLongStringArray devLockStatus(final String deviceName) throws DevFailed {
        DevVarLongStringArray result = null;
        int nbClasses = 0;
        final String fullDeviceName = TangoUtil.getfullNameForDevice(deviceName);
        for (final DeviceClassBuilder deviceClass : classList) {
            if (deviceClass.containsDevice(fullDeviceName)) {
                result = deviceClass.getDeviceImpl(fullDeviceName).getLockStatus();
                logger.debug("DevLockStatus {} {}", Arrays.toString(result.lvalue), Arrays.toString(result.svalue));
                xlogger.exit();
                break;
            }
            nbClasses++;
        }
        if (nbClasses == classList.size()) {
            throw DevFailedUtils.newDevFailed(ExceptionMessages.DEVICE_NOT_FOUND, deviceName + DOES_NOT_EXISTS);
        }
        return result;
    }
449384
public String status(final DeviceProxy deviceProxy, final boolean src) throws DevFailed {

        build_connection(deviceProxy);

        if (deviceProxy.url.protocol == TANGO) {
            String status = "Unknown";
            final int retries = deviceProxy.transparent_reconnection ? 2 : 1;
            boolean done = false;
            for (int i = 0; i < retries && !done; i++) {
            try {
                //noinspection PointlessBooleanExpression
                if (src == ApiDefs.FROM_ATTR) {
                    status = deviceProxy.device.status();
                } else {
                    final DeviceData argout = deviceProxy.command_inout("Status");
                    status = argout.extractString();
                }
                done = true;
            } catch (final Exception e) {
                manageExceptionReconnection(deviceProxy, retries, i, e, this.getClass()
                    + ".status");
            }
            }
            return status;
        } else {
            return command_inout(deviceProxy, "DevStatus").extractString();
        }
    }
797083
public String get_class_for_device(Database database, String deviceName)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        argIn.insert(deviceName);
        DeviceData argOut = command_inout(database, "DbGetClassForDevice", argIn);
        return argOut.extractString();
    }
1043877
public DeviceData command_inout(String command, DeviceData argin) throws DevFailed {
		return iConnection.command_inout(this, command, argin);
	}
1099173
public DevState getState() throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        if (isCorrectlyInit.get() && initImpl.isInitDoneCorrectly()) {
            state = stateImpl.updateState();
            // read all attributes to check alarms only if on
            if (state == DevState.ON && stateCheckAttrAlarm) {
                checkAlarms();
            }
        } else {
            state = stateImpl.getState();
        }
        return state;
    }
1082174
private void get_dev_system_resource() throws DevFailed {

	//
	// Try to retrieve resources for device black box depth and device
	// description
	//

	if (Util._UseDb) {
	    try {
		final String[] prop_names = { "blackbox_depth", "description", "poll_ring_depth",
			"polled_cmd", "polled_attr", "non_auto_polled_cmd", "non_auto_polled_attr",
			"poll_old_factor" };

		// Call db server
		final DbDatum[] res_value = db_dev.get_property(prop_names);

		int i = 0;
		if (res_value[i].is_empty() == false) {
		    blackbox_depth = res_value[i].extractLong();
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    desc = res_value[i].extractString();
		}
		i++;

		if (res_value[i].is_empty() == false) {
		    set_poll_ring_depth(res_value[i].extractLong());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_cmd(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_non_auto_polled_attr(res_value[i].extractStringArray());
		}
		i++;
		if (res_value[i].is_empty() == false) {
		    set_poll_old_factor(res_value[i].extractLong());
		} else {
		    set_poll_old_factor(Tango_DEFAULT_POLL_OLD_FACTOR);
		}
	    } catch (final DevFailed e) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    } catch (final BAD_OPERATION ex) {
		final StringBuffer o = new StringBuffer(
			"Database error while trying to retrieve device properties for device ");
		o.append(device_name);

		Except.throw_exception("API_DatabaseAccess", o.toString(),
			"DeviceImpl.get_dev_system_resource");
	    }
	}
    }
876103
@Override
    public DevInfo info() throws DevFailed {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        deviceMonitoring.startRequest("Operation info");
        final DevInfo info = new DevInfo();
        info.dev_class = className;
        info.doc_url = "Doc URL = http://www.tango-controls.org";
        info.server_host = ServerManager.getInstance().getHostName();
        info.server_id = ServerManager.getInstance().getServerName();
        info.server_version = SERVER_VERSION;
        xlogger.exit();
        return info;
    }
1227771
@Override
    public String[] getDeviceList(final String serverName, final String className) throws DevFailed {
        return cache.getDeviceList(serverName, className);
    }
579132
@Override
    public void exportDevice(final DeviceExportInfo info) throws DevFailed {
        final String[] array = info.toStringArray();
        final DeviceData argin = new DeviceData();
        argin.insert(array);
        database.command_inout("DbExportDevice", argin);
    }
1291478
public DeviceData command_inout(final Connection connection, final String command)
	    	throws DevFailed {
		final DeviceData argin = new DeviceData();
		return command_inout(connection, command, argin);
    }
657473
@Override
    public Map<String, String[]> getDeviceProperties(final String name, final String... propertyNames) throws DevFailed {
        Map<String, String[]> map;
        if (propertyNames.length == 0) {
            map = getProperties(PropertyType.Device, name);
        } else {
            map = getProperty(PropertyType.Device, name, propertyNames);
        }
        return map;
    }
719204
public String getAliasFromDevice(Database database, String deviceName) throws DevFailed {
        DeviceData argIn = new DeviceData();
        argIn.insert(deviceName);
        DeviceData argOut = command_inout(database, "DbGetDeviceAlias", argIn);
        return argOut.extractString();
    }
1180191
@Transient
    public String getStatus()
    {
        if(hasFailed()) return FAILED; 
        if(hasSucceeded()) return SUCCESS; 
        if(ignored != 0) return IGNORED; 
        return NOT_RUNNED; 
    }
1130048
public DeviceInfo get_info(final DeviceProxy deviceProxy) throws DevFailed {
		checkIfUseDb(deviceProxy, "get_info()");

		if (deviceProxy.getDb_dev() == null) {
	    	deviceProxy.setDb_dev(new DbDevice(deviceProxy.devname, deviceProxy.url.host,
		    	deviceProxy.url.strPort));
		}
		// checkIfTango("import_device");
		if (deviceProxy.url.protocol == TANGO) {
	    	return deviceProxy.getDb_dev().get_info();
		} else {
	    	return null;
		}
    }
614271
public DbDatum[] get_device_property(Database database, String name, DbDatum[] properties)
            throws DevFailed {
        String type = "Device";    //	Device object type
        return get_obj_property(database, name, type, properties);
    }