JFJochReceiver is directly invoked by the broker
This commit is contained in:
@@ -158,17 +158,6 @@ TEST_CASE("DiffractionExperiment_UnitCell","[DiffractionExperiment]") {
|
||||
REQUIRE_NOTHROW(x.SetUnitCell());
|
||||
REQUIRE(!x.HasUnitCell());
|
||||
REQUIRE_NOTHROW(x.SetUnitCell(cell));
|
||||
|
||||
JFJochProtoBuf::JungfraujochSettings settings = x;
|
||||
|
||||
DiffractionExperiment y(settings);
|
||||
|
||||
REQUIRE(y.GetUnitCell().a == x.GetUnitCell().a);
|
||||
REQUIRE(y.GetUnitCell().b == x.GetUnitCell().b);
|
||||
REQUIRE(y.GetUnitCell().c == x.GetUnitCell().c);
|
||||
REQUIRE(y.GetUnitCell().alpha == x.GetUnitCell().alpha);
|
||||
REQUIRE(y.GetUnitCell().beta == x.GetUnitCell().beta);
|
||||
REQUIRE(y.GetUnitCell().gamma == x.GetUnitCell().gamma);
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_IPv4Address","[DiffractionExperiment]") {
|
||||
@@ -453,47 +442,6 @@ TEST_CASE("DiffractionExperiment_FrameCountTime","[DiffractionExperiment]") {
|
||||
REQUIRE(x.GetImageCountTime() == std::chrono::microseconds(7*567));
|
||||
} */
|
||||
|
||||
TEST_CASE("DiffractionExperiment_ExportProtobuf","[DiffractionExperiment]") {
|
||||
DiffractionExperiment x(DetectorGeometry(16, 4, 0, 0, false)),y;
|
||||
x.DataStreams(3);
|
||||
|
||||
std::vector<DetectorMode> v = {DetectorMode::Raw, DetectorMode::Conversion,
|
||||
DetectorMode::PedestalG0, DetectorMode::PedestalG1, DetectorMode::PedestalG2};
|
||||
for (auto &i : v) {
|
||||
x.Mode(i).FilePrefix("z").ImagesPerTrigger(20).NumTriggers(5).PedestalG0Frames(1345)
|
||||
.PedestalG1Frames(1876).PedestalG2Frames(654)
|
||||
.PhotonEnergy_keV(16.0).BeamX_pxl(566).BeamY_pxl(1234).DetectorDistance_mm(145)
|
||||
.FrameTime(std::chrono::microseconds(765), std::chrono::microseconds(10))
|
||||
.PedestalG1G2FrameTime(std::chrono::milliseconds(10))
|
||||
.IPv4BaseAddr("2.2.2.2").MaskModuleEdges(true);
|
||||
|
||||
JFJochProtoBuf::JungfraujochSettings settings_in_protobuf = x;
|
||||
REQUIRE_NOTHROW(y.Import(settings_in_protobuf));
|
||||
|
||||
REQUIRE(y.GetFilePrefix() == x.GetFilePrefix());
|
||||
REQUIRE(x.GetDataStreamsNum() == y.GetDataStreamsNum());
|
||||
REQUIRE(x.GetXPixelsNum() == y.GetXPixelsNum());
|
||||
REQUIRE(x.GetModulesNum(2) == y.GetModulesNum(2));
|
||||
REQUIRE(x.GetDetectorMode() == y.GetDetectorMode());
|
||||
|
||||
REQUIRE(y.GetPedestalG1Frames() == 1876);
|
||||
REQUIRE(y.GetPedestalG2Frames() == 654);
|
||||
REQUIRE(y.GetPhotonEnergy_keV() == 16.0);
|
||||
REQUIRE(y.GetBeamX_pxl() == 566);
|
||||
REQUIRE(y.GetBeamY_pxl() == 1234);
|
||||
REQUIRE(y.GetDetectorDistance_mm() == 145);
|
||||
|
||||
REQUIRE(x.GetFrameNum() == y.GetFrameNum());
|
||||
REQUIRE(x.GetImageTime() == y.GetImageTime());
|
||||
REQUIRE(y.GetFrameCountTime().count() == x.GetFrameCountTime().count());
|
||||
|
||||
REQUIRE(y.GetSrcIPv4Address(0, 0) == 0x02020202);
|
||||
REQUIRE(y.GetPedestalG0Frames() == x.GetPedestalG0Frames());
|
||||
REQUIRE(y.GetMaskModuleEdges() == x.GetMaskModuleEdges());
|
||||
REQUIRE(y.GetMaskChipEdges() == x.GetMaskChipEdges());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_InternalPacketGenerator", "[DiffractionExperiment]") {
|
||||
DiffractionExperiment x;
|
||||
|
||||
@@ -871,17 +819,17 @@ TEST_CASE("DiffractionExperiment_DetectorModuleHostname","[DiffractionExperiment
|
||||
DiffractionExperiment x(DetectorSetup(3, "X", h));
|
||||
JFJochProtoBuf::DetectorConfig det_cfg;
|
||||
|
||||
JFJochProtoBuf::ReceiverNetworkConfig net_cfg;
|
||||
std::vector<AcquisitionDeviceNetConfig> net_cfg;
|
||||
|
||||
auto d1 = net_cfg.add_device();
|
||||
d1->set_mac_addr("00:00:00:00:00:00");
|
||||
d1->set_ipv4_addr("10.10.50.1");
|
||||
d1->set_udp_port(1234);
|
||||
net_cfg.push_back(AcquisitionDeviceNetConfig{
|
||||
.mac_addr = "00:00:00:00:00:00",
|
||||
.ipv4_addr = "10.10.50.1",
|
||||
.udp_port = 1234});
|
||||
|
||||
auto d2 = net_cfg.add_device();
|
||||
d2->set_mac_addr("00:00:00:00:00:01");
|
||||
d2->set_ipv4_addr("10.10.50.2");
|
||||
d2->set_udp_port(1234);
|
||||
net_cfg.push_back(AcquisitionDeviceNetConfig{
|
||||
.mac_addr = "00:00:00:00:00:01",
|
||||
.ipv4_addr = "10.10.50.2",
|
||||
.udp_port = 1234});
|
||||
|
||||
std::vector<std::string> h_out;
|
||||
REQUIRE_NOTHROW(x.GetDetectorModuleHostname(h_out));
|
||||
|
||||
Reference in New Issue
Block a user