From 24672363c498b62c7669f4f4da03606917db00a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilja=20Karta=C5=A1ov?= Date: Thu, 25 Jul 2019 09:59:25 +0200 Subject: [PATCH] Update todo, add config module and update submodules references --- cStuff | 2 +- sdk | 2 +- src/agent.c | 6 ++++++ src/config.c | 24 ++++++++++++++++++++++++ src/config.h | 31 ++----------------------------- todo.txt | 20 +++++++++----------- 6 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 src/config.c diff --git a/cStuff b/cStuff index 93234df..17ce2c5 160000 --- a/cStuff +++ b/cStuff @@ -1 +1 @@ -Subproject commit 93234df78dd500bc1f02c306d1effe6fc5270100 +Subproject commit 17ce2c5753c5512f7acf5aac0d15b9587be79b7f diff --git a/sdk b/sdk index f43bb30..6347444 160000 --- a/sdk +++ b/sdk @@ -1 +1 @@ -Subproject commit f43bb30065682b2ea9eeb1395b640cd0abacb9cb +Subproject commit 634744449404cace0d8040e699f61d9b46ef957c diff --git a/src/agent.c b/src/agent.c index f324b1c..851cd5f 100644 --- a/src/agent.c +++ b/src/agent.c @@ -33,5 +33,11 @@ agent_release(void) int agent_run_cycle(void) { + int result = 0, rc; + + if ((rc = surgard_run_cycle())) { + result = rc; + } +: return 1; } diff --git a/src/config.c b/src/config.c new file mode 100644 index 0000000..2945f30 --- /dev/null +++ b/src/config.c @@ -0,0 +1,24 @@ +/****************************************************************************** + * + * Copyright (c) 2017-2019 by Löwenware Ltd + * Please, refer LICENSE file for legal information + * + ******************************************************************************/ + +/** + * @file config.c + * @author Ilja Kartašov + * @brief + * + * @see https://lowenware.com/ + */ + +#include +#include "config.h" + +int +config_read(void) +{ + +} + diff --git a/src/config.h b/src/config.h index a4f1b83..1f9c391 100644 --- a/src/config.h +++ b/src/config.h @@ -25,34 +25,7 @@ #define CONFIG_LOG_TARGET "output.log" #endif -#ifndef CONFIG_SMTP_SERVER -#define CONFIG_SMTP_SERVER "mx.lowenware.com" -#endif - -#ifndef CONFIG_SMTP_PORT -#define CONFIG_SMTP_PORT 465 -#endif - -#ifndef CONFIG_SMTP_USER -#define CONFIG_SMTP_USER "robot@lowenware.com" -#endif - -#ifndef CONFIG_SMTP_PASS -#define CONFIG_SMTP_PASS "3HFzxiQYY9QJ6LN3" /* +){xA8}(mNF43B(~" */ -#endif - -#ifndef CONFIG_MAIL_FROM -#define CONFIG_MAIL_FROM CONFIG_SMTP_USER -#endif - -#ifndef CONFIG_MAIL_TO -#define CONFIG_MAIL_TO "ik@lowenware.com" -#endif - -#ifndef CONFIG_MAIL_SUBJECT -#define CONFIG_MAIL_SUBJECT "Feedback from website" -#endif - - +int +config_read(void); #endif /* !CONFIG_H */ diff --git a/todo.txt b/todo.txt index 126499c..6b649f2 100644 --- a/todo.txt +++ b/todo.txt @@ -1,12 +1,10 @@ -Port templight to SDK -Implement authentication UI -Implement authentication modules in SDK -Implement serial surgard receiver -Implement EBS OSM receiver -Define device file format -Implement device logs -Implement ARC journal -Implement device cards -Implement routes +Agent configuration manager +Surgard module +Authentication +Monitoring module +Editor module +EBS OSM module x Create project repository - +x Port templight to SDK +x Implement authentication modules in SDK +x Configuration parser