slsDetectorSoftware: updated shared memory to have _sls_ instead of _single_, and updated versions

This commit is contained in:
maliakal_d 2018-06-28 10:37:46 +02:00
parent 73ac8bab38
commit f6660c0dac
4 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ class ZmqSocket;
#include <string>
#define MULTI_SHMVERSION 0x180625
#define MULTI_SHMVERSION 0x180628
#define SHORT_STRING_LENGTH 50
#define DATE_LENGTH 30

View File

@ -13,11 +13,11 @@
#include <sstream>
SharedMemory::SharedMemory(int multiId, int singleId):
SharedMemory::SharedMemory(int multiId, int slsId):
fd(-1),
shmSize(0)
{
name = ConstructSharedMemoryName(multiId, singleId);
name = ConstructSharedMemoryName(multiId, slsId);
}
@ -105,12 +105,12 @@ void* SharedMemory::MapSharedMemory(size_t sz) {
}
std::string SharedMemory::ConstructSharedMemoryName(int multiId, int singleId) {
std::string SharedMemory::ConstructSharedMemoryName(int multiId, int slsId) {
stringstream ss;
if (singleId < 0)
if (slsId < 0)
ss << "/slsDetectorPackage_multi_" << multiId;
else
ss << "/slsDetectorPackage_multi_" << multiId << "_single_" << singleId;
ss << "/slsDetectorPackage_multi_" << multiId << "_sls_" << slsId;
std::string temp = ss.str();
if (temp.length() > NAME_MAX) {

View File

@ -17,9 +17,9 @@ public:
* Constructor
* creates the single/multi detector shared memory name
* @param multiId multi detector id
* @param singleId sls detector id, -1 if a multi detector shared memory
* @param slsId sls detector id, -1 if a multi detector shared memory
*/
SharedMemory(int multiId, int singleId);
SharedMemory(int multiId, int slsId);
/**
* Destructor
@ -74,10 +74,10 @@ private:
* Create Shared memory name
* throws exception if name created is longer than required 255(manpages)
* @param multiId multi detector id
* @param singleId sls detector id, -1 if a multi detector shared memory
* @param slsId sls detector id, -1 if a multi detector shared memory
* @returns shared memory name
*/
std::string ConstructSharedMemoryName(int multiId, int singleId);
std::string ConstructSharedMemoryName(int multiId, int slsId);
/**
* Map shared memory to an address

View File

@ -19,7 +19,7 @@ class multiSlsDetector;
class SharedMemory;
class receiverInterface;
#define SLS_SHMVERSION 0x180625
#define SLS_SHMVERSION 0x180628
#define NMODMAXX 24
#define NMODMAXY 24
#define NCHIPSMAX 10