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