vector to array

This commit is contained in:
Erik Frojdh 2020-08-05 13:54:56 +02:00
parent 4aee113dda
commit 949c6a81ce
2 changed files with 2 additions and 19 deletions

View File

@ -23,29 +23,12 @@
/** cosntructor & destructor */ /** cosntructor & destructor */
Implementation::Implementation(const detectorType d) { Implementation::Implementation(const detectorType d) {
// network configuration (UDP)
eth.resize(MAX_NUMBER_OF_LISTENING_THREADS);
udpPortNum.resize(MAX_NUMBER_OF_LISTENING_THREADS);
for (int i = 0; i < MAX_NUMBER_OF_LISTENING_THREADS; ++i) {
udpPortNum[i] = DEFAULT_UDP_PORTNO + i;
}
setDetectorType(d); setDetectorType(d);
} }
Implementation::~Implementation() { Implementation::~Implementation() {
delete generalData; delete generalData;
generalData = nullptr; generalData = nullptr;
additionalJsonHeader.clear();
listener.clear();
dataProcessor.clear();
dataStreamer.clear();
fifo.clear();
eth.clear();
udpPortNum.clear();
rateCorrections.clear();
ctbDbitList.clear();
} }
void Implementation::SetLocalNetworkParameters() { void Implementation::SetLocalNetworkParameters() {

View File

@ -295,8 +295,8 @@ class Implementation : private virtual slsDetectorDefs {
// network configuration (UDP) // network configuration (UDP)
int numUDPInterfaces{1}; int numUDPInterfaces{1};
std::vector<std::string> eth; //(MAX_NUMBER_OF_LISTENING_THREADS); std::array<std::string,MAX_NUMBER_OF_LISTENING_THREADS>eth;
std::vector<uint32_t> udpPortNum; //(MAX_NUMBER_OF_LISTENING_THREADS); std::array<uint32_t,MAX_NUMBER_OF_LISTENING_THREADS> udpPortNum{DEFAULT_UDP_PORTNO, DEFAULT_UDP_PORTNO+1};
int64_t udpSocketBufferSize{0}; int64_t udpSocketBufferSize{0};
int64_t actualUDPSocketBufferSize{0}; int64_t actualUDPSocketBufferSize{0};