when using userReceiver with many instances of the receiver in one program, the index will keep increasing, hence need to adjust zmq port and det index in file name

This commit is contained in:
Dhanya Maliakal
2017-06-22 12:27:17 +02:00
parent 1dc774d229
commit 98cb8de478
3 changed files with 5 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class BinaryFileStatic {
{
ostringstream osfn;
osfn << fpath << "/" << fnameprefix;
if (dindex >= 0) osfn << "_d" << (dindex * numunits + unitindex);
if (dindex >= 0) osfn << "_d" << ((unitindex >= numunits) ? unitindex : (dindex * numunits + unitindex)); //if unit index > numunits, all receivers in one program (userReceiver)
if (frindexenable) osfn << "_f" << setfill('0') << setw(12) << fnum;
osfn << "_" << findex;
osfn << ".raw";