mirror of
https://gitlab.com/manzerbredes/ina260-zmq-publisher.git
synced 2025-04-07 04:16:26 +02:00
Minor changes
This commit is contained in:
parent
c61c717fbb
commit
dbd45e0fa0
2 changed files with 5 additions and 4 deletions
|
@ -8,8 +8,8 @@ SUBSCRIBER_ADDR=localhost
|
||||||
# messages from publishers. Leave as is if not sure.
|
# 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
|
# ZMQ_MSG_SIZE max number of bytes per ZeroMQ messages
|
||||||
# Be careful with this parameter
|
# Be careful with this parameter. Default is 5MiB
|
||||||
ZMQ_MSG_SIZE=2550
|
ZMQ_MSG_SIZE=5242880
|
||||||
|
|
||||||
##### Logger/Publisher
|
##### Logger/Publisher
|
||||||
# LOGGERS_DIR will contains all the data generated by the loggers
|
# LOGGERS_DIR will contains all the data generated by the loggers
|
||||||
|
|
|
@ -54,7 +54,8 @@ int main (int argc, char *argv [])
|
||||||
interval=atoi(token);
|
interval=atoi(token);
|
||||||
|
|
||||||
if(line==4){
|
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]="";
|
char path[STATIC_LEN]="";
|
||||||
//sprintf(path,"%s/%s_%s_%ld",cdatadir,key,client,interval);
|
//sprintf(path,"%s/%s_%s_%ld",cdatadir,key,client,interval);
|
||||||
sprintf(path,"%s/%s/%s/",cdatadir,key,client);
|
sprintf(path,"%s/%s/%s/",cdatadir,key,client);
|
||||||
|
@ -67,7 +68,7 @@ int main (int argc, char *argv [])
|
||||||
|
|
||||||
if(line>4){
|
if(line>4){
|
||||||
fwrite(token, strlen(token), 1, fptr);
|
fwrite(token, strlen(token), 1, fptr);
|
||||||
fwrite("\n",2,1,fptr);
|
fwrite("\n",1,1,fptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
token=strtok(NULL, "\n");
|
token=strtok(NULL, "\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue