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
dd12a4b42f
commit
f1bbb2449f
2 changed files with 11 additions and 1 deletions
11
README.md
11
README.md
|
@ -16,4 +16,13 @@ The only dependency is [ZeroMQ](https://zeromq.org/). After installing the ZeroM
|
||||||
### Deployment
|
### Deployment
|
||||||
1. Update `config.mk` according to your needs \*\***IMPORTANT**\*\*
|
1. Update `config.mk` according to your needs \*\***IMPORTANT**\*\*
|
||||||
2. On the nodes equiped with the ina260 chips run `make publish`
|
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`
|
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>
|
||||||
|
|
|
@ -70,6 +70,7 @@ int main (int argc, char *argv [])
|
||||||
|
|
||||||
while(!__stop){
|
while(!__stop){
|
||||||
interval=INTERVAL(__loginterval);
|
interval=INTERVAL(__loginterval);
|
||||||
|
*logfilepath='\0'; // Clear previous path
|
||||||
sprintf(logfilepath,"%s/%ld",__logdir,interval);
|
sprintf(logfilepath,"%s/%ld",__logdir,interval);
|
||||||
logptr=fopen(logfilepath,"w");
|
logptr=fopen(logfilepath,"w");
|
||||||
// Write file header:
|
// Write file header:
|
||||||
|
|
Loading…
Add table
Reference in a new issue