mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 08:17:13 +02:00
WIP
This commit is contained in:
@ -665,7 +665,6 @@ void Detector::setRxZmqIP(const std::string &ip,
|
||||
Positions pos) {
|
||||
bool previouslyReceiverStreaming =
|
||||
getRxZmqDataStream(pos).squash(false);
|
||||
// TODO! probably in one call
|
||||
pimpl->Parallel(&slsDetector::setReceiverStreamingIP, pos, ip);
|
||||
if (previouslyReceiverStreaming) {
|
||||
setRxZmqDataStream(false, pos);
|
||||
@ -695,7 +694,6 @@ Result<std::string> Detector::getClientZmqIp(Positions pos) const {
|
||||
void Detector::setClientZmqIp(const std::string &ip,
|
||||
Positions pos) {
|
||||
int previouslyClientStreaming = pimpl->enableDataStreamingToClient(-1);
|
||||
// TODO! probably in one call ??
|
||||
pimpl->Parallel(&slsDetector::setClientStreamingIP, pos, ip);
|
||||
if (previouslyClientStreaming != 0) {
|
||||
pimpl->enableDataStreamingToClient(0);
|
||||
|
@ -830,9 +830,6 @@ void multiSlsDetector::startAcquisition(int detPos) {
|
||||
}
|
||||
|
||||
void multiSlsDetector::stopAcquisition(int detPos) {
|
||||
// locks to synchronize using client->receiver simultaneously (processing
|
||||
// thread)
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
if (detPos >= 0) {
|
||||
detectors[detPos]->stopAcquisition();
|
||||
} else {
|
||||
@ -3743,7 +3740,6 @@ int multiSlsDetector::acquire() {
|
||||
|
||||
// verify receiver is idle
|
||||
if (receiver) {
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
if (getReceiverStatus() != IDLE) {
|
||||
stopReceiver();
|
||||
}
|
||||
@ -3754,13 +3750,11 @@ int multiSlsDetector::acquire() {
|
||||
|
||||
// resets frames caught in receiver
|
||||
if (receiver) {
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
resetFramesCaught();
|
||||
}
|
||||
|
||||
// start receiver
|
||||
if (receiver) {
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
startReceiver();
|
||||
// let processing thread listen to these packets
|
||||
sem_post(&sem_newRTAcquisition);
|
||||
@ -3770,7 +3764,6 @@ int multiSlsDetector::acquire() {
|
||||
|
||||
// stop receiver
|
||||
if (receiver) {
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
stopReceiver();
|
||||
if (dataReady != nullptr) {
|
||||
sem_wait(&sem_endRTAcquisition); // waits for receiver's
|
||||
@ -3832,10 +3825,8 @@ void multiSlsDetector::processData() {
|
||||
}
|
||||
}
|
||||
// get progress
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mg);
|
||||
caught = getFramesCaughtByReceiver(0);
|
||||
}
|
||||
caught = getFramesCaughtByReceiver(0);
|
||||
|
||||
// updating progress
|
||||
if (caught != -1) {
|
||||
setCurrentProgress(caught);
|
||||
|
Reference in New Issue
Block a user