AcquisitionCounters: Fixes
This commit is contained in:
@@ -206,6 +206,16 @@ uint64_t AcquisitionCounters::GetTotalPackets() const {
|
||||
return total_packets;
|
||||
}
|
||||
|
||||
uint64_t AcquisitionCounters::GetTotalPackets(uint16_t module_number) const {
|
||||
std::unique_lock ul(m);
|
||||
|
||||
if (module_number >= nmodules)
|
||||
throw JFJochException(JFJochExceptionCategory::ArrayOutOfBounds,
|
||||
"GetTotalPackets Wrong module number: " + std::to_string(module_number));
|
||||
|
||||
return packets_per_module[module_number];
|
||||
}
|
||||
|
||||
uint64_t AcquisitionCounters::GetExpectedPacketsPerImage() const {
|
||||
return expected_packets_per_module * nmodules;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// so uses mutex to ensure consistency
|
||||
|
||||
class AcquisitionCounters {
|
||||
uint16_t expected_packets_per_module;
|
||||
uint32_t expected_packets_per_module;
|
||||
constexpr static const uint64_t max_modules = 32;
|
||||
mutable std::shared_mutex m;
|
||||
mutable std::condition_variable_any data_updated;
|
||||
|
||||
Reference in New Issue
Block a user