}
}
// Get the values of properties don t throw a error if not exist !!
public ISuggestions getDevicesSuggestions(String scanServerName) throws SalsaDeviceException {
ISuggestions suggestions = new SuggestionsImpl();
Database m_database = null;
try {
m_database = new Database();
} catch (DevFailed e) {
String errorMessage = "Cannot create database device " + DevFailedUtils.toString(e);
LOGGER.warn(errorMessage);
LOGGER.debug("Stack trace", e);
return suggestions;
}
if (m_database != null) {
// get ActuatorsFile property
try {
DbDatum m_dataActuators = m_database.get_device_property(scanServerName, "ActuatorsFile");
String[] actuatorsFile = m_dataActuators.extractStringArray();
suggestions.setActuatorSuggestionList(parseSuggestions(scanServerName, "ActuatorsFile", actuatorsFile));
} catch (DevFailed e) {
String errorMessage = "Cannot read property " + scanServerName + "/ActuatorsFile" + " "
+ DevFailedUtils.toString(e);
LOGGER.warn(errorMessage);
}
// get SensorsFile property
try {
DbDatum m_dataSensors = m_database.get_device_property(scanServerName, "SensorsFile");
String[] sensorsFile = m_dataSensors.extractStringArray();
suggestions.setSensorSuggestionList(parseSuggestions(scanServerName, "SensorsFile", sensorsFile));
} catch (DevFailed e) {
String errorMessage = "Cannot read property " + scanServerName + "/SensorsFile" + " "
+ DevFailedUtils.toString(e);
LOGGER.warn(errorMessage);
LOGGER.debug("Stack trace", e);
}
// get TimebasesFile property
try {
DbDatum m_dataTimebases = m_database.get_device_property(scanServerName, "TimebasesFile");
String[] timebasesFile = m_dataTimebases.extractStringArray();
suggestions.setTimebaseSuggestionList(parseSuggestions(scanServerName, "TimebasesFile", timebasesFile));
} catch (DevFailed e) {
String errorMessage = "Cannot read property " + scanServerName + "/TimebasesFile" + " "
+ DevFailedUtils.toString(e);
LOGGER.warn(errorMessage);
LOGGER.debug("Stack trace", e);