formatting

This commit is contained in:
maliakal_d 2023-03-17 14:42:11 +01:00
parent d23722a4b7
commit fc24558314
5 changed files with 36 additions and 36 deletions

View File

@ -2213,7 +2213,7 @@ int Feb_Control_GetFPGAHardwareVersion(int *retval) {
} }
unsigned int value = 0; unsigned int value = 0;
if (!Feb_Control_ReadRegister_BitMask(FEB_REG_STATUS, &value, if (!Feb_Control_ReadRegister_BitMask(FEB_REG_STATUS, &value,
FEB_REG_STATUS_FX30_MSK)) { FEB_REG_STATUS_FX30_MSK)) {
LOG(logERROR, LOG(logERROR,
("Trouble reading FEB_REG_STATUS reg to feb hardware version\n")); ("Trouble reading FEB_REG_STATUS reg to feb hardware version\n"));
return 0; return 0;

View File

@ -133,8 +133,8 @@ void basictests() {
"Software Version : %s\n" "Software Version : %s\n"
"********************************************************\n", "********************************************************\n",
(unsigned int)ipadd, (long long unsigned int)macadd, (unsigned int)ipadd, (long long unsigned int)macadd,
(long long int)fwversion, (long long int)fwversion, (long long int)sw_fw_apiversion,
(long long int)sw_fw_apiversion, REQUIRED_FIRMWARE_VERSION, swversion)); REQUIRED_FIRMWARE_VERSION, swversion));
// update default udpdstip and udpdstmac (1g is hardware ip and hardware // update default udpdstip and udpdstmac (1g is hardware ip and hardware
// mac) // mac)
@ -406,34 +406,35 @@ void initControlServer() {
Beb_Beb(); Beb_Beb();
LOG(logDEBUG1, ("Control server: BEB Initialization done\n")); LOG(logDEBUG1, ("Control server: BEB Initialization done\n"));
// Getting the feb versions after initialization // Getting the feb versions after initialization
char hversion[MAX_STR_LENGTH] = {0}; char hversion[MAX_STR_LENGTH] = {0};
memset(hversion, 0, MAX_STR_LENGTH); memset(hversion, 0, MAX_STR_LENGTH);
getHardwareVersion(hversion); getHardwareVersion(hversion);
int64_t fwversion = getFirmwareVersion(); int64_t fwversion = getFirmwareVersion();
int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT); int64_t feblfwversion = getFrontEndFirmwareVersion(FRONT_LEFT);
int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT); int64_t febrfwversion = getFrontEndFirmwareVersion(FRONT_RIGHT);
LOG(logINFOBLUE, LOG(logINFOBLUE,
("\n********************************************************\n" ("\n********************************************************\n"
"Feb Versions\n" "Feb Versions\n"
"Hardware Version : %s\n" "Hardware Version : %s\n"
"Firmware (Febl) Version : %lld\n" "Firmware (Febl) Version : %lld\n"
"Firmware (Febr) Version : %lld\n" "Firmware (Febr) Version : %lld\n"
"********************************************************\n", "********************************************************\n",
hversion, (long long int)feblfwversion, hversion, (long long int)feblfwversion,
(long long int)febrfwversion)); (long long int)febrfwversion));
// ensure febl, febr and beb fw versions are the same // ensure febl, febr and beb fw versions are the same
if (fwversion != feblfwversion || fwversion != febrfwversion) { if (fwversion != feblfwversion || fwversion != febrfwversion) {
sprintf(initErrorMessage, sprintf(
initErrorMessage,
"Inconsistent firmware versions in feb and beb. [Beb: %lld, " "Inconsistent firmware versions in feb and beb. [Beb: %lld, "
"Febl: %lld Febr: %lld]\n", "Febl: %lld Febr: %lld]\n",
(long long int)fwversion, (long long int)feblfwversion, (long long int)fwversion, (long long int)feblfwversion,
(long long int)febrfwversion); (long long int)febrfwversion);
LOG(logERROR, (initErrorMessage)); LOG(logERROR, (initErrorMessage));
initError = FAIL; initError = FAIL;
return; return;
} }
#endif #endif
// also reads config file and deactivates // also reads config file and deactivates

View File

@ -5,9 +5,9 @@
#include <chrono> #include <chrono>
#include <signal.h> #include <signal.h>
#include <sys/wait.h>
#include <thread> #include <thread>
#include <unistd.h> #include <unistd.h>
#include<sys/wait.h>
namespace sls { namespace sls {
@ -17,9 +17,7 @@ namespace sls {
#define gettid() syscall(SYS_gettid) #define gettid() syscall(SYS_gettid)
#endif #endif
void func(int signum) { void func(int signum) { wait(NULL); }
wait(NULL);
}
Arping::Arping() {} Arping::Arping() {}
@ -122,7 +120,8 @@ std::string Arping::ExecuteCommands() {
FILE *sysFile = popen(cmd.c_str(), "r"); FILE *sysFile = popen(cmd.c_str(), "r");
if (sysFile == NULL) { if (sysFile == NULL) {
std::ostringstream os; std::ostringstream os;
os << "Could not Arping (" << cmd << " ) : Popen fail (" << strerror(errno) << ')'; os << "Could not Arping (" << cmd << " ) : Popen fail ("
<< strerror(errno) << ')';
return os.str(); return os.str();
} }
@ -134,7 +133,7 @@ std::string Arping::ExecuteCommands() {
// check exit status of command // check exit status of command
if (pclose(sysFile)) { if (pclose(sysFile)) {
std::ostringstream os; std::ostringstream os;
os << "Could not arping (" << cmd << ") : " << strerror(errno); os << "Could not arping (" << cmd << ") : " << strerror(errno);
return os.str(); return os.str();
} else { } else {
LOG(logDEBUG) << output; LOG(logDEBUG) << output;

View File

@ -636,7 +636,7 @@ void MasterAttributes::GetMoenchBinaryAttributes(
#ifdef HDF5C #ifdef HDF5C
void MasterAttributes::WriteMoenchHDF5Attributes(H5::H5File *fd, void MasterAttributes::WriteMoenchHDF5Attributes(H5::H5File *fd,
H5::Group *group) { H5::Group *group) {
MasterAttributes::WriteHDF5Exptime(fd, group); MasterAttributes::WriteHDF5Exptime(fd, group);
MasterAttributes::WriteHDF5Period(fd, group); MasterAttributes::WriteHDF5Period(fd, group);
MasterAttributes::WriteHDF5NumUDPInterfaces(fd, group); MasterAttributes::WriteHDF5NumUDPInterfaces(fd, group);

View File

@ -10,4 +10,4 @@
#define APIMOENCH "developer 0x230224" #define APIMOENCH "developer 0x230224"
#define APILIB "developer 0x230224" #define APILIB "developer 0x230224"
#define APIRECEIVER "developer 0x230224" #define APIRECEIVER "developer 0x230224"
#define APIEIGER "developer 0x230224" #define APIEIGER "developer 0x230224"