Minor changes

This commit is contained in:
Loic Guegan 2023-07-15 21:49:12 +02:00
parent fe62b11365
commit d1a333925f
3 changed files with 8 additions and 8 deletions

View file

@ -9,14 +9,14 @@ MACROS=\
all: publisher subscriber logger
publisher: src/publisher.c src/utils.c
$(CC) -lzmq $^ -o $@ $(MACROS)
publisher: src/publisher.c src/utils.c config.mk
$(CC) -lzmq $(filter-out config.mk,$^) -o $@ $(MACROS)
subscriber: src/subscriber.c src/utils.c
$(CC) -lzmq $^ -o $@ $(MACROS)
subscriber: src/subscriber.c src/utils.c config.mk
$(CC) -lzmq $(filter-out config.mk,$^) -o $@ $(MACROS)
logger: src/logger.c src/utils.c
$(CC) $^ -o $@ $(MACROS)
logger: src/logger.c src/utils.c config.mk
$(CC) $(filter-out config.mk,$^) -o $@ $(MACROS)
publish: publisher logger
[ -f pid ] && { kill $(shell cat pid); rm pid; }

View file

@ -3,7 +3,7 @@ ZMQ_PORT=5556
SUBSCRIBER_ADDR=localhost
# ZMQ_TOKEN is used by ZeroMQ to detect
# messages from publishers. Leave as is if not sure.
ZMQ_TOKEN="ina260-zmq-publisher"
ZMQ_TOKEN=ina260-zmq-publisher
# ZMQ_MSG_SIZE max number of bytes per ZeroMQ messages
# be careful with this parameter
ZMQ_MSG_SIZE=2550

View file

@ -17,7 +17,7 @@ void publish(void *publisher, char *filepath, char* client, long int interval);
int main (int argc, char *argv [])
{
printf("%d\n",ZMQ_MSG_SIZE);
printf("%s\n",ZMQ_TOKEN);
if(argc != 6){
printf("Usage: %s <abslogdir> <loginterval> <ip> <port> <key>",argv[0]);
exit(1);