slsReceiver: remove static members in Listener, DataProcessing and DataStreamer:

* Needed when more than one receiver is created by process
* Replace NumberofXxxx by explicit index in constructor
* Remove Error[Mask], use return value in constructor signature
* Replace RunningMask by individual Running flags
* Remove obsolete Mutex objects
This commit is contained in:
2018-04-25 09:24:39 +02:00
parent 62a88dadba
commit b5909044f6
11 changed files with 200 additions and 344 deletions

View File

@ -12,10 +12,9 @@
#include <cstring>
using namespace std;
int Fifo::NumberofFifoClassObjects(0);
Fifo::Fifo(uint32_t fifoItemSize, uint32_t depth, bool &success):
index(NumberofFifoClassObjects),
Fifo::Fifo(int ind, uint32_t fifoItemSize, uint32_t depth, bool &success):
index(ind),
memory(0),
fifoBound(0),
fifoFree(0),
@ -24,7 +23,7 @@ Fifo::Fifo(uint32_t fifoItemSize, uint32_t depth, bool &success):
status_fifoBound(0),
status_fifoFree(depth){
FILE_LOG(logDEBUG) << __AT__ << " called";
NumberofFifoClassObjects++;
success = true;
if(CreateFifos(fifoItemSize) == FAIL)
success = false;
}
@ -34,7 +33,6 @@ Fifo::~Fifo() {
FILE_LOG(logDEBUG) << __AT__ << " called";
//cprintf(BLUE,"Fifo Object %d: Goodbye\n", index);
DestroyFifos();
NumberofFifoClassObjects--;
}