25 lines
672 B
C++
25 lines
672 B
C++
// Copyright (2019-2023) Paul Scherrer Institute
|
|
|
|
#include <iostream>
|
|
|
|
#include "../common/JFJochException.h"
|
|
#include "JungfraujochDevice.h"
|
|
#include "../common/Logger.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
Logger logger("jfjoch_pcie_clear_net_counters");
|
|
|
|
if (argc != 2) {
|
|
logger.Error("Usage: ./jfjoch_pcie_clear_net_counters <device name>");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
logger.Info("Device {}", argv[1]);
|
|
std::cout << std::endl;
|
|
try {
|
|
JungfraujochDevice device(argv[1], true);
|
|
device.ClearNetworkCounters();
|
|
logger.Info("Done");
|
|
} catch (const JFJochException &e) {
|
|
logger.ErrorException(e);
|
|
}
|
|
} |