+
+ /**
+ * A private method to read the language of the object, i.e. driver
+ *
+ * @params strObjName String object name
+ * @params strObjClassName String object class name
+ * @return String
+ */
+ private String readObjectLanguage(String strObjName, String strObjClassName) {
+
+ // Read config file
+ String sCfgFile = STR_IOT_CODE_PATH + strObjClassName + "/" + strObjClassName + STR_CFG_FILE_EXT;
+ String strLanguageDriver = parseConfigFile(sCfgFile, STR_LANGUAGE + "_" + strObjName);
+ if(strLanguageDriver == null) // Read just the field LANGUAGE if the first read is null
+ strLanguageDriver = parseConfigFile(sCfgFile, STR_LANGUAGE);
+ if(strLanguageDriver == null) // Check nullness for the second time - report if it is still null
+ throw new Error("IoTMaster: Language specification missing in config file: " + sCfgFile);