mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
binaries in
This commit is contained in:
@ -148,31 +148,6 @@ std::ostream &operator<<(std::ostream &os,
|
||||
return os << ToString(r);
|
||||
}
|
||||
|
||||
std::string ToString(const slsDetectorDefs::udpDestination &r) {
|
||||
std::ostringstream oss;
|
||||
oss << '[' << std::endl
|
||||
<< "entry " << r.entry_ << std::endl
|
||||
<< "ip " << IpAddr(r.ip_) << std::endl
|
||||
<< "mac " << MacAddr(r.mac_) << std::endl
|
||||
<< "port " << r.port_ << std::endl;
|
||||
if (r.port2_ != 0) {
|
||||
oss << "port2 " << r.port2_ << std::endl;
|
||||
}
|
||||
if (r.ip2_ != 0) {
|
||||
oss << "ip2 " << IpAddr(r.ip2_) << std::endl;
|
||||
}
|
||||
if (r.mac2_ != 0) {
|
||||
oss << "mac2 " << MacAddr(r.mac2_) << std::endl;
|
||||
}
|
||||
oss << ']';
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os,
|
||||
const slsDetectorDefs::udpDestination &r) {
|
||||
return os << ToString(r);
|
||||
}
|
||||
|
||||
std::string ToString(const defs::runStatus s) {
|
||||
switch (s) {
|
||||
case defs::ERROR:
|
||||
|
@ -69,6 +69,26 @@ std::string MacAddr::str() const { return to_hex(':'); }
|
||||
|
||||
std::string MacAddr::hex() const { return to_hex(); }
|
||||
|
||||
std::string UdpDestination::str() const {
|
||||
std::ostringstream oss;
|
||||
oss << '[' << std::endl
|
||||
<< "entry " << entry << std::endl
|
||||
<< "ip " << ip << std::endl
|
||||
<< "mac " << mac << std::endl
|
||||
<< "port " << port << std::endl;
|
||||
if (port2 != 0) {
|
||||
oss << "port2 " << port2 << std::endl;
|
||||
}
|
||||
if (ip2 != 0) {
|
||||
oss << "ip2 " << ip2 << std::endl;
|
||||
}
|
||||
if (mac2 != 0) {
|
||||
oss << "mac2 " << mac2 << std::endl;
|
||||
}
|
||||
oss << ']';
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const IpAddr &addr) {
|
||||
return out << addr.str();
|
||||
}
|
||||
@ -77,6 +97,10 @@ std::ostream &operator<<(std::ostream &out, const MacAddr &addr) {
|
||||
return out << addr.str();
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const UdpDestination &dest) {
|
||||
return out << dest.str();
|
||||
}
|
||||
|
||||
IpAddr HostnameToIp(const char *hostname) {
|
||||
addrinfo hints;
|
||||
addrinfo *result = nullptr;
|
||||
|
Reference in New Issue
Block a user