This commit is contained in:
maliakal_d 2020-04-22 14:05:20 +02:00
parent 9ee2d389fb
commit c976c63fb5
3 changed files with 12 additions and 1 deletions

View File

@ -633,6 +633,8 @@ Result<IpAddr> Detector::getDestinationUDPIP(Positions pos) const {
void Detector::setDestinationUDPIP(const IpAddr ip, Positions pos) { void Detector::setDestinationUDPIP(const IpAddr ip, Positions pos) {
pimpl->Parallel(&Module::setDestinationUDPIP, pos, ip); pimpl->Parallel(&Module::setDestinationUDPIP, pos, ip);
auto mac = pimpl->Parallel1(&Receiver::setDestinationUDPIP, pos, {}, ip).squash();
setDestinationUDPMAC(mac, pos);
} }
Result<IpAddr> Detector::getDestinationUDPIP2(Positions pos) const { Result<IpAddr> Detector::getDestinationUDPIP2(Positions pos) const {

View File

@ -361,7 +361,15 @@ void Receiver::restreamStop() {
} }
/** Network Configuration (Detector<->Receiver) */ /** Network Configuration (Detector<->Receiver) */
sls::MacAddr Receiver::setDestinationUDPIP(const IpAddr ip) {
LOG(logDEBUG1) << "Setting destination udp ip to " << ip;
if (ip == 0) {
throw RuntimeError("Invalid destination udp ip address");
}
sls::MacAddr retval(0LU);
sendToReceiver(F_SET_RECEIVER_UDP_IP, ip, retval);
return retval;
}
/** Detector Parameters */ /** Detector Parameters */
void Receiver::setNumberOfFrames(int64_t value) { void Receiver::setNumberOfFrames(int64_t value) {

View File

@ -76,6 +76,7 @@ class Receiver : public virtual slsDetectorDefs {
* Network Configuration (Detector<->Receiver) * * Network Configuration (Detector<->Receiver) *
* * * *
* ************************************************/ * ************************************************/
sls::MacAddr setDestinationUDPIP(const sls::IpAddr ip);
/************************************************** /**************************************************
* * * *