mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 09:30:40 +02:00
clang-format
This commit is contained in:
parent
8565ac6cf2
commit
06dbf82e93
@ -53,9 +53,9 @@ int main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::ofstream fs2("depreciated.csv");
|
std::ofstream fs2("depreciated.csv");
|
||||||
fs2 << "Old, New\n";
|
fs2 << "Old, New\n";
|
||||||
auto cmds = proxy.GetDepreciatedCommands();
|
auto cmds = proxy.GetDepreciatedCommands();
|
||||||
for (auto it : cmds){
|
for (auto it : cmds) {
|
||||||
fs2 << it.first << ", " << it.second << '\n';
|
fs2 << it.first << ", " << it.second << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "sls/Detector.h"
|
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
|
#include "sls/Detector.h"
|
||||||
#include "ui_form_detectormain.h"
|
#include "ui_form_detectormain.h"
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "qTabAdvanced.h"
|
#include "qTabAdvanced.h"
|
||||||
#include "sls/network_utils.h"
|
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
#include "qDrawPlot.h"
|
#include "qDrawPlot.h"
|
||||||
|
#include "sls/network_utils.h"
|
||||||
|
|
||||||
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
|
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
|
||||||
qDrawPlot *p)
|
qDrawPlot *p)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "qTabDebugging.h"
|
#include "qTabDebugging.h"
|
||||||
#include "sls/ToString.h"
|
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
|
#include "sls/ToString.h"
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "qTabSettings.h"
|
#include "qTabSettings.h"
|
||||||
#include "sls/ToString.h"
|
|
||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
|
#include "sls/ToString.h"
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "blackfin.h"
|
#include "blackfin.h"
|
||||||
#include "RegisterDefs.h"
|
#include "RegisterDefs.h"
|
||||||
#include "sls/ansi.h"
|
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
|
#include "sls/ansi.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#include <fcntl.h> // open
|
#include <fcntl.h> // open
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "nios.h"
|
#include "nios.h"
|
||||||
#include "RegisterDefs.h"
|
#include "RegisterDefs.h"
|
||||||
#include "sls/ansi.h"
|
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "sls/ansi.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#include <fcntl.h> // open
|
#include <fcntl.h> // open
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "programFpgaBlackfin.h"
|
#include "programFpgaBlackfin.h"
|
||||||
#include "sls/ansi.h"
|
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
|
#include "sls/ansi.h"
|
||||||
#include "slsDetectorServer_defs.h"
|
#include "slsDetectorServer_defs.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "programFpgaNios.h"
|
#include "programFpgaNios.h"
|
||||||
#include "sls/ansi.h"
|
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
|
#include "sls/ansi.h"
|
||||||
#include "slsDetectorServer_defs.h"
|
#include "slsDetectorServer_defs.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "readDefaultPattern.h"
|
#include "readDefaultPattern.h"
|
||||||
#include "sls/ansi.h"
|
|
||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "slsDetectorServer_defs.h"
|
#include "sls/ansi.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
#include "slsDetectorServer_defs.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
#include "clogger.h"
|
#include "clogger.h"
|
||||||
#include "communication_funcs.h"
|
#include "communication_funcs.h"
|
||||||
#include "sharedMemory.h"
|
#include "sharedMemory.h"
|
||||||
#include "slsDetectorServer_defs.h"
|
|
||||||
#include "slsDetectorServer_funcs.h"
|
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#include "sls/versionAPI.h"
|
#include "sls/versionAPI.h"
|
||||||
|
#include "slsDetectorServer_defs.h"
|
||||||
|
#include "slsDetectorServer_funcs.h"
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -110,8 +110,8 @@ int main(int argc, char *argv[]) {
|
|||||||
#elif GOTTHARD2D
|
#elif GOTTHARD2D
|
||||||
version = APIGOTTHARD2;
|
version = APIGOTTHARD2;
|
||||||
#endif
|
#endif
|
||||||
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n",
|
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n", GITBRANCH,
|
||||||
GITBRANCH, version));
|
version));
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
|
@ -71,6 +71,6 @@ int main(int argc, char *argv[]) {
|
|||||||
} catch (const sls::RuntimeError &e) {
|
} catch (const sls::RuntimeError &e) {
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
@ -74,7 +74,7 @@ std::vector<std::string> CmdProxy::GetProxyCommands() {
|
|||||||
return commands;
|
return commands;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<std::string, std::string> CmdProxy::GetDepreciatedCommands(){
|
std::map<std::string, std::string> CmdProxy::GetDepreciatedCommands() {
|
||||||
return depreciated_functions;
|
return depreciated_functions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "sls/Result.h"
|
|
||||||
#include "SharedMemory.h"
|
#include "SharedMemory.h"
|
||||||
|
#include "sls/Result.h"
|
||||||
#include "sls/logger.h"
|
#include "sls/logger.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "test-CmdProxy-global.h"
|
#include "test-CmdProxy-global.h"
|
||||||
#include "CmdProxy.h"
|
#include "CmdProxy.h"
|
||||||
#include "sls/Detector.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/Detector.h"
|
||||||
#include "tests/globals.h"
|
#include "tests/globals.h"
|
||||||
|
|
||||||
using sls::CmdProxy;
|
using sls::CmdProxy;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
#include "catch.hpp"
|
||||||
#include "sls/Result.h"
|
#include "sls/Result.h"
|
||||||
#include "sls/ToString.h"
|
#include "sls/ToString.h"
|
||||||
#include "sls/TypeTraits.h"
|
#include "sls/TypeTraits.h"
|
||||||
#include "catch.hpp"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
using sls::Result;
|
using sls::Result;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace sls{
|
namespace sls {
|
||||||
|
|
||||||
/** Circular Fifo (a.k.a. Circular Buffer)
|
/** Circular Fifo (a.k.a. Circular Buffer)
|
||||||
* Thread safe for one reader, and one writer */
|
* Thread safe for one reader, and one writer */
|
||||||
@ -130,4 +130,4 @@ size_t CircularFifo<Element>::increment(size_t i) const {
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace sls
|
@ -4,9 +4,8 @@
|
|||||||
|
|
||||||
class ClientInterface;
|
class ClientInterface;
|
||||||
|
|
||||||
namespace sls
|
namespace sls {
|
||||||
{
|
|
||||||
|
|
||||||
class Receiver : private virtual slsDetectorDefs {
|
class Receiver : private virtual slsDetectorDefs {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Implementation.h"
|
#include "Implementation.h"
|
||||||
#include "sls/ServerSocket.h"
|
|
||||||
#include "receiver_defs.h"
|
#include "receiver_defs.h"
|
||||||
|
#include "sls/ServerSocket.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#include "sls/sls_detector_funcs.h"
|
#include "sls/sls_detector_funcs.h"
|
||||||
class ServerInterface;
|
class ServerInterface;
|
||||||
|
@ -51,8 +51,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
DataProcessor(int ind, detectorType dtype, Fifo *f, fileFormat *ftype,
|
DataProcessor(int ind, detectorType dtype, Fifo *f, fileFormat *ftype,
|
||||||
bool fwenable, bool *mfwenable, bool *dsEnable,
|
bool fwenable, bool *mfwenable, bool *dsEnable,
|
||||||
uint32_t *freq, uint32_t *timer, uint32_t *sfnum, bool *fp,
|
uint32_t *freq, uint32_t *timer, uint32_t *sfnum, bool *fp,
|
||||||
bool *act, bool *depaden, bool *sm,
|
bool *act, bool *depaden, bool *sm, std::vector<int> *cdl,
|
||||||
std::vector<int> *cdl, int *cdo, int *cad);
|
int *cdo, int *cad);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
*data to it
|
*data to it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sls/logger.h"
|
|
||||||
#include "receiver_defs.h"
|
#include "receiver_defs.h"
|
||||||
|
#include "sls/logger.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
*@short abstract for setting/getting properties of detector data
|
*@short abstract for setting/getting properties of detector data
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "receiver_defs.h"
|
||||||
#include "sls/ToString.h"
|
#include "sls/ToString.h"
|
||||||
#include "sls/logger.h"
|
#include "sls/logger.h"
|
||||||
#include "receiver_defs.h"
|
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#include <cmath> //ceil
|
#include <cmath> //ceil
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include "receiver_defs.h"
|
||||||
#include "sls/container_utils.h"
|
#include "sls/container_utils.h"
|
||||||
#include "sls/logger.h"
|
#include "sls/logger.h"
|
||||||
#include "sls/network_utils.h"
|
#include "sls/network_utils.h"
|
||||||
#include "receiver_defs.h"
|
|
||||||
class GeneralData;
|
class GeneralData;
|
||||||
class Listener;
|
class Listener;
|
||||||
class DataProcessor;
|
class DataProcessor;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
namespace sls{
|
namespace sls {
|
||||||
|
|
||||||
Receiver::~Receiver() = default;
|
Receiver::~Receiver() = default;
|
||||||
|
|
||||||
@ -145,4 +145,4 @@ void Receiver::registerCallBackRawDataModifyReady(
|
|||||||
tcpipInterface->registerCallBackRawDataModifyReady(func, arg);
|
tcpipInterface->registerCallBackRawDataModifyReady(func, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} // namespace sls
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/CircularFifo.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/CircularFifo.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using sls::CircularFifo;
|
using sls::CircularFifo;
|
||||||
|
3
slsSupportLib/include/sls/string_utils.h
Executable file → Normal file
3
slsSupportLib/include/sls/string_utils.h
Executable file → Normal file
@ -52,6 +52,5 @@ std::vector<std::string> split(const std::string &strToSplit, char delimeter);
|
|||||||
|
|
||||||
std::string RemoveUnit(std::string &str);
|
std::string RemoveUnit(std::string &str);
|
||||||
|
|
||||||
bool is_int(const std::string& s);
|
bool is_int(const std::string &s);
|
||||||
} // namespace sls
|
} // namespace sls
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/** API versions */
|
/** API versions */
|
||||||
#define GITBRANCH "5.0.0"
|
#define GITBRANCH "5.0.0"
|
||||||
#define APICTB 0x201117
|
#define APICTB 0x201117
|
||||||
#define APIGOTTHARD 0x201117
|
#define APIGOTTHARD 0x201117
|
||||||
#define APIGOTTHARD2 0x201117
|
#define APIGOTTHARD2 0x201117
|
||||||
#define APIJUNGFRAU 0x201117
|
#define APIJUNGFRAU 0x201117
|
||||||
#define APIMYTHEN3 0x201117
|
#define APIMYTHEN3 0x201117
|
||||||
#define APIMOENCH 0x201117
|
#define APIMOENCH 0x201117
|
||||||
#define APIEIGER 0x201117
|
#define APIEIGER 0x201117
|
||||||
#define APILIB 0x201118
|
#define APILIB 0x201118
|
||||||
#define APIRECEIVER 0x201118
|
#define APIRECEIVER 0x201118
|
||||||
#define APIGUI 0x201118
|
#define APIGUI 0x201118
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
#include "catch.hpp"
|
||||||
#include "sls/ClientSocket.h"
|
#include "sls/ClientSocket.h"
|
||||||
#include "sls/ServerSocket.h"
|
#include "sls/ServerSocket.h"
|
||||||
#include "catch.hpp"
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <future>
|
#include <future>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
#include "catch.hpp"
|
||||||
#include "sls/StaticVector.h"
|
#include "sls/StaticVector.h"
|
||||||
#include "sls/TypeTraits.h"
|
#include "sls/TypeTraits.h"
|
||||||
#include "catch.hpp"
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
2
slsSupportLib/tests/test-Timer.cpp
Executable file → Normal file
2
slsSupportLib/tests/test-Timer.cpp
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
#include "sls/Timer.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/Timer.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
#include "catch.hpp"
|
||||||
#include "sls/TimeHelper.h"
|
#include "sls/TimeHelper.h"
|
||||||
#include "sls/ToString.h"
|
#include "sls/ToString.h"
|
||||||
#include "catch.hpp"
|
|
||||||
#include "sls/network_utils.h"
|
#include "sls/network_utils.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/TypeTraits.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/TypeTraits.h"
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/UdpRxSocket.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/UdpRxSocket.h"
|
||||||
#include "sls/sls_detector_exceptions.h"
|
#include "sls/sls_detector_exceptions.h"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/ZmqSocket.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/ZmqSocket.h"
|
||||||
|
|
||||||
TEST_CASE("Throws when cannot create socket") {
|
TEST_CASE("Throws when cannot create socket") {
|
||||||
REQUIRE_THROWS(ZmqSocket("sdiasodjajpvv", 5076001));
|
REQUIRE_THROWS(ZmqSocket("sdiasodjajpvv", 5076001));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/bit_utils.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/bit_utils.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
TEST_CASE("Get set bits from 0") {
|
TEST_CASE("Get set bits from 0") {
|
||||||
|
@ -66,7 +66,7 @@ TEST_CASE("Many characters in a row") {
|
|||||||
REQUIRE(std::string(str) == "someeequite::ongstring");
|
REQUIRE(std::string(str) == "someeequite::ongstring");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Check is string is integer"){
|
TEST_CASE("Check is string is integer") {
|
||||||
|
|
||||||
REQUIRE(sls::is_int("75"));
|
REQUIRE(sls::is_int("75"));
|
||||||
REQUIRE(sls::is_int("11675"));
|
REQUIRE(sls::is_int("11675"));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/ClientSocket.h"
|
|
||||||
#include "clara.hpp"
|
#include "clara.hpp"
|
||||||
|
#include "sls/ClientSocket.h"
|
||||||
#include "sls/sls_detector_exceptions.h"
|
#include "sls/sls_detector_exceptions.h"
|
||||||
#include "tests/testenum.h"
|
#include "tests/testenum.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "sls/ServerSocket.h"
|
|
||||||
#include "clara.hpp"
|
#include "clara.hpp"
|
||||||
|
#include "sls/ServerSocket.h"
|
||||||
|
|
||||||
#include "tests/testenum.h"
|
#include "tests/testenum.h"
|
||||||
|
|
||||||
|
2
tests/test.cpp
Executable file → Normal file
2
tests/test.cpp
Executable file → Normal file
@ -3,8 +3,8 @@
|
|||||||
// #include "catch.hpp"
|
// #include "catch.hpp"
|
||||||
|
|
||||||
#define CATCH_CONFIG_RUNNER
|
#define CATCH_CONFIG_RUNNER
|
||||||
#include "sls/ToString.h"
|
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
#include "sls/ToString.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
#include "tests/config.h"
|
#include "tests/config.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user