mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
Merge branch 'developer' of github.com:slsdetectorgroup/slsDetectorPackage into developer
This commit is contained in:
commit
69dd5f3b5e
@ -343,8 +343,8 @@ void slsDetector::initializeDetectorStructure(detectorType type) {
|
||||
(detId * ((shm()->myDetectorType == EIGER) ? 2 : 1));
|
||||
shm()->rxUpstream = false;
|
||||
shm()->rxReadFreq = 1;
|
||||
shm()->zmqip = 0U;
|
||||
shm()->rxZmqip = 0U;
|
||||
shm()->zmqip = IpAddr{};
|
||||
shm()->rxZmqip = IpAddr{};
|
||||
shm()->gappixels = 0U;
|
||||
memset(shm()->rxAdditionalJsonHeader, 0, MAX_STR_LENGTH);
|
||||
shm()->rxFrameDiscardMode = NO_DISCARD;
|
||||
@ -690,7 +690,7 @@ bool slsDetector::lockServer(int lock) {
|
||||
}
|
||||
|
||||
sls::IpAddr slsDetector::getLastClientIP() {
|
||||
sls::IpAddr retval = 0U;
|
||||
sls::IpAddr retval;
|
||||
FILE_LOG(logDEBUG1) << "Getting last client ip to detector server";
|
||||
sendToDetector(F_GET_LAST_CLIENT_IP, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "Last client IP to detector: " << retval;
|
||||
@ -1908,7 +1908,7 @@ void slsDetector::updateRxDestinationUDPIP() {
|
||||
auto ip = getDestinationUDPIP();
|
||||
if (ip == 0) {
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
ip = shm()->rxHostname;
|
||||
ip = sls::IpAddr{shm()->rxHostname};
|
||||
if (ip == 0) {
|
||||
ip = HostnameToIp(shm()->rxHostname);
|
||||
}
|
||||
@ -1944,7 +1944,7 @@ void slsDetector::updateRxDestinationUDPIP2() {
|
||||
auto ip = getDestinationUDPIP2();
|
||||
if (ip == 0) {
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
ip = shm()->rxHostname;
|
||||
ip = sls::IpAddr{shm()->rxHostname};
|
||||
if (ip == 0) {
|
||||
ip = HostnameToIp(shm()->rxHostname);
|
||||
}
|
||||
@ -2116,7 +2116,7 @@ void slsDetector::updateReceiverStreamingIP() {
|
||||
auto ip = getReceiverStreamingIP();
|
||||
if (ip == 0) {
|
||||
// Hostname could be ip try to decode otherwise look up the hostname
|
||||
ip = shm()->rxHostname;
|
||||
ip = sls::IpAddr{shm()->rxHostname};
|
||||
if (ip == 0) {
|
||||
ip = HostnameToIp(shm()->rxHostname);
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ int ClientInterface::send_update(Interface &socket) {
|
||||
int64_t i64 = -1;
|
||||
char cstring[MAX_STR_LENGTH]{};
|
||||
|
||||
sls::IpAddr ip = 0u;
|
||||
sls::IpAddr ip;
|
||||
ip = server->getLastClient();
|
||||
n += socket.Send(&ip, sizeof(ip));
|
||||
|
||||
@ -920,7 +920,7 @@ int ClientInterface::set_streaming_port(Interface &socket) {
|
||||
}
|
||||
|
||||
int ClientInterface::set_streaming_source_ip(Interface &socket) {
|
||||
sls::IpAddr arg = 0u;
|
||||
sls::IpAddr arg;
|
||||
socket.Receive(arg);
|
||||
verifyIdle(socket);
|
||||
FILE_LOG(logDEBUG1) << "Setting streaming source ip:" << arg;
|
||||
|
@ -90,7 +90,7 @@ void Implementation::InitializeMembers() {
|
||||
streamingFrequency = 1;
|
||||
streamingTimerInMs = DEFAULT_STREAMING_TIMER_IN_MS;
|
||||
streamingPort = 0;
|
||||
streamingSrcIP = 0u;
|
||||
streamingSrcIP = sls::IpAddr{};
|
||||
additionalJsonHeader = "";
|
||||
|
||||
// detector parameters
|
||||
|
@ -12,8 +12,8 @@ class IpAddr {
|
||||
public:
|
||||
constexpr IpAddr() noexcept = default;
|
||||
explicit constexpr IpAddr(uint32_t address) noexcept : addr_{address} {}
|
||||
IpAddr(const std::string &address);
|
||||
IpAddr(const char *address);
|
||||
explicit IpAddr(const std::string &address);
|
||||
explicit IpAddr(const char *address);
|
||||
std::string str() const;
|
||||
std::string hex() const;
|
||||
std::array<char, 16u> arr() const;
|
||||
|
@ -48,7 +48,7 @@ ServerInterface2 ServerSocket::accept() {
|
||||
}
|
||||
char tc[INET_ADDRSTRLEN]{};
|
||||
inet_ntop(AF_INET, &(clientAddr.sin_addr), tc, INET_ADDRSTRLEN);
|
||||
thisClient = tc;
|
||||
thisClient = IpAddr{tc};
|
||||
return ServerInterface2(newSocket);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user