diff --git a/docs/src/gendoc.cpp b/docs/src/gendoc.cpp index f63c4c5d5..6d3278850 100644 --- a/docs/src/gendoc.cpp +++ b/docs/src/gendoc.cpp @@ -53,9 +53,9 @@ int main() { } std::ofstream fs2("depreciated.csv"); - fs2 << "Old, New\n"; + fs2 << "Old, New\n"; auto cmds = proxy.GetDepreciatedCommands(); - for (auto it : cmds){ + for (auto it : cmds) { fs2 << it.first << ", " << it.second << '\n'; } } diff --git a/slsDetectorGui/include/qDetectorMain.h b/slsDetectorGui/include/qDetectorMain.h index cfb153aa8..92ae9b6cc 100644 --- a/slsDetectorGui/include/qDetectorMain.h +++ b/slsDetectorGui/include/qDetectorMain.h @@ -1,6 +1,6 @@ #pragma once -#include "sls/Detector.h" #include "qDefs.h" +#include "sls/Detector.h" #include "ui_form_detectormain.h" #include diff --git a/slsDetectorGui/src/qTabAdvanced.cpp b/slsDetectorGui/src/qTabAdvanced.cpp index 6c0ddf168..afbe147e2 100644 --- a/slsDetectorGui/src/qTabAdvanced.cpp +++ b/slsDetectorGui/src/qTabAdvanced.cpp @@ -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) diff --git a/slsDetectorGui/src/qTabDebugging.cpp b/slsDetectorGui/src/qTabDebugging.cpp index 07dc1673b..3e6497710 100644 --- a/slsDetectorGui/src/qTabDebugging.cpp +++ b/slsDetectorGui/src/qTabDebugging.cpp @@ -1,6 +1,6 @@ #include "qTabDebugging.h" -#include "sls/ToString.h" #include "qDefs.h" +#include "sls/ToString.h" #include #include #include diff --git a/slsDetectorGui/src/qTabSettings.cpp b/slsDetectorGui/src/qTabSettings.cpp index 77c2f4462..c7941e8d9 100644 --- a/slsDetectorGui/src/qTabSettings.cpp +++ b/slsDetectorGui/src/qTabSettings.cpp @@ -1,6 +1,6 @@ #include "qTabSettings.h" -#include "sls/ToString.h" #include "qDefs.h" +#include "sls/ToString.h" #include qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector) diff --git a/slsDetectorServers/slsDetectorServer/src/blackfin.c b/slsDetectorServers/slsDetectorServer/src/blackfin.c index 926b480f1..6d8ad90f7 100644 --- a/slsDetectorServers/slsDetectorServer/src/blackfin.c +++ b/slsDetectorServers/slsDetectorServer/src/blackfin.c @@ -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 // open diff --git a/slsDetectorServers/slsDetectorServer/src/nios.c b/slsDetectorServers/slsDetectorServer/src/nios.c index af4a8f477..27de69d7b 100644 --- a/slsDetectorServers/slsDetectorServer/src/nios.c +++ b/slsDetectorServers/slsDetectorServer/src/nios.c @@ -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 // open diff --git a/slsDetectorServers/slsDetectorServer/src/programFpgaBlackfin.c b/slsDetectorServers/slsDetectorServer/src/programFpgaBlackfin.c index 645d42886..e44d5ff8c 100644 --- a/slsDetectorServers/slsDetectorServer/src/programFpgaBlackfin.c +++ b/slsDetectorServers/slsDetectorServer/src/programFpgaBlackfin.c @@ -1,6 +1,6 @@ #include "programFpgaBlackfin.h" -#include "sls/ansi.h" #include "clogger.h" +#include "sls/ansi.h" #include "slsDetectorServer_defs.h" #include diff --git a/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c b/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c index 134fb5a91..bfd5957c3 100644 --- a/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c +++ b/slsDetectorServers/slsDetectorServer/src/programFpgaNios.c @@ -1,6 +1,6 @@ #include "programFpgaNios.h" -#include "sls/ansi.h" #include "clogger.h" +#include "sls/ansi.h" #include "slsDetectorServer_defs.h" #include diff --git a/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c b/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c index e60370306..63064fa7e 100644 --- a/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c +++ b/slsDetectorServers/slsDetectorServer/src/readDefaultPattern.c @@ -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 diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c index 98e327709..87acd4693 100644 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer.c @@ -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 #include @@ -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': diff --git a/slsDetectorSoftware/src/CmdLineApp.cpp b/slsDetectorSoftware/src/CmdLineApp.cpp index bf010971e..833b35cac 100644 --- a/slsDetectorSoftware/src/CmdLineApp.cpp +++ b/slsDetectorSoftware/src/CmdLineApp.cpp @@ -71,6 +71,6 @@ int main(int argc, char *argv[]) { } catch (const sls::RuntimeError &e) { exit(EXIT_FAILURE); } - + exit(EXIT_SUCCESS); } \ No newline at end of file diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index a82d63845..69a52a36b 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -74,7 +74,7 @@ std::vector CmdProxy::GetProxyCommands() { return commands; } -std::map CmdProxy::GetDepreciatedCommands(){ +std::map CmdProxy::GetDepreciatedCommands() { return depreciated_functions; } diff --git a/slsDetectorSoftware/src/DetectorImpl.h b/slsDetectorSoftware/src/DetectorImpl.h index e88876919..fa34c5ca1 100644 --- a/slsDetectorSoftware/src/DetectorImpl.h +++ b/slsDetectorSoftware/src/DetectorImpl.h @@ -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" diff --git a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp b/slsDetectorSoftware/tests/test-CmdProxy-global.cpp index 1690fcb6c..3e149ef78 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-global.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-global.cpp @@ -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; diff --git a/slsDetectorSoftware/tests/test-Result.cpp b/slsDetectorSoftware/tests/test-Result.cpp index 8e659a559..bb113c93e 100644 --- a/slsDetectorSoftware/tests/test-Result.cpp +++ b/slsDetectorSoftware/tests/test-Result.cpp @@ -1,7 +1,7 @@ +#include "catch.hpp" #include "sls/Result.h" #include "sls/ToString.h" #include "sls/TypeTraits.h" -#include "catch.hpp" #include using sls::Result; diff --git a/slsReceiverSoftware/include/sls/CircularFifo.h b/slsReceiverSoftware/include/sls/CircularFifo.h index 708692cf0..b3f81233d 100644 --- a/slsReceiverSoftware/include/sls/CircularFifo.h +++ b/slsReceiverSoftware/include/sls/CircularFifo.h @@ -11,7 +11,7 @@ #include #include -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::increment(size_t i) const { return i; } -} \ No newline at end of file +} // namespace sls \ No newline at end of file diff --git a/slsReceiverSoftware/include/sls/Receiver.h b/slsReceiverSoftware/include/sls/Receiver.h index 6f5313768..dabc05a48 100644 --- a/slsReceiverSoftware/include/sls/Receiver.h +++ b/slsReceiverSoftware/include/sls/Receiver.h @@ -4,9 +4,8 @@ class ClientInterface; -namespace sls -{ - +namespace sls { + class Receiver : private virtual slsDetectorDefs { public: diff --git a/slsReceiverSoftware/src/ClientInterface.h b/slsReceiverSoftware/src/ClientInterface.h index bc6e7a420..e9bd2cc2f 100644 --- a/slsReceiverSoftware/src/ClientInterface.h +++ b/slsReceiverSoftware/src/ClientInterface.h @@ -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; diff --git a/slsReceiverSoftware/src/DataProcessor.h b/slsReceiverSoftware/src/DataProcessor.h index ae5bb6f94..98c7a19b6 100644 --- a/slsReceiverSoftware/src/DataProcessor.h +++ b/slsReceiverSoftware/src/DataProcessor.h @@ -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 *cdl, int *cdo, int *cad); + bool *act, bool *depaden, bool *sm, std::vector *cdl, + int *cdo, int *cad); /** * Destructor diff --git a/slsReceiverSoftware/src/File.h b/slsReceiverSoftware/src/File.h index d37550984..6077bcb76 100644 --- a/slsReceiverSoftware/src/File.h +++ b/slsReceiverSoftware/src/File.h @@ -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 diff --git a/slsReceiverSoftware/src/GeneralData.h b/slsReceiverSoftware/src/GeneralData.h index 4c08fa54f..975cdd8bd 100644 --- a/slsReceiverSoftware/src/GeneralData.h +++ b/slsReceiverSoftware/src/GeneralData.h @@ -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 //ceil #include diff --git a/slsReceiverSoftware/src/Implementation.h b/slsReceiverSoftware/src/Implementation.h index ab2899992..f5dbb838b 100644 --- a/slsReceiverSoftware/src/Implementation.h +++ b/slsReceiverSoftware/src/Implementation.h @@ -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; diff --git a/slsReceiverSoftware/src/Receiver.cpp b/slsReceiverSoftware/src/Receiver.cpp index 6028029f4..4c2c5f178 100644 --- a/slsReceiverSoftware/src/Receiver.cpp +++ b/slsReceiverSoftware/src/Receiver.cpp @@ -15,7 +15,7 @@ #include #include -namespace sls{ +namespace sls { Receiver::~Receiver() = default; @@ -145,4 +145,4 @@ void Receiver::registerCallBackRawDataModifyReady( tcpipInterface->registerCallBackRawDataModifyReady(func, arg); } -} \ No newline at end of file +} // namespace sls \ No newline at end of file diff --git a/slsReceiverSoftware/tests/test-CircularFifo.cpp b/slsReceiverSoftware/tests/test-CircularFifo.cpp index d0669e9b1..f1614f55a 100644 --- a/slsReceiverSoftware/tests/test-CircularFifo.cpp +++ b/slsReceiverSoftware/tests/test-CircularFifo.cpp @@ -1,5 +1,5 @@ -#include "sls/CircularFifo.h" #include "catch.hpp" +#include "sls/CircularFifo.h" #include using sls::CircularFifo; diff --git a/slsSupportLib/include/sls/string_utils.h b/slsSupportLib/include/sls/string_utils.h old mode 100755 new mode 100644 index 7f287fc5b..3b04d70dd --- a/slsSupportLib/include/sls/string_utils.h +++ b/slsSupportLib/include/sls/string_utils.h @@ -52,6 +52,5 @@ std::vector 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 - diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 84feba1c3..dc8be166f 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -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 diff --git a/slsSupportLib/tests/test-Sockets.cpp b/slsSupportLib/tests/test-Sockets.cpp index 97ddb1163..ef1dc6696 100644 --- a/slsSupportLib/tests/test-Sockets.cpp +++ b/slsSupportLib/tests/test-Sockets.cpp @@ -1,6 +1,6 @@ +#include "catch.hpp" #include "sls/ClientSocket.h" #include "sls/ServerSocket.h" -#include "catch.hpp" #include #include #include diff --git a/slsSupportLib/tests/test-StaticVector.cpp b/slsSupportLib/tests/test-StaticVector.cpp index a529173d2..419ebd770 100644 --- a/slsSupportLib/tests/test-StaticVector.cpp +++ b/slsSupportLib/tests/test-StaticVector.cpp @@ -1,6 +1,6 @@ +#include "catch.hpp" #include "sls/StaticVector.h" #include "sls/TypeTraits.h" -#include "catch.hpp" #include #include diff --git a/slsSupportLib/tests/test-Timer.cpp b/slsSupportLib/tests/test-Timer.cpp old mode 100755 new mode 100644 index 518e5235c..d3c80c692 --- a/slsSupportLib/tests/test-Timer.cpp +++ b/slsSupportLib/tests/test-Timer.cpp @@ -1,5 +1,5 @@ -#include "sls/Timer.h" #include "catch.hpp" +#include "sls/Timer.h" #include #include diff --git a/slsSupportLib/tests/test-ToString.cpp b/slsSupportLib/tests/test-ToString.cpp index a550e4947..adeb53c50 100644 --- a/slsSupportLib/tests/test-ToString.cpp +++ b/slsSupportLib/tests/test-ToString.cpp @@ -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 diff --git a/slsSupportLib/tests/test-TypeTraits.cpp b/slsSupportLib/tests/test-TypeTraits.cpp index f9515a3f0..e6cb3104d 100644 --- a/slsSupportLib/tests/test-TypeTraits.cpp +++ b/slsSupportLib/tests/test-TypeTraits.cpp @@ -1,5 +1,5 @@ -#include "sls/TypeTraits.h" #include "catch.hpp" +#include "sls/TypeTraits.h" #include #include #include diff --git a/slsSupportLib/tests/test-UdpRxSocket.cpp b/slsSupportLib/tests/test-UdpRxSocket.cpp index a01605b0f..05450d114 100644 --- a/slsSupportLib/tests/test-UdpRxSocket.cpp +++ b/slsSupportLib/tests/test-UdpRxSocket.cpp @@ -1,5 +1,5 @@ -#include "sls/UdpRxSocket.h" #include "catch.hpp" +#include "sls/UdpRxSocket.h" #include "sls/sls_detector_exceptions.h" #include #include diff --git a/slsSupportLib/tests/test-ZmqSocket.cpp b/slsSupportLib/tests/test-ZmqSocket.cpp index 519ef5068..92dc2c102 100644 --- a/slsSupportLib/tests/test-ZmqSocket.cpp +++ b/slsSupportLib/tests/test-ZmqSocket.cpp @@ -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)); diff --git a/slsSupportLib/tests/test-bit_utils.cpp b/slsSupportLib/tests/test-bit_utils.cpp index 468e3a547..9039e2aef 100644 --- a/slsSupportLib/tests/test-bit_utils.cpp +++ b/slsSupportLib/tests/test-bit_utils.cpp @@ -1,5 +1,5 @@ -#include "sls/bit_utils.h" #include "catch.hpp" +#include "sls/bit_utils.h" #include TEST_CASE("Get set bits from 0") { diff --git a/slsSupportLib/tests/test-string_utils.cpp b/slsSupportLib/tests/test-string_utils.cpp index 765250b4f..a9a2c000a 100644 --- a/slsSupportLib/tests/test-string_utils.cpp +++ b/slsSupportLib/tests/test-string_utils.cpp @@ -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")); diff --git a/tests/src/testclient.cpp b/tests/src/testclient.cpp index c051bca4a..c212bfb4a 100644 --- a/tests/src/testclient.cpp +++ b/tests/src/testclient.cpp @@ -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" diff --git a/tests/src/testserver.cpp b/tests/src/testserver.cpp index 69024adad..73262f335 100644 --- a/tests/src/testserver.cpp +++ b/tests/src/testserver.cpp @@ -1,5 +1,5 @@ -#include "sls/ServerSocket.h" #include "clara.hpp" +#include "sls/ServerSocket.h" #include "tests/testenum.h" diff --git a/tests/test.cpp b/tests/test.cpp old mode 100755 new mode 100644 index 452506a67..6ec78954e --- a/tests/test.cpp +++ b/tests/test.cpp @@ -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