From 3ed96f9c9a813130f26cd1187fc439440067e5cc Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 15 Jul 2023 19:45:32 +0200 Subject: [PATCH] Minor changes --- .gitignore | 2 +- Makefile | 5 +++-- config.mk | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dbc4b4c..4df076a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,4 @@ # Caches /logs -/cdata \ No newline at end of file +/data \ No newline at end of file diff --git a/Makefile b/Makefile index d12d046..b08b9cd 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,11 @@ logger: src/logger.c src/utils.c $(CC) $^ -o $@ publish: publisher logger - $(error "Not yet implemented") + ./logger $(LOGGERS_DIR) 587 $(LOG_INTERVAL) & + ./publisher $(LOGGERS_DIR) $(LOG_INTERVAL) $(SUBSCRIBER_ADDR) $(ZMQ_PORT) $(KEY) & subscribe: subscriber - $(error "Not yet implemented") + ./subscriber $(ZMQ_PORT) $(SUBSCRIBER_DIR) clean: rm -f logger subscriber publisher diff --git a/config.mk b/config.mk index 6a985af..40409b2 100644 --- a/config.mk +++ b/config.mk @@ -6,6 +6,9 @@ SUBSCRIBER_ADDR=localhost # LOGGERS_DIR will contains all the data generated by the loggers # a.k.a the ina260 power measurements LOGGERS_DIR=./logs +# SUBSCRIBER_DIR will contain all the measurments +# received from the publishers +SUBSCRIBER_DIR=./data # LOG_INTERVAL determined the duration # of a logging period. At the end of a logging period, # a file with all the power measurements is generated by the logger in LOGGERS_DIR