default initializer for slsDetector

This commit is contained in:
Erik Frojdh 2019-01-10 16:02:29 +01:00
parent 230c335c29
commit 15235ab4fc
2 changed files with 13 additions and 35 deletions

View File

@ -24,18 +24,7 @@
slsDetector::slsDetector(detectorType type, int multiId, int id, bool verify) slsDetector::slsDetector(detectorType type, int multiId, int id, bool verify)
: detId(id), : detId(id){
sharedMemory(nullptr),
thisDetector(nullptr),
thisDetectorControl(nullptr),
thisDetectorStop(nullptr),
thisReceiver(nullptr),
controlSocket(nullptr),
stopSocket(nullptr),
dataSocket(nullptr),
detectorModules(nullptr),
dacs(nullptr),
chanregs(nullptr) {
/* called from put hostname command, /* called from put hostname command,
* so sls shared memory will be created */ * so sls shared memory will be created */
@ -55,18 +44,7 @@ slsDetector::slsDetector(detectorType type, int multiId, int id, bool verify)
slsDetector::slsDetector(int multiId, int id, bool verify) slsDetector::slsDetector(int multiId, int id, bool verify)
: detId(id), : detId(id){
sharedMemory(nullptr),
thisDetector(nullptr),
thisDetectorControl(nullptr),
thisDetectorStop(nullptr),
thisReceiver(nullptr),
controlSocket(nullptr),
stopSocket(nullptr),
dataSocket(nullptr),
detectorModules(nullptr),
dacs(nullptr),
chanregs(nullptr) {
/* called from multi constructor to populate structure, /* called from multi constructor to populate structure,
* so sls shared memory will be opened, not created */ * so sls shared memory will be opened, not created */

View File

@ -1797,37 +1797,37 @@ private:
int detId; int detId;
/** Shared Memory object */ /** Shared Memory object */
SharedMemory* sharedMemory; SharedMemory* sharedMemory {nullptr};
/** Shared memory structure */ /** Shared memory structure */
sharedSlsDetector *thisDetector; sharedSlsDetector *thisDetector {nullptr};
/** control socket interface */ /** control socket interface */
ClientInterface *thisDetectorControl; ClientInterface *thisDetectorControl {nullptr};
/** stop socket interface */ /** stop socket interface */
ClientInterface *thisDetectorStop; ClientInterface *thisDetectorStop {nullptr};
/** receiver interface */ /** receiver interface */
ClientInterface *thisReceiver; ClientInterface *thisReceiver {nullptr};
/** socket for control commands */ /** socket for control commands */
MySocketTCP *controlSocket; MySocketTCP *controlSocket {nullptr};
/** socket for emergency stop */ /** socket for emergency stop */
MySocketTCP *stopSocket; MySocketTCP *stopSocket {nullptr};
/** socket for data acquisition */ /** socket for data acquisition */
MySocketTCP *dataSocket; MySocketTCP *dataSocket {nullptr};
/** pointer to detector module structures in shared memory */ /** pointer to detector module structures in shared memory */
sls_detector_module *detectorModules; sls_detector_module *detectorModules {nullptr};
/** pointer to dac valuse in shared memory */ /** pointer to dac valuse in shared memory */
int *dacs; int *dacs {nullptr};
/** pointer to channal registers in shared memory */ /** pointer to channal registers in shared memory */
int *chanregs; int *chanregs {nullptr};
}; };
#endif #endif