#include "options.h"
#include "error.h"
#include "print.h"
+#include "rs485.h"
+#include "timestamp.h"
+#include "alert.h"
static struct config_t *c;
option.prefix_key = value[0];
}
}
-
+ else if (!strcmp(name, "response-wait"))
+ {
+ if (!strcmp(value, "enable"))
+ {
+ option.response_wait = true;
+ }
+ else if (!strcmp(value, "disable"))
+ {
+ option.response_wait = false;
+ }
+ }
+ else if (!strcmp(name, "response-timeout"))
+ {
+ option.response_timeout = atoi(value);
+ }
+ else if (!strcmp(name, "rs-485"))
+ {
+ if (!strcmp(value, "enable"))
+ {
+ option.rs485 = true;
+ }
+ else if (!strcmp(value, "disable"))
+ {
+ option.rs485 = false;
+ }
+ }
+ else if (!strcmp(name, "rs-485-config"))
+ {
+ rs485_parse_config(value);
+ }
+ else if (!strcmp(name, "alert"))
+ {
+ option.alert = alert_option_parse(value);
+ }
}
+
return 0;
}