mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 17:47:59 +02:00
updated i3gbe to lll
This commit is contained in:
@ -1716,10 +1716,10 @@ int configureMAC() {
|
||||
"\tDest Port : %d\n\n",
|
||||
src_ip, src_mac, srcport, dst_ip, dst_mac, dstport));
|
||||
|
||||
int i3gbe = getVetoStream();
|
||||
int lll = getVetoStream();
|
||||
int i10gbe = (getNumberofUDPInterfaces() == 2 ? 1 : 0);
|
||||
|
||||
if (i3gbe) {
|
||||
if (lll) {
|
||||
LOG(logINFOGREEN, ("\tVeto (3GbE) : enabled\n\n"));
|
||||
} else {
|
||||
LOG(logINFORED, ("\tVeto (3GbE) : disabled\n\n"));
|
||||
@ -2606,9 +2606,9 @@ int getVetoStream() {
|
||||
return ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ENBL_MSK) ? 1 : 0);
|
||||
}
|
||||
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum streamingInterface interface) {
|
||||
// 3gbe
|
||||
if (interface == I3GBE) {
|
||||
if (interface == LOW_LATENCY_LINK) {
|
||||
int retval = ((bus_r(CONFIG_REG) & CONFIG_VETO_CH_3GB_ALG_MSK) >>
|
||||
CONFIG_VETO_CH_3GB_ALG_OFST);
|
||||
switch (retval) {
|
||||
@ -2633,14 +2633,14 @@ enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface) {
|
||||
}
|
||||
}
|
||||
|
||||
void setVetoAlgorithm(enum ethernetInterface interface,
|
||||
void setVetoAlgorithm(enum streamingInterface interface,
|
||||
enum vetoAlgorithm alg) {
|
||||
uint32_t addr = CONFIG_REG;
|
||||
uint32_t value = bus_r(addr);
|
||||
switch (alg) {
|
||||
// more to follow
|
||||
case DEFAULT_ALGORITHM:
|
||||
if (interface == I3GBE) {
|
||||
if (interface == LOW_LATENCY_LINK) {
|
||||
LOG(logINFO, ("Setting default veto algorithm for 3Gbe\n"));
|
||||
value &= (~CONFIG_VETO_CH_3GB_ALG_MSK);
|
||||
value |= CONFIG_VETO_CH_3GB_ALG_DEFAULT_VAL;
|
||||
|
@ -542,8 +542,8 @@ void setVeto(int enable);
|
||||
int getVeto();
|
||||
void setVetoStream(int value);
|
||||
int getVetoStream();
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum ethernetInterface interface);
|
||||
void setVetoAlgorithm(enum ethernetInterface interface, enum vetoAlgorithm alg);
|
||||
enum vetoAlgorithm getVetoAlgorithm(enum streamingInterface interface);
|
||||
void setVetoAlgorithm(enum streamingInterface interface, enum vetoAlgorithm alg);
|
||||
void setBadChannels(int nch, int *channels);
|
||||
int *getBadChannels(int *nch);
|
||||
#endif
|
||||
|
@ -8372,7 +8372,7 @@ int get_master(int file_des){
|
||||
int get_veto_stream(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
enum ethernetInterface retval = NONE;
|
||||
enum streamingInterface retval = NONE;
|
||||
|
||||
LOG(logDEBUG1, ("Getting veto stream\n"));
|
||||
|
||||
@ -8389,7 +8389,7 @@ int get_veto_stream(int file_des) {
|
||||
int set_veto_stream(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
enum ethernetInterface arg = 0;
|
||||
enum streamingInterface arg = 0;
|
||||
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
@ -8421,7 +8421,7 @@ int set_veto_stream(int file_des) {
|
||||
int get_veto_algorithm(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
enum ethernetInterface arg = NONE;
|
||||
enum streamingInterface arg = NONE;
|
||||
enum vetoAlgorithm retval = DEFAULT_ALGORITHM;
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
@ -8432,7 +8432,7 @@ int get_veto_algorithm(int file_des) {
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
if (arg != I3GBE && arg != I10GBE) {
|
||||
if (arg != LOW_LATENCY_LINK && arg != ETHERNET_10GB) {
|
||||
ret = FAIL;
|
||||
sprintf(mess, "Could not get vetoalgorithm. Invalid interface %d.\n",
|
||||
arg);
|
||||
@ -8453,7 +8453,7 @@ int set_veto_algorithm(int file_des) {
|
||||
return printSocketReadError();
|
||||
|
||||
enum vetoAlgorithm alg = args[0];
|
||||
enum ethernetInterface interface = args[1];
|
||||
enum streamingInterface interface = args[1];
|
||||
LOG(logINFO, ("Setting vetoalgorithm (interface: %d): %u\n", (int)interface,
|
||||
(int)alg));
|
||||
|
||||
@ -8462,7 +8462,7 @@ int set_veto_algorithm(int file_des) {
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
if (interface != I3GBE && interface != I10GBE) {
|
||||
if (interface != LOW_LATENCY_LINK && interface != ETHERNET_10GB) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Could not set vetoalgorithm. Invalid interface %d.\n",
|
||||
|
Reference in New Issue
Block a user