mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 07:17:13 +02:00
zmq hwm are specified to 2 for gui and restreaming of receiver if all zmq not closed at end of acquiistion
This commit is contained in:
@ -643,7 +643,7 @@ Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
bool useReceiver = getUseReceiverFlag().squash(false);
|
||||
bool previouslyReceiverStreaming = false;
|
||||
if (useReceiver) {
|
||||
@ -656,7 +656,7 @@ void Detector::setNumberofUDPInterfaces(int n, Positions pos) {
|
||||
setRxZmqPort(startingPort, -1);
|
||||
}
|
||||
// redo the zmq sockets if enabled
|
||||
if (previouslyClientStreaming != 0) {
|
||||
if (previouslyClientStreaming) {
|
||||
pimpl->setDataStreamingToClient(false);
|
||||
pimpl->setDataStreamingToClient(true);
|
||||
}
|
||||
@ -1077,7 +1077,7 @@ Result<int> Detector::getClientZmqPort(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setClientZmqPort(int port, int module_id) {
|
||||
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
if (module_id == -1) {
|
||||
std::vector<int> port_list = getPortNumbers(port);
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
@ -1087,7 +1087,7 @@ void Detector::setClientZmqPort(int port, int module_id) {
|
||||
} else {
|
||||
pimpl->Parallel(&Module::setClientStreamingPort, {module_id}, port);
|
||||
}
|
||||
if (previouslyClientStreaming != 0) {
|
||||
if (previouslyClientStreaming) {
|
||||
pimpl->setDataStreamingToClient(false);
|
||||
pimpl->setDataStreamingToClient(true);
|
||||
}
|
||||
@ -1098,14 +1098,33 @@ Result<IpAddr> Detector::getClientZmqIp(Positions pos) const {
|
||||
}
|
||||
|
||||
void Detector::setClientZmqIp(const IpAddr ip, Positions pos) {
|
||||
int previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
bool previouslyClientStreaming = pimpl->getDataStreamingToClient();
|
||||
pimpl->Parallel(&Module::setClientStreamingIP, pos, ip);
|
||||
if (previouslyClientStreaming != 0) {
|
||||
if (previouslyClientStreaming) {
|
||||
pimpl->setDataStreamingToClient(false);
|
||||
pimpl->setDataStreamingToClient(true);
|
||||
}
|
||||
}
|
||||
|
||||
int Detector::getClientZmqHwm() const { return pimpl->getClientStreamingHwm(); }
|
||||
|
||||
void Detector::setClientZmqHwm(const int limit) {
|
||||
pimpl->setClientStreamingHwm(limit);
|
||||
}
|
||||
|
||||
Result<int> Detector::getRxZmqHwm(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getReceiverStreamingHwm, pos);
|
||||
}
|
||||
|
||||
void Detector::setRxZmqHwm(const int limit) {
|
||||
bool previouslyReceiverStreaming = getRxZmqDataStream().squash(false);
|
||||
pimpl->Parallel(&Module::setReceiverStreamingHwm, {}, limit);
|
||||
if (previouslyReceiverStreaming) {
|
||||
setRxZmqDataStream(false, {});
|
||||
setRxZmqDataStream(true, {});
|
||||
}
|
||||
}
|
||||
|
||||
// Eiger Specific
|
||||
|
||||
Result<ns> Detector::getSubExptime(Positions pos) const {
|
||||
|
Reference in New Issue
Block a user