// Copyright (2019-2023) Paul Scherrer Institute #include "MlxRawEthDevice.h" #include "../common/NetworkAddressConvert.h" int main(int argc, char **argv) { DiffractionExperiment experiment(DetectorGeometry(4)); experiment.Mode(DetectorMode::Raw); experiment.ImagesPerTrigger(1000); Logger logger("MlxRawEthRcv"); logger.Verbose(true); try { MlxRawEthDevice mlx(1, 0, 1024); logger.Info("Mac addr {}", mlx.GetMACAddress()); mlx.EnableLogging(&logger); mlx.StartAction(experiment); mlx.WaitForActionComplete(); logger.Info("Bytes received {}", mlx.GetBytesReceived()); JFJochProtoBuf::AcquisitionDeviceStatistics statistics; mlx.SaveStatistics(experiment, statistics); logger.Info("{} {}", statistics.efficiency(), statistics.packets_received_per_module(1)); } catch (std::exception &e) { logger.ErrorException(e); exit(EXIT_FAILURE); } }