mainloop: moved instruction execution to main loop, do not send intial scan when readonly, added "--inject" option, allow --readonly with --scanconfig[=none], store scans initiated by other participants, removed unused code

This commit is contained in:
john30
2017-04-29 15:13:05 +02:00
parent 5938628a3c
commit 33ee8ae0ed
6 changed files with 128 additions and 57 deletions
+8
View File
@@ -49,6 +49,7 @@ struct options {
bool checkConfig; //!< check CSV config files, then stop
bool dumpConfig; //!< dump CSV config files, then stop
unsigned int pollInterval; //!< poll interval in seconds, 0 to disable [5]
bool injectMessages; //!< inject remaining arguments as already seen messages
symbol_t address; //!< own bus address [31]
bool answer; //!< answer to requests from other masters
@@ -111,6 +112,13 @@ result_t loadConfigFiles(MessageMap* messages, bool verbose = false, bool denyRe
*/
result_t loadScanConfigFile(MessageMap* messages, symbol_t address, string& relativeFile, bool verbose = false);
/**
* Helper method for executing all loaded and resolvable instructions.
* @param messages the @a MessageMap instance.
* @param verbose whether to verbosely log all problems.
*/
void executeInstructions(MessageMap* messages, bool verbose = false);
} // namespace ebusd
#endif // EBUSD_MAIN_H_