File writer and spot finding improvements

This commit is contained in:
2024-04-08 11:18:50 +02:00
parent 15d99c6162
commit c6d2b5eedf
72 changed files with 690 additions and 893 deletions
+4 -4
View File
@@ -27,16 +27,16 @@ ZMQStream2PusherGroup::ZMQStream2PusherGroup(const std::vector<std::string> &add
bool ZMQStream2PusherGroup::SendImage(const DataMessage& message) {
if (pusher.empty())
return false;
auto socket_number = (message.number % file_count) % pusher.size();
auto socket_number = (message.number / images_per_file) % pusher.size();
return pusher[socket_number]->SendImage(message);
}
void ZMQStream2PusherGroup::StartDataCollection(const StartMessage& message) {
if (message.data_file_count < 1)
if (message.images_per_file < 1)
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"File count cannot be zero or negative");
file_count = message.data_file_count;
"Images per file cannot be zero or negative");
images_per_file = message.images_per_file;
for (auto &p: pusher)
p->StartDataCollection(message);