mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
merge resolved
This commit is contained in:
commit
6e47f0b7f7
Binary file not shown.
@ -1079,8 +1079,8 @@ int checkDetectorType() {
|
||||
return -1;
|
||||
}
|
||||
int type = atoi(buffer);
|
||||
if (type > TYPE_TOLERANCE) {
|
||||
FILE_LOG(logERROR, ("No Module attached! Expected %d for Mythen3, got %d\n", TYPE_MYTHEN3_MODULE_VAL, type));
|
||||
if (type > TYPE_NO_MODULE_STARTING_VAL) {
|
||||
FILE_LOG(logERROR, ("No Module attached! Expected %d for Mythen, got %d\n", TYPE_MYTHEN3_MODULE_VAL, type));
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,8 @@ class MacAddr {
|
||||
public:
|
||||
constexpr MacAddr() noexcept = default;
|
||||
explicit constexpr MacAddr(uint64_t mac) noexcept : addr_{mac} {}
|
||||
MacAddr(std::string mac);
|
||||
MacAddr(const char *address);
|
||||
explicit MacAddr(std::string mac);
|
||||
explicit MacAddr(const char *address);
|
||||
std::string str() const;
|
||||
std::string hex() const;
|
||||
constexpr bool operator==(const MacAddr &other) const noexcept {
|
||||
|
@ -8,5 +8,5 @@
|
||||
#define APIJUNGFRAU 0x191127
|
||||
#define APICTB 0x191210
|
||||
#define APIEIGER 0x200110
|
||||
#define APIMYTHEN3 0x200115
|
||||
#define APIMYTHEN3 0x200120
|
||||
#define APIGOTTHARD2 0x200116
|
||||
|
@ -136,7 +136,7 @@ MacAddr InterfaceNameToMac(const std::string& inf) {
|
||||
|
||||
if (-1==ioctl(sock, SIOCGIFHWADDR, &ifr)) {
|
||||
perror("ioctl(SIOCGIFHWADDR) ");
|
||||
return std::string("00:00:00:00:00:00");
|
||||
return MacAddr{};
|
||||
}
|
||||
for (int j=0, k=0; j<6; j++) {
|
||||
k+=snprintf(mac+k, mac_len-k-1, j ? ":%02X" : "%02X",
|
||||
|
@ -22,8 +22,8 @@ TEST_CASE("Convert mac address using classes", "[support]") {
|
||||
|
||||
CHECK(mac0 == vec_addr[i]);
|
||||
CHECK(mac1 == vec_addr[i]);
|
||||
CHECK(mac0 == vec_ans[i]);
|
||||
CHECK(mac1 == vec_ans[i]);
|
||||
CHECK(mac0.str() == vec_ans[i]);
|
||||
CHECK(mac1.str() == vec_ans[i]);
|
||||
CHECK(mac0.str() == vec_ans[i]);
|
||||
CHECK(mac1.str() == vec_ans[i]);
|
||||
}
|
||||
@ -59,8 +59,8 @@ TEST_CASE("Convert IP using classes ", "[support]") {
|
||||
CHECK(ip0 == ip1);
|
||||
CHECK(ip0 == vec_addr[i]);
|
||||
CHECK(ip1 == vec_addr[i]);
|
||||
CHECK(ip0 == vec_ans[i]);
|
||||
CHECK(ip1 == vec_ans[i]);
|
||||
CHECK(ip0.str() == vec_ans[i]);
|
||||
CHECK(ip1.str() == vec_ans[i]);
|
||||
CHECK(ip0.str() == vec_ans[i]);
|
||||
CHECK(ip0.arr().data() == vec_ans[i]);
|
||||
CHECK(ip1.str() == vec_ans[i]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user