mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
client: moved shortenable to roi in reciever, roi not yet written in master file
This commit is contained in:
@ -197,3 +197,21 @@ int receiverInterface::executeFunction(int fnum,char mess[]){
|
||||
}
|
||||
|
||||
|
||||
|
||||
int receiverInterface::sendROI(int fnum, int n, slsReceiverDefs::ROI roiLimits[]) {
|
||||
int ret = slsDetectorDefs::FAIL;
|
||||
char mess[MAX_STR_LENGTH];
|
||||
memset(mess, 0, MAX_STR_LENGTH);
|
||||
|
||||
dataSocket->SendDataOnly(&fnum,sizeof(fnum));
|
||||
dataSocket->SendDataOnly(&n,sizeof(n));
|
||||
dataSocket->SendDataOnly(roiLimits,n * sizeof(slsReceiverDefs::ROI));
|
||||
dataSocket->ReceiveDataOnly(&ret,sizeof(ret));
|
||||
if (ret==slsDetectorDefs::FAIL){
|
||||
dataSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
cprintf(RED, "Receiver returned error: %s", mess);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -131,6 +131,15 @@ public:
|
||||
*/
|
||||
int executeFunction(int fnum,char mess[]);
|
||||
|
||||
/**
|
||||
* Send an integer to receiver
|
||||
* @param fnum function enum to determine what parameter
|
||||
* @param n number of ROIs to send
|
||||
* @param roiLimits ROI structure
|
||||
* \returns success of operation
|
||||
*/
|
||||
int sendROI(int fnum, int n, slsReceiverDefs::ROI roiLimits[]);
|
||||
|
||||
//here one should implement the funcs listed in
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user