diff --git a/receiver/PCIExpressDevice.cpp b/receiver/PCIExpressDevice.cpp index ee7ff878..749ce703 100644 --- a/receiver/PCIExpressDevice.cpp +++ b/receiver/PCIExpressDevice.cpp @@ -106,8 +106,14 @@ void PCIExpressDevice::FPGA_StartAction(const DiffractionExperiment &experiment) FrameGeneratorConfig config{}; config.frames = experiment.GetFrameNum() + DELAY_FRAMES_STOP_AND_QUIT + 1; config.modules = experiment.GetModulesNum(data_stream); - config.dest_ipv4_addr = ipv4_addr; - config.dest_mac_addr = mac_addr; + + if (ioctl(fd, IOCTL_JFJOCH_GET_MAC, &config.dest_mac_addr) != 0) + throw JFJochException(JFJochExceptionCategory::PCIeError, + "Failed getting MAC address", errno); + if (ioctl(fd, IOCTL_JFJOCH_GET_IPV4, &config.dest_ipv4_addr) != 0) + throw JFJochException(JFJochExceptionCategory::PCIeError, + "Failed getting MAC address", errno); + if (ioctl(fd, IOCTL_JFJOCH_RUN_FRAME_GEN, &config) != 0) throw JFJochException(JFJochExceptionCategory::PCIeError, "Failed starting frame generator", errno); }