mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
jungfrau: connected number of destinations
This commit is contained in:
parent
2afe7112b2
commit
485b54994c
Binary file not shown.
@ -1331,6 +1331,16 @@ int getNumberofUDPInterfaces() {
|
|||||||
return ((bus_r(CONFIG_REG) & CONFIG_OPRTN_MDE_2_X_10GbE_MSK) ? 2 : 1);
|
return ((bus_r(CONFIG_REG) & CONFIG_OPRTN_MDE_2_X_10GbE_MSK) ? 2 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int getNumberofDestinations() {
|
||||||
|
return (((bus_r(CONTROL_REG) & CONTROL_RX_ADDTNL_ENDPTS_NUM_MSK) >> CONTROL_RX_ADDTNL_ENDPTS_NUM_OFST) + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setNumberofDestinations(int value) {
|
||||||
|
LOG(logINFO, ("Setting number of entries to %d\n", value));
|
||||||
|
--value;
|
||||||
|
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | ((value << CONTROL_RX_ADDTNL_ENDPTS_NUM_OFST) & CONTROL_RX_ADDTNL_ENDPTS_NUM_MSK));
|
||||||
|
}
|
||||||
|
|
||||||
void selectPrimaryInterface(int val) {
|
void selectPrimaryInterface(int val) {
|
||||||
uint32_t addr = CONFIG_REG;
|
uint32_t addr = CONFIG_REG;
|
||||||
|
|
||||||
@ -1522,7 +1532,7 @@ int configureMAC() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setNumberofDestinations(numUdpDestinations);
|
||||||
setNumberofUDPInterfaces(numInterfaces);
|
setNumberofUDPInterfaces(numInterfaces);
|
||||||
selectPrimaryInterface(selInterface);
|
selectPrimaryInterface(selInterface);
|
||||||
|
|
||||||
|
@ -386,6 +386,8 @@ void setNumberofUDPInterfaces(int val);
|
|||||||
int getNumberofUDPInterfaces();
|
int getNumberofUDPInterfaces();
|
||||||
#endif
|
#endif
|
||||||
#ifdef JUNGFRAUD
|
#ifdef JUNGFRAUD
|
||||||
|
int getNumberofDestinations();
|
||||||
|
void setNumberofDestinations(int value);
|
||||||
void selectPrimaryInterface(int val);
|
void selectPrimaryInterface(int val);
|
||||||
int getPrimaryInterface();
|
int getPrimaryInterface();
|
||||||
void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip,
|
void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip,
|
||||||
|
@ -9143,6 +9143,15 @@ int get_num_dest_list(int file_des) {
|
|||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
retval = numUdpDestinations;
|
retval = numUdpDestinations;
|
||||||
|
#ifdef JUNGFRAUD
|
||||||
|
if (getNumberofDestinations() != retval) {
|
||||||
|
ret = FAIL;
|
||||||
|
sprintf(
|
||||||
|
mess,
|
||||||
|
"Could not get number of udp destinations. (server reads %d, fpga reads %d).\n", getNumberofDestinations(), retval);
|
||||||
|
LOG(logERROR, (mess));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
LOG(logDEBUG1, ("numUdpDestinations retval: 0x%x\n", retval));
|
LOG(logDEBUG1, ("numUdpDestinations retval: 0x%x\n", retval));
|
||||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user