mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 10:20:04 +02:00
formatting
This commit is contained in:
parent
d23722a4b7
commit
fc24558314
@ -1742,7 +1742,7 @@ int Feb_Control_WriteRegister_BitMask(uint32_t offset, uint32_t data,
|
||||
|
||||
int Feb_Control_ReadRegister_BitMask(uint32_t offset, uint32_t *retval,
|
||||
uint32_t bitmask) {
|
||||
|
||||
|
||||
uint32_t actualOffset = offset;
|
||||
char side[2][10] = {"right", "left"};
|
||||
unsigned int addr[2] = {Feb_Control_rightAddress, Feb_Control_leftAddress};
|
||||
@ -2213,7 +2213,7 @@ int Feb_Control_GetFPGAHardwareVersion(int *retval) {
|
||||
}
|
||||
unsigned int value = 0;
|
||||
if (!Feb_Control_ReadRegister_BitMask(FEB_REG_STATUS, &value,
|
||||
FEB_REG_STATUS_FX30_MSK)) {
|
||||
FEB_REG_STATUS_FX30_MSK)) {
|
||||
LOG(logERROR,
|
||||
("Trouble reading FEB_REG_STATUS reg to feb hardware version\n"));
|
||||
return 0;
|
||||
|
@ -133,8 +133,8 @@ void basictests() {
|
||||
"Software Version : %s\n"
|
||||
"********************************************************\n",
|
||||
(unsigned int)ipadd, (long long unsigned int)macadd,
|
||||
(long long int)fwversion,
|
||||
(long long int)sw_fw_apiversion, REQUIRED_FIRMWARE_VERSION, swversion));
|
||||
(long long int)fwversion, (long long int)sw_fw_apiversion,
|
||||
REQUIRED_FIRMWARE_VERSION, swversion));
|
||||
|
||||
// update default udpdstip and udpdstmac (1g is hardware ip and hardware
|
||||
// mac)
|
||||
@ -406,35 +406,36 @@ void initControlServer() {
|
||||
Beb_Beb();
|
||||
LOG(logDEBUG1, ("Control server: BEB Initialization done\n"));
|
||||
|
||||
// Getting the feb versions after initialization
|
||||
char hversion[MAX_STR_LENGTH] = {0};
|
||||
memset(hversion, 0, MAX_STR_LENGTH);
|
||||
getHardwareVersion(hversion);
|
||||
int64_t fwversion = getFirmwareVersion();
|
||||
int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT);
|
||||
int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT);
|
||||
LOG(logINFOBLUE,
|
||||
("\n********************************************************\n"
|
||||
"Feb Versions\n"
|
||||
"Hardware Version : %s\n"
|
||||
"Firmware (Febl) Version : %lld\n"
|
||||
"Firmware (Febr) Version : %lld\n"
|
||||
"********************************************************\n",
|
||||
hversion, (long long int)feblfwversion,
|
||||
(long long int)febrfwversion));
|
||||
// Getting the feb versions after initialization
|
||||
char hversion[MAX_STR_LENGTH] = {0};
|
||||
memset(hversion, 0, MAX_STR_LENGTH);
|
||||
getHardwareVersion(hversion);
|
||||
int64_t fwversion = getFirmwareVersion();
|
||||
int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT);
|
||||
int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT);
|
||||
LOG(logINFOBLUE,
|
||||
("\n********************************************************\n"
|
||||
"Feb Versions\n"
|
||||
"Hardware Version : %s\n"
|
||||
"Firmware (Febl) Version : %lld\n"
|
||||
"Firmware (Febr) Version : %lld\n"
|
||||
"********************************************************\n",
|
||||
hversion, (long long int)feblfwversion,
|
||||
(long long int)febrfwversion));
|
||||
|
||||
// ensure febl, febr and beb fw versions are the same
|
||||
if (fwversion != feblfwversion || fwversion != febrfwversion) {
|
||||
sprintf(initErrorMessage,
|
||||
// ensure febl, febr and beb fw versions are the same
|
||||
if (fwversion != feblfwversion || fwversion != febrfwversion) {
|
||||
sprintf(
|
||||
initErrorMessage,
|
||||
"Inconsistent firmware versions in feb and beb. [Beb: %lld, "
|
||||
"Febl: %lld Febr: %lld]\n",
|
||||
(long long int)fwversion, (long long int)feblfwversion,
|
||||
(long long int)febrfwversion);
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
LOG(logERROR, (initErrorMessage));
|
||||
initError = FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
// also reads config file and deactivates
|
||||
setupDetector();
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#include <thread>
|
||||
#include <unistd.h>
|
||||
#include<sys/wait.h>
|
||||
|
||||
namespace sls {
|
||||
|
||||
@ -17,9 +17,7 @@ namespace sls {
|
||||
#define gettid() syscall(SYS_gettid)
|
||||
#endif
|
||||
|
||||
void func(int signum) {
|
||||
wait(NULL);
|
||||
}
|
||||
void func(int signum) { wait(NULL); }
|
||||
|
||||
Arping::Arping() {}
|
||||
|
||||
@ -122,7 +120,8 @@ std::string Arping::ExecuteCommands() {
|
||||
FILE *sysFile = popen(cmd.c_str(), "r");
|
||||
if (sysFile == NULL) {
|
||||
std::ostringstream os;
|
||||
os << "Could not Arping (" << cmd << " ) : Popen fail (" << strerror(errno) << ')';
|
||||
os << "Could not Arping (" << cmd << " ) : Popen fail ("
|
||||
<< strerror(errno) << ')';
|
||||
return os.str();
|
||||
}
|
||||
|
||||
@ -134,7 +133,7 @@ std::string Arping::ExecuteCommands() {
|
||||
// check exit status of command
|
||||
if (pclose(sysFile)) {
|
||||
std::ostringstream os;
|
||||
os << "Could not arping (" << cmd << ") : " << strerror(errno);
|
||||
os << "Could not arping (" << cmd << ") : " << strerror(errno);
|
||||
return os.str();
|
||||
} else {
|
||||
LOG(logDEBUG) << output;
|
||||
|
@ -636,7 +636,7 @@ void MasterAttributes::GetMoenchBinaryAttributes(
|
||||
|
||||
#ifdef HDF5C
|
||||
void MasterAttributes::WriteMoenchHDF5Attributes(H5::H5File *fd,
|
||||
H5::Group *group) {
|
||||
H5::Group *group) {
|
||||
MasterAttributes::WriteHDF5Exptime(fd, group);
|
||||
MasterAttributes::WriteHDF5Period(fd, group);
|
||||
MasterAttributes::WriteHDF5NumUDPInterfaces(fd, group);
|
||||
|
@ -10,4 +10,4 @@
|
||||
#define APIMOENCH "developer 0x230224"
|
||||
#define APILIB "developer 0x230224"
|
||||
#define APIRECEIVER "developer 0x230224"
|
||||
#define APIEIGER "developer 0x230224"
|
||||
#define APIEIGER "developer 0x230224"
|
||||
|
Loading…
x
Reference in New Issue
Block a user