This commit is contained in:
2021-08-12 17:37:55 +02:00
parent eb652557b6
commit ec01f98c26
9 changed files with 183 additions and 16 deletions

View File

@ -55,7 +55,9 @@ std::ostream &operator<<(std::ostream &os,
std::string ToString(const slsDetectorDefs::currentSrcParameters &r);
std::ostream &operator<<(std::ostream &os,
const slsDetectorDefs::currentSrcParameters &r);
std::string ToString(const slsDetectorDefs::udpDestination &r);
std::ostream &operator<<(std::ostream &os,
const slsDetectorDefs::udpDestination &r);
const std::string &ToString(const std::string &s);
/** Convert std::chrono::duration with specified output unit */

View File

@ -466,7 +466,7 @@ typedef struct {
currentSrcParameters() : enable(0), fix(-1), normal(-1), select(0) {}
/** [Gotthard2] enable or disable */
currentSrcParameters(bool ena)
explicit currentSrcParameters(bool ena)
: enable(static_cast<int>(ena)), fix(-1), normal(-1), select(0) {}
/** [Jungfrau](chipv1.0) enable current src with fix or no fix,
@ -489,6 +489,35 @@ typedef struct {
}
} __attribute__((packed));
struct udpDestination {
int entry;
uint32_t ip{};
uint32_t ip2{};
uint64_t mac{};
uint64_t mac2{};
int port{};
int port2{};
udpDestination();
bool operator==(const udpDestination &other) const {
return ((entry == other.entry) && (ip == other.ip) &&
(ip2 == other.ip2) && (mac == other.mac) &&
(mac2 == other.mac2) && (port == other.port) &&
(port2 == other.port2));
}
udpDestination operator=(const udpDestination &other) const {
if (this == &other)
return *this;
entry = other.entry;
ip = other.ip;
ip2 = other.ip2;
mac = other.mac;
mac2 = other.mac2;
port = other.port;
port2 = other.port2;
return *this;
}
} __attribute__((packed));
/**
* structure to udpate receiver
*/