mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-01 17:11:17 +01:00
Dev/rx callbacks (#966)
* changed rxr callback signatures to all include structs * removed datamodify call back as size can be changed in the original data call back now * bringing some parameters (set functions) to dataProcessor class for its callback (namely udpport, quad, fliprows, totalframes, jsonheader), resulting in also removing totalframes from 2 other function signatures * updated MultiReceiverApp to reflect the new callback signatures
This commit is contained in:
@@ -54,32 +54,25 @@ std::string ClientInterface::getReceiverVersion() { return APIRECEIVER; }
|
||||
|
||||
/***callback functions***/
|
||||
void ClientInterface::registerCallBackStartAcquisition(
|
||||
int (*func)(const std::string &, const std::string &, uint64_t, size_t,
|
||||
void *),
|
||||
void *arg) {
|
||||
int (*func)(const startCallbackHeader, void *), void *arg) {
|
||||
startAcquisitionCallBack = func;
|
||||
pStartAcquisition = arg;
|
||||
}
|
||||
|
||||
void ClientInterface::registerCallBackAcquisitionFinished(void (*func)(uint64_t,
|
||||
void *),
|
||||
void *arg) {
|
||||
void ClientInterface::registerCallBackAcquisitionFinished(
|
||||
void (*func)(const endCallbackHeader, void *), void *arg) {
|
||||
acquisitionFinishedCallBack = func;
|
||||
pAcquisitionFinished = arg;
|
||||
}
|
||||
|
||||
void ClientInterface::registerCallBackRawDataReady(
|
||||
void (*func)(sls_receiver_header &, char *, size_t, void *), void *arg) {
|
||||
void (*func)(sls_receiver_header &, dataCallbackHeader, char *, size_t &,
|
||||
void *),
|
||||
void *arg) {
|
||||
rawDataReadyCallBack = func;
|
||||
pRawDataReady = arg;
|
||||
}
|
||||
|
||||
void ClientInterface::registerCallBackRawDataModifyReady(
|
||||
void (*func)(sls_receiver_header &, char *, size_t &, void *), void *arg) {
|
||||
rawDataModifyReadyCallBack = func;
|
||||
pRawDataReady = arg;
|
||||
}
|
||||
|
||||
void ClientInterface::startTCPServer() {
|
||||
tcpThreadId = gettid();
|
||||
LOG(logINFOBLUE) << "Created [ TCP server Tid: " << tcpThreadId << "]";
|
||||
@@ -477,9 +470,6 @@ void ClientInterface::setDetectorType(detectorType arg) {
|
||||
if (rawDataReadyCallBack != nullptr)
|
||||
impl()->registerCallBackRawDataReady(rawDataReadyCallBack,
|
||||
pRawDataReady);
|
||||
if (rawDataModifyReadyCallBack != nullptr)
|
||||
impl()->registerCallBackRawDataModifyReady(rawDataModifyReadyCallBack,
|
||||
pRawDataReady);
|
||||
|
||||
impl()->setThreadIds(parentThreadId, tcpThreadId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user