Compare commits

...

11 Commits

Author SHA1 Message Date
37b2efb1ed Merge pull request #1178 from slsdetectorgroup/main_910/conda_build_fix
Some checks failed
CMake / Configure and build using cmake (push) Failing after 9s
fixed conda build
2025-03-28 14:39:43 +01:00
7ac18fbad9 update cmake<=3.28 in conda build requirements 2025-03-28 14:21:56 +01:00
6839315a7c release date 2025-03-28 11:38:50 +01:00
527915a2ca fixed conda build 2025-03-28 11:37:11 +01:00
64aad1e196 Merge pull request #1143 from slsdetectorgroup/9.1.0.rc
Some checks failed
CMake / Configure and build using cmake (push) Failing after 10s
9.1.0
2025-03-26 08:38:23 +01:00
d3f847100e updated date on release notes
Some checks failed
CMake / Configure and build using cmake (push) Failing after 11s
2025-03-25 17:08:40 +01:00
e1224936ca udpate api versioning 2025-03-25 17:02:53 +01:00
f29ef9e345 Merge pull request #1165 from slsdetectorgroup/910/multirxr_proper_cleanup_on_ctrlc
910: multirxr dirty destruct leaving arping thread hanging + versioning (multi and framesync)
2025-03-25 16:54:19 +01:00
00e3b196f6 added release notes 2025-03-20 13:40:37 +01:00
0109973e68 missed to commit 2025-03-20 13:38:17 +01:00
ad995b381a multireceiverapp: changed from pointer to destruct properly (or could have used reset() before exit but kept this for consistency with slsReceiver and slsFrameSynchronizer, added --version/ -v for slsMultiReciever and slsFramesynchronizer (in 10, could be done properly, got rid of unnecessary break after an exit in multireceiverapp, removed outdated f: command line option in slsReceiver used previously for config files, updated version print out to print binary in slsReceiver version command 2025-03-20 13:33:04 +01:00
7 changed files with 82 additions and 55 deletions

View File

@ -1,4 +1,4 @@
SLS Detector Package Minor Release 9.1.0 released on 15.03.2025 SLS Detector Package Minor Release 9.1.0 released on 28.03.2025
=============================================================== ===============================================================
This document describes the differences between v9.1.0 and v9.0.0 This document describes the differences between v9.1.0 and v9.0.0
@ -109,6 +109,14 @@ This document describes the differences between v9.1.0 and v9.0.0
* Removed potentially unsafe str().c_str() calls. * Removed potentially unsafe str().c_str() calls.
* slsMultiReceiver Ctrl + C
Now cleans up properly upon Ctrl + C, including exiting the Arping thread.
* slsMultiReceiver version
--version or -v now gives the version of slsMultiReceiver.
ZMQ ZMQ
--- ---

View File

@ -6,3 +6,9 @@ python:
- 3.12 - 3.12
- 3.13 - 3.13
c_stdlib:
- sysroot # [linux]
c_stdlib_version: # [linux]
- 2.17 # [linux]

View File

@ -15,36 +15,19 @@ build:
requirements: requirements:
build: build:
- {{ compiler('c') }} - {{ compiler('c') }}
- {{stdlib('c')}}
- {{compiler('cxx')}} - {{compiler('cxx')}}
- cmake - cmake<=3.28
- ninja
- qt 5.* - qt 5.*
- xorg-libx11
- xorg-libice
- xorg-libxext
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- expat
host: host:
- libstdcxx-ng - libstdcxx-ng
- libgcc-ng - libgcc-ng
- xorg-libx11 - libgl-devel
- xorg-libice - libtiff
- xorg-libxext - zlib
- xorg-libsm
- xorg-libxau
- xorg-libxrender
- xorg-libxfixes
- expat
run: run:
- libstdcxx-ng - libstdcxx-ng
- libgcc-ng - libgcc-ng
@ -123,3 +106,4 @@ outputs:
run: run:
- {{ pin_subpackage('slsdetlib', exact=True) }} - {{ pin_subpackage('slsdetlib', exact=True) }}
- expat - expat

View File

@ -10,6 +10,7 @@
#include "sls/container_utils.h" #include "sls/container_utils.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "sls/versionAPI.h"
#include <csignal> //SIGINT #include <csignal> //SIGINT
#include <cstdio> #include <cstdio>
@ -92,7 +93,9 @@ void cleanup() {
std::string getHelpMessage() { std::string getHelpMessage() {
std::ostringstream os; std::ostringstream os;
os << "\nUsage:\n" os << "\nUsage:\n"
"./slsFrameSynchronizer [start tcp port] [num recevers] [print " << "./slsFrameSynchronizer --version or -v\n"
<< "\t - Gets the slsFrameSynchronizer version\n\n"
<< "./slsFrameSynchronizer [start tcp port] [num recevers] [print "
"callback headers (optional)]\n" "callback headers (optional)]\n"
<< "\t - tcp port has to be non-zero and 16 bit\n" << "\t - tcp port has to be non-zero and 16 bit\n"
<< "\t - print callback headers option is 0 (disabled) by default\n"; << "\t - print callback headers option is 0 (disabled) by default\n";
@ -506,6 +509,16 @@ void GetDataCallback(slsDetectorDefs::sls_receiver_header &header,
*/ */
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
// version
if (argc == 2) {
std::string sargv1 = std::string(argv[1]);
if (sargv1 == "--version" || sargv1 == "-v") {
std::cout << "slsFrameSynchronizer Version: " << APIRECEIVER
<< std::endl;
exit(EXIT_SUCCESS);
}
}
/** - set default values */ /** - set default values */
int numReceivers = 1; int numReceivers = 1;
uint16_t startTCPPort = DEFAULT_TCP_RX_PORTNO; uint16_t startTCPPort = DEFAULT_TCP_RX_PORTNO;

View File

@ -7,6 +7,7 @@
#include "sls/container_utils.h" #include "sls/container_utils.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "sls/versionAPI.h"
#include <csignal> //SIGINT #include <csignal> //SIGINT
#include <cstring> #include <cstring>
@ -39,7 +40,9 @@ void sigInterruptHandler(int p) { sem_post(&semaphore); }
*/ */
std::string getHelpMessage() { std::string getHelpMessage() {
std::ostringstream os; std::ostringstream os;
os << "\nUsage:\n" os << "\nUsage:\n\n"
<< "./slsMultiReceiver --version or -v\n"
<< "\t - Gets the slsMultiReceiver version\n\n"
<< "./slsMultiReceiver [start tcp port] [num recevers] [call back " << "./slsMultiReceiver [start tcp port] [num recevers] [call back "
"option (optional)]\n" "option (optional)]\n"
<< "\t - tcp port has to be non-zero and 16 bit\n" << "\t - tcp port has to be non-zero and 16 bit\n"
@ -160,6 +163,16 @@ void GetData(slsDetectorDefs::sls_receiver_header &header,
*/ */
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
// version
if (argc == 2) {
std::string sargv1 = std::string(argv[1]);
if (sargv1 == "--version" || sargv1 == "-v") {
std::cout << "slsMultiReceiver Version: " << APIRECEIVER
<< std::endl;
exit(EXIT_SUCCESS);
}
}
/** - set default values */ /** - set default values */
int numReceivers = 1; int numReceivers = 1;
uint16_t startTCPPort = DEFAULT_TCP_RX_PORTNO; uint16_t startTCPPort = DEFAULT_TCP_RX_PORTNO;
@ -242,40 +255,43 @@ int main(int argc, char *argv[]) {
else if (pid == 0) { else if (pid == 0) {
cprintf(BLUE, "Child process %d [ Tid: %ld ]\n", i, (long)gettid()); cprintf(BLUE, "Child process %d [ Tid: %ld ]\n", i, (long)gettid());
std::unique_ptr<sls::Receiver> receiver = nullptr;
try { try {
receiver = sls::make_unique<sls::Receiver>(startTCPPort + i); uint16_t port = startTCPPort + i;
sls::Receiver receiver(port);
/** - register callbacks. remember to set file write enable
* to 0 (using the client) if we should not write files and you
* will write data using the callbacks */
if (withCallback) {
/** - Call back for start acquisition */
cprintf(BLUE, "Registering StartAcq()\n");
receiver.registerCallBackStartAcquisition(StartAcq,
nullptr);
/** - Call back for acquisition finished */
cprintf(BLUE, "Registering AcquisitionFinished()\n");
receiver.registerCallBackAcquisitionFinished(
AcquisitionFinished, nullptr);
/* - Call back for raw data */
cprintf(BLUE, "Registering GetData() \n");
receiver.registerCallBackRawDataReady(GetData, nullptr);
}
/** - as long as no Ctrl+C */
sem_wait(&semaphore);
sem_destroy(&semaphore);
} catch (...) { } catch (...) {
LOG(sls::logINFOBLUE) LOG(sls::logINFOBLUE)
<< "Exiting Child Process [ Tid: " << gettid() << " ]"; << "Exiting Child Process [ Tid: " << gettid() << " ]";
throw; throw;
} }
/** - register callbacks. remember to set file write enable to 0
* (using the client) if we should not write files and you will
* write data using the callbacks */
if (withCallback) {
/** - Call back for start acquisition */
cprintf(BLUE, "Registering StartAcq()\n");
receiver->registerCallBackStartAcquisition(StartAcq, nullptr);
/** - Call back for acquisition finished */
cprintf(BLUE, "Registering AcquisitionFinished()\n");
receiver->registerCallBackAcquisitionFinished(
AcquisitionFinished, nullptr);
/* - Call back for raw data */
cprintf(BLUE, "Registering GetData() \n");
receiver->registerCallBackRawDataReady(GetData, nullptr);
}
/** - as long as no Ctrl+C */
sem_wait(&semaphore);
sem_destroy(&semaphore);
cprintf(BLUE, "Exiting Child Process [ Tid: %ld ]\n", cprintf(BLUE, "Exiting Child Process [ Tid: %ld ]\n",
(long)gettid()); (long)gettid());
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
break;
} }
} }

View File

@ -62,7 +62,7 @@ Receiver::Receiver(int argc, char *argv[]) : tcpipInterface(nullptr) {
"\t started with privileges. \n\n"; "\t started with privileges. \n\n";
while (c != -1) { while (c != -1) {
c = getopt_long(argc, argv, "hvf:t:u:", long_options, &option_index); c = getopt_long(argc, argv, "hvt:u:", long_options, &option_index);
// Detect the end of the options. // Detect the end of the options.
if (c == -1) if (c == -1)
@ -87,7 +87,7 @@ Receiver::Receiver(int argc, char *argv[]) : tcpipInterface(nullptr) {
break; break;
case 'v': case 'v':
std::cout << "SLS Receiver Version: " << APIRECEIVER << std::endl; std::cout << "slsReceiver Version: " << APIRECEIVER << std::endl;
LOG(logINFOBLUE) << "Exiting [ Tid: " << gettid() << " ]"; LOG(logINFOBLUE) << "Exiting [ Tid: " << gettid() << " ]";
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);

View File

@ -8,6 +8,6 @@
#define APICTB "9.1.0 0x250204" #define APICTB "9.1.0 0x250204"
#define APIXILINXCTB "9.1.0 0x250204" #define APIXILINXCTB "9.1.0 0x250204"
#define APIMYTHEN3 "9.1.0 0x250304" #define APIMYTHEN3 "9.1.0 0x250304"
#define APILIB "9.1.0 0x250311"
#define APIRECEIVER "9.1.0 0x250311"
#define APIJUNGFRAU "9.1.0 0x250318" #define APIJUNGFRAU "9.1.0 0x250318"
#define APILIB "9.1.0 0x250325"
#define APIRECEIVER "9.1.0 0x250325"