added support for retrieving configuration files from config service URL and changed that to be the default, always store loaded files by relative path, changed FileReader to allow reading from stream as well

This commit is contained in:
john30
2018-04-04 10:08:46 +02:00
parent a77b740720
commit a36174c02f
10 changed files with 238 additions and 148 deletions
+12
View File
@@ -120,6 +120,18 @@ result_t loadScanConfigFile(MessageMap* messages, symbol_t address, bool verbose
*/
void executeInstructions(MessageMap* messages, bool verbose = false);
/**
* Helper method for loading definitions from a relative file from the config path/URL.
* @param reader the @a FileReader instance to load with the definitions.
* @param filename the relative name of the file being read.
* @param verbose whether to verbosely log problems.
* @param defaults the default values by name (potentially overwritten by file name), or NULL to not use defaults.
* @param errorDescription a string in which to store the error description in case of error.
* @return @a RESULT_OK on success, or an error code.
*/
result_t loadDefinitionsFromConfigPath(FileReader* reader, const string& filename, bool verbose,
map<string, string>* defaults, string* errorDescription);
} // namespace ebusd
#endif // EBUSD_MAIN_H_