summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: