33 lines
1010 B
C++
33 lines
1010 B
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#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);
|
|
}
|
|
|
|
} |