mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
slsDetectorSoftware: updated shared memory to have _sls_ instead of _single_, and updated versions
This commit is contained in:
parent
73ac8bab38
commit
f6660c0dac
@ -19,7 +19,7 @@ class ZmqSocket;
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
#define MULTI_SHMVERSION 0x180625
|
#define MULTI_SHMVERSION 0x180628
|
||||||
#define SHORT_STRING_LENGTH 50
|
#define SHORT_STRING_LENGTH 50
|
||||||
#define DATE_LENGTH 30
|
#define DATE_LENGTH 30
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
SharedMemory::SharedMemory(int multiId, int singleId):
|
SharedMemory::SharedMemory(int multiId, int slsId):
|
||||||
fd(-1),
|
fd(-1),
|
||||||
shmSize(0)
|
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;
|
stringstream ss;
|
||||||
if (singleId < 0)
|
if (slsId < 0)
|
||||||
ss << "/slsDetectorPackage_multi_" << multiId;
|
ss << "/slsDetectorPackage_multi_" << multiId;
|
||||||
else
|
else
|
||||||
ss << "/slsDetectorPackage_multi_" << multiId << "_single_" << singleId;
|
ss << "/slsDetectorPackage_multi_" << multiId << "_sls_" << slsId;
|
||||||
|
|
||||||
std::string temp = ss.str();
|
std::string temp = ss.str();
|
||||||
if (temp.length() > NAME_MAX) {
|
if (temp.length() > NAME_MAX) {
|
||||||
|
@ -17,9 +17,9 @@ public:
|
|||||||
* Constructor
|
* Constructor
|
||||||
* creates the single/multi detector shared memory name
|
* creates the single/multi detector shared memory name
|
||||||
* @param multiId multi detector id
|
* @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
|
* Destructor
|
||||||
@ -74,10 +74,10 @@ private:
|
|||||||
* Create Shared memory name
|
* Create Shared memory name
|
||||||
* throws exception if name created is longer than required 255(manpages)
|
* throws exception if name created is longer than required 255(manpages)
|
||||||
* @param multiId multi detector id
|
* @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
|
* @returns shared memory name
|
||||||
*/
|
*/
|
||||||
std::string ConstructSharedMemoryName(int multiId, int singleId);
|
std::string ConstructSharedMemoryName(int multiId, int slsId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map shared memory to an address
|
* Map shared memory to an address
|
||||||
|
@ -19,7 +19,7 @@ class multiSlsDetector;
|
|||||||
class SharedMemory;
|
class SharedMemory;
|
||||||
class receiverInterface;
|
class receiverInterface;
|
||||||
|
|
||||||
#define SLS_SHMVERSION 0x180625
|
#define SLS_SHMVERSION 0x180628
|
||||||
#define NMODMAXX 24
|
#define NMODMAXX 24
|
||||||
#define NMODMAXY 24
|
#define NMODMAXY 24
|
||||||
#define NCHIPSMAX 10
|
#define NCHIPSMAX 10
|
||||||
|
Loading…
x
Reference in New Issue
Block a user