mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 09:30:02 +02:00
WIP, a in shm name
This commit is contained in:
parent
d3f420ffd4
commit
1185f1ea17
@ -679,7 +679,7 @@ void Detector::setDestinationUDPPort2(int port, int module_id) {
|
||||
}
|
||||
|
||||
Result<std::string> Detector::printRxConfiguration(Positions pos) const {
|
||||
return pimpl->Parallel3(&Receiver::printConfiguration); // ignoring pos FIXME
|
||||
return pimpl->Parallel(&Module::printUDPConfiguration, pos);
|
||||
}
|
||||
|
||||
Result<bool> Detector::getTenGiga(Positions pos) const {
|
||||
|
@ -1711,6 +1711,34 @@ int Module::getSelectedUDPInterface() {
|
||||
return retval;
|
||||
}
|
||||
|
||||
std::string Module::printUDPConfiguration() {
|
||||
std::ostringstream oss;
|
||||
oss << std::endl << std::endl
|
||||
<< "Module " << moduleId << std::endl
|
||||
<< "Hostname : " << shm()->hostname << std::endl;
|
||||
if (shm()->myDetectorType == JUNGFRAU) {
|
||||
oss << "Number of Interfaces : " << getNumberofUDPInterfaces() << std::endl
|
||||
<< "Selected Interface : " << getSelectedUDPInterface() << std::endl;
|
||||
}
|
||||
oss << "UDP Source IP : " << getSourceUDPIP() << std::endl
|
||||
<< "UDP Source MAC : " << getSourceUDPMAC() << std::endl
|
||||
<< "UDP Destination IP : " << getDestinationUDPIP() << std::endl
|
||||
<< "UDP Destination MAC : " << getDestinationUDPMAC() << std::endl;
|
||||
if (shm()->myDetectorType == JUNGFRAU) {
|
||||
oss << "UDP Source IP : " << getSourceUDPIP() << std::endl
|
||||
<< "UDP Source IP2 : " << getSourceUDPIP2() << std::endl
|
||||
<< "UDP Source MAC2 : " << getSourceUDPMAC2() << std::endl
|
||||
<< "UDP Destination IP2 : " << getDestinationUDPIP2() << std::endl
|
||||
<< "UDP Destination MAC2 : " << getDestinationUDPMAC2() << std::endl;
|
||||
}
|
||||
oss << "UDP Destination Port : " << getDestinationUDPPort() << std::endl;
|
||||
if (shm()->myDetectorType == JUNGFRAU || shm()->myDetectorType == EIGER) {
|
||||
oss << "UDP Destination Port2: " << getDestinationUDPPort() << std::endl;
|
||||
}
|
||||
oss << "\n";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
void Module::setClientStreamingPort(int port) { shm()->zmqport = port; }
|
||||
|
||||
int Module::getClientStreamingPort() { return shm()->zmqport; }
|
||||
|
@ -799,6 +799,8 @@ class Module : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int getSelectedUDPInterface();
|
||||
|
||||
std::string printUDPConfiguration();
|
||||
|
||||
/**
|
||||
* Sets the client zmq port
|
||||
* @param port client zmq port
|
||||
|
@ -284,24 +284,22 @@ sls::MacAddr Receiver::configure(slsDetectorDefs::rxParameters arg) {
|
||||
setAdditionalJsonParameter("adcmask_10g", std::to_string(arg.adc10gMask));
|
||||
}
|
||||
|
||||
LOG(logINFOBLUE) << receiverId << " configured!";
|
||||
LOG(logINFOBLUE) << "reciever " << indexString << " configured!";
|
||||
return mac;
|
||||
}
|
||||
|
||||
std::string Receiver::printConfiguration() {
|
||||
std::ostringstream os;
|
||||
std::ostringstream oss;
|
||||
|
||||
os << "\n\nModuler " << indexString
|
||||
<< "\nReceiver Hostname:\t"<< shm()->hostname;
|
||||
/*
|
||||
if (shm()->myDetectorType == JUNGFRAU) {
|
||||
os << "\nNumber of Interfaces:\t" << getNumberofUDPInterfaces()
|
||||
<< "\nSelected Interface:\t" << getSelectedUDPInterface();
|
||||
}
|
||||
oss << std::endl << std::endl
|
||||
<< "Receiver " << indexString << std::endl
|
||||
<< "Hostname : " << shm()->hostname << std::endl
|
||||
<< "Tcp port : " << shm()->tcpPort << std::endl;
|
||||
|
||||
|
||||
os << "\nDetector UDP IP:\t"
|
||||
<< getSourceUDPIP() << "\nDetector UDP MAC:\t"
|
||||
<< getSourceUDPMAC() << "\nReceiver UDP IP:\t"
|
||||
/*
|
||||
|
||||
os << "\nReceiver UDP IP:\t"
|
||||
<< getDestinationUDPIP() << "\nReceiver UDP MAC:\t" << getDestinationUDPMAC();
|
||||
|
||||
if (shm()->myDetectorType == JUNGFRAU) {
|
||||
@ -315,8 +313,8 @@ std::string Receiver::printConfiguration() {
|
||||
os << "\nReceiver UDP Port2:\t" << getDestinationUDPPort2();
|
||||
}
|
||||
*/
|
||||
os << "\n";
|
||||
return os.str();
|
||||
oss << "\n";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
/** Acquisition */
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#define SHM_MULTI_PREFIX "/slsDetectorPackage_multi_"
|
||||
#define SHM_MODULE_PREFIX "_module_"
|
||||
#define SHM_RECEIVER_PREFIX "_receiver" //interface_id + '_'
|
||||
#define SHM_RECEIVER_PREFIX "_receiver_"
|
||||
#define SHM_ENV_NAME "SLSDETNAME"
|
||||
|
||||
#include <iostream>
|
||||
@ -244,7 +244,7 @@ class SharedMemory {
|
||||
else
|
||||
ss << SHM_MULTI_PREFIX << multiId <<
|
||||
SHM_MODULE_PREFIX << moduleId <<
|
||||
SHM_RECEIVER_PREFIX << interfaceId << '_' << receiverId << sEnvPath;
|
||||
SHM_RECEIVER_PREFIX << (char)(interfaceId + 97) << '_' << receiverId << sEnvPath;
|
||||
|
||||
std::string temp = ss.str();
|
||||
if (temp.length() > NAME_MAX_LENGTH) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user