summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-07-16 17:26:03 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2023-07-16 17:26:03 +0200
commitf1bbb2449f0ecbdb1ebe29e08d1aa041b8bf0f61 (patch)
tree8cd33f7b766db214872046c870e3ada86526ac1e
parentdd12a4b42f9f4619519ecc2095aa05fb37b27648 (diff)
Minor changes
-rw-r--r--README.md11
-rw-r--r--src/logger.c1
2 files changed, 11 insertions, 1 deletions
diff --git a/README.md b/README.md
index c354a96..63be914 100644
--- a/README.md
+++ b/README.md
@@ -16,4 +16,13 @@ The only dependency is [ZeroMQ](https://zeromq.org/). After installing the ZeroM
### Deployment
1. Update `config.mk` according to your needs \*\***IMPORTANT**\*\*
2. On the nodes equiped with the ina260 chips run `make publish`
-3. On the node that collect the measurements (broker, frontend etc..) run `make subscribe` \ No newline at end of file
+3. On the node that collect the measurements (broker, frontend etc..) run `make subscribe`
+
+### Notes
+- Message format used in ZeroMQ exchanges:
+
+ 1: <ZMQ_TOKEN>
+ 2: <KEY>
+ 3: <CLIENT>
+ 4: <INTERVAL>
+ 5-n:<CSV-DATA>
diff --git a/src/logger.c b/src/logger.c
index f7574d4..7a86457 100644
--- a/src/logger.c
+++ b/src/logger.c
@@ -70,6 +70,7 @@ int main (int argc, char *argv [])
while(!__stop){
interval=INTERVAL(__loginterval);
+ *logfilepath='\0'; // Clear previous path
sprintf(logfilepath,"%s/%ld",__logdir,interval);
logptr=fopen(logfilepath,"w");
// Write file header: