Minor changes

This commit is contained in:
Loic Guegan 2023-07-16 12:46:22 +02:00
parent c61c717fbb
commit dbd45e0fa0
2 changed files with 5 additions and 4 deletions

View file

@ -8,8 +8,8 @@ SUBSCRIBER_ADDR=localhost
# messages from publishers. Leave as is if not sure.
ZMQ_TOKEN=ina260-zmq-publisher
# ZMQ_MSG_SIZE max number of bytes per ZeroMQ messages
# Be careful with this parameter
ZMQ_MSG_SIZE=2550
# Be careful with this parameter. Default is 5MiB
ZMQ_MSG_SIZE=5242880
##### Logger/Publisher
# LOGGERS_DIR will contains all the data generated by the loggers

View file

@ -54,7 +54,8 @@ int main (int argc, char *argv [])
interval=atoi(token);
if(line==4){
printf("Data received: key=%s client=%s interval=%ld\n",key, client, interval);
double size_mib=size/(1024*1024);
printf("Data received: key=%s client=%s interval=%ld msgsize=%.2lfMiB\n",key, client, interval,size_mib);
char path[STATIC_LEN]="";
//sprintf(path,"%s/%s_%s_%ld",cdatadir,key,client,interval);
sprintf(path,"%s/%s/%s/",cdatadir,key,client);
@ -67,7 +68,7 @@ int main (int argc, char *argv [])
if(line>4){
fwrite(token, strlen(token), 1, fptr);
fwrite("\n",2,1,fptr);
fwrite("\n",1,1,fptr);
}
token=strtok(NULL, "\n");