mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
jungfrau server: feature finish: switching between 2 interfaces
This commit is contained in:
@ -524,7 +524,8 @@ int Server_SendResult(int fileDes, intType itype, int update, void* retval, int
|
||||
|
||||
void getMacAddressinString(char* cmac, int size, uint64_t mac) {
|
||||
memset(cmac, 0, size);
|
||||
sprintf(cmac,"%02x:%02x:%02x:%02x:%02x:%02x",(unsigned int)((mac>>40)&0xFF),
|
||||
sprintf(cmac,"%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
(unsigned int)((mac>>40)&0xFF),
|
||||
(unsigned int)((mac>>32)&0xFF),
|
||||
(unsigned int)((mac>>24)&0xFF),
|
||||
(unsigned int)((mac>>16)&0xFF),
|
||||
@ -535,4 +536,4 @@ void getMacAddressinString(char* cmac, int size, uint64_t mac) {
|
||||
void getIpAddressinString(char* cip, uint32_t ip) {
|
||||
memset(cip, 0, INET_ADDRSTRLEN);
|
||||
inet_ntop(AF_INET, &ip, cip, INET_ADDRSTRLEN);
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,5 @@ void getMacAddressinString(char* cmac, int size, uint64_t mac);
|
||||
*/
|
||||
void getIpAddressinString(char* cip, uint32_t ip);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,7 @@ Here are the definitions, but the actual implementation should be done for each
|
||||
|
||||
****************************************************/
|
||||
|
||||
enum interfaceType {OUTER, INNER};
|
||||
|
||||
// basic tests
|
||||
int isFirmwareCheckDone();
|
||||
@ -213,6 +214,11 @@ int getExtSignal();
|
||||
// configure mac
|
||||
#ifdef GOTTHARDD
|
||||
void calcChecksum(mac_conf* mac, int sourceip, int destip);
|
||||
#elif JUNGFRAUD
|
||||
void setNumberofUDPInterfaces(int val);
|
||||
void selectPrimaryInterface(int val);
|
||||
void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip, uint64_t destmac, uint32_t destport, uint64_t sourcemac, uint32_t sourceip, uint32_t sourceport);
|
||||
void calcChecksum(udp_header* udp);
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
|
||||
long int calcChecksum(int sourceip, int destip);
|
||||
@ -285,6 +291,7 @@ int resetCounterBlock(int startACQ);
|
||||
|
||||
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock, pll, flashing firmware
|
||||
#elif JUNGFRAUD
|
||||
void initReadoutConfiguration();
|
||||
int powerChip (int on);
|
||||
int autoCompDisable(int on);
|
||||
void configureASICTimer();
|
||||
|
@ -1719,13 +1719,6 @@ int get_time_left(int file_des) {
|
||||
|
||||
// only get
|
||||
// check index
|
||||
#ifdef JUNGFRAUD
|
||||
if (ind == DELAY_AFTER_TRIGGER) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,"Timer Left Index (%d) is not implemented for this release.\n", (int)ind);
|
||||
FILE_LOG(logERROR,(mess));
|
||||
}
|
||||
#endif
|
||||
if (ret == OK) {
|
||||
switch(ind) {
|
||||
#ifdef EIGERD
|
||||
@ -2417,9 +2410,9 @@ int configure_mac(int file_des) {
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(EIGERD)
|
||||
int pos[2] = {0, 0};
|
||||
sscanf(args[12], "%x", &pos[0]);
|
||||
sscanf(args[13], "%x", &pos[1]);
|
||||
FILE_LOG(logDEBUG1, ("Position: [%d, %d]\n", pos[0], pos[1]));
|
||||
sscanf(args[12], "%x", &pos[X]);
|
||||
sscanf(args[13], "%x", &pos[Y]);
|
||||
FILE_LOG(logDEBUG1, ("Position: [%d, %d]\n", pos[X], pos[Y]));
|
||||
#endif
|
||||
|
||||
|
||||
@ -3227,10 +3220,12 @@ int set_network_parameter(int file_des) {
|
||||
if ((value == -1) || (Server_VerifyLock() == OK)) {
|
||||
// check index
|
||||
switch (mode) {
|
||||
#ifdef EIGERD
|
||||
|
||||
case FLOW_CONTROL_10G:
|
||||
serverIndex = FLOWCTRL_10G;
|
||||
break;
|
||||
|
||||
#ifdef EIGERD
|
||||
case DETECTOR_TXN_DELAY_LEFT:
|
||||
serverIndex = TXN_LEFT;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user