DetectorSetup: Configure UDP interface count
This commit is contained in:
@@ -47,6 +47,14 @@ void DetectorSetup::LoadGain(const std::vector<std::string> &filenames) {
|
||||
gain_calibration.emplace_back(i);
|
||||
}
|
||||
|
||||
DetectorSetup &DetectorSetup::UDPInterfaceCount(int64_t input) {
|
||||
if ((input != 1) && (input != 2))
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Only 1 and 2 are supported as UDP interface count");
|
||||
udp_interface_count = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const std::vector<JFModuleGainCalibration> &DetectorSetup::GetGainCalibration() const {
|
||||
return gain_calibration;
|
||||
}
|
||||
@@ -56,7 +64,7 @@ DetectorSetup::operator JFJochProtoBuf::Detector() const {
|
||||
ret.set_nmodules(GetModulesNum());
|
||||
ret.set_description(GetDescription());
|
||||
ret.set_pixel_size_mm(GetPixelSize_mm());
|
||||
|
||||
ret.set_udp_interface_count(udp_interface_count);
|
||||
for (const auto& iter: det_modules_hostname)
|
||||
ret.add_module_hostname(iter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user