mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
clearer exceptions to help user fix the issue of localhost not getting mac address
This commit is contained in:
@ -1021,6 +1021,10 @@ void Module::setDestinationUDPIP(const IpAddr ip) {
|
||||
if (ip == 0) {
|
||||
throw RuntimeError("Invalid destination udp ip address");
|
||||
}
|
||||
if (ip.str() == LOCALHOST_IP) {
|
||||
throw RuntimeError("Invalid destination udp ip. Change rx_hostname "
|
||||
"from localhost or change udp_dstip from auto?");
|
||||
}
|
||||
sendToDetector(F_SET_DEST_UDP_IP, ip, nullptr);
|
||||
if (shm()->useReceiverFlag) {
|
||||
sls::MacAddr retval(0LU);
|
||||
@ -1040,7 +1044,10 @@ void Module::setDestinationUDPIP2(const IpAddr ip) {
|
||||
if (ip == 0) {
|
||||
throw RuntimeError("Invalid destination udp ip address2");
|
||||
}
|
||||
|
||||
if (ip.str() == LOCALHOST_IP) {
|
||||
throw RuntimeError("Invalid destination udp ip. Change rx_hostname "
|
||||
"from localhost or change udp_dstip from auto?");
|
||||
}
|
||||
sendToDetector(F_SET_DEST_UDP_IP2, ip, nullptr);
|
||||
if (shm()->useReceiverFlag) {
|
||||
sls::MacAddr retval(0LU);
|
||||
@ -3330,9 +3337,9 @@ sls_detector_module Module::interpolateTrim(sls_detector_module *a,
|
||||
dacs_to_copy.end(),
|
||||
{E_SVP, E_SVN, E_VTGSTV, E_RXB_RB, E_RXB_LB, E_VCN, E_VIS});
|
||||
// interpolate vrf, vcmp, vcp
|
||||
dacs_to_interpolate.insert(
|
||||
dacs_to_interpolate.end(),
|
||||
{E_VTR, E_VRF, E_VCMP_LL, E_VCMP_LR, E_VCMP_RL, E_VCMP_RR, E_VCP, E_VRS});
|
||||
dacs_to_interpolate.insert(dacs_to_interpolate.end(),
|
||||
{E_VTR, E_VRF, E_VCMP_LL, E_VCMP_LR,
|
||||
E_VCMP_RL, E_VCMP_RR, E_VCP, E_VRS});
|
||||
} else {
|
||||
dacs_to_copy.insert(dacs_to_copy.end(),
|
||||
{M_VCASSH, M_VRSHAPER, M_VRSHAPER_N, M_VIPRE_OUT,
|
||||
|
@ -1388,6 +1388,10 @@ int ClientInterface::set_read_n_rows(Interface &socket) {
|
||||
}
|
||||
|
||||
sls::MacAddr ClientInterface::setUdpIp(sls::IpAddr arg) {
|
||||
if (arg.str() == LOCALHOST_IP) {
|
||||
throw RuntimeError("Invalid destination udp ip. Change rx_hostname "
|
||||
"from localhost or change udp_dstip from auto?");
|
||||
}
|
||||
LOG(logINFO) << "Received UDP IP: " << arg;
|
||||
// getting eth
|
||||
std::string eth = sls::IpToInterfaceName(arg.str());
|
||||
@ -1426,6 +1430,10 @@ int ClientInterface::set_udp_ip(Interface &socket) {
|
||||
}
|
||||
|
||||
sls::MacAddr ClientInterface::setUdpIp2(sls::IpAddr arg) {
|
||||
if (arg.str() == LOCALHOST_IP) {
|
||||
throw RuntimeError("Invalid destination udp ip. Change rx_hostname "
|
||||
"from localhost or change udp_dstip from auto?");
|
||||
}
|
||||
LOG(logINFO) << "Received UDP IP2: " << arg;
|
||||
// getting eth
|
||||
std::string eth = sls::IpToInterfaceName(arg.str());
|
||||
|
@ -65,6 +65,8 @@
|
||||
#define DEFAULT_DET_MAC2 "00:aa:bb:cc:dd:ff"
|
||||
#define DEFAULT_DET_IP2 "129.129.202.46"
|
||||
|
||||
#define LOCALHOST_IP "127.0.0.1"
|
||||
|
||||
/** default maximum string length */
|
||||
#define MAX_STR_LENGTH 1000
|
||||
#define SHORT_STR_LENGTH 20
|
||||
@ -579,8 +581,6 @@ operator&(const slsDetectorDefs::streamingInterface &a,
|
||||
static_cast<int32_t>(b));
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user