mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 23:37:14 +02:00
fixed time interval in receiveR
This commit is contained in:
@ -77,6 +77,7 @@ void UDPBaseImplementation::initializeMembers(){
|
||||
//***acquisition parameters***
|
||||
shortFrameEnable = -1;
|
||||
frameToGuiFrequency = 0;
|
||||
frameToGuiTimerinMS = DEFAULT_STREAMING_TIMER;
|
||||
dataStreamEnable = false;
|
||||
}
|
||||
|
||||
@ -176,6 +177,8 @@ int UDPBaseImplementation::getShortFrameEnable() const{ FILE_LOG(logDEBUG) << __
|
||||
|
||||
uint32_t UDPBaseImplementation::getFrameToGuiFrequency() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return frameToGuiFrequency;}
|
||||
|
||||
uint32_t UDPBaseImplementation::getFrameToGuiTimer() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return frameToGuiTimerinMS;}
|
||||
|
||||
uint32_t UDPBaseImplementation::getDataStreamEnable() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return dataStreamEnable;}
|
||||
|
||||
uint64_t UDPBaseImplementation::getAcquisitionPeriod() const{ FILE_LOG(logDEBUG) << __AT__ << " starting"; return acquisitionPeriod;}
|
||||
@ -328,6 +331,13 @@ int UDPBaseImplementation::setFrameToGuiFrequency(const uint32_t freq){
|
||||
return OK;
|
||||
}
|
||||
|
||||
void UDPBaseImplementation::setFrameToGuiTimer(const uint32_t time_in_ms){
|
||||
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||
|
||||
frameToGuiTimerinMS = time_in_ms;
|
||||
FILE_LOG(logINFO) << "Frame To Gui Timer:" << frameToGuiTimerinMS;
|
||||
}
|
||||
|
||||
|
||||
uint32_t UDPBaseImplementation::setDataStreamEnable(const uint32_t enable){
|
||||
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||
|
@ -1814,7 +1814,7 @@ void UDPStandardImplementation::startDataCallback(){
|
||||
cprintf(BLUE,"%d Elapsed time:%f seconds\n",ithread,( end.tv_sec - begin.tv_sec ) + ( end.tv_nsec - begin.tv_nsec ) / 1000000000.0);
|
||||
#endif
|
||||
//still less than 250 ms, keep waiting
|
||||
if((( end.tv_sec - begin.tv_sec ) + ( end.tv_nsec - begin.tv_nsec ) / 1000000000.0) < 0.5)/**fixed 250 ms*/
|
||||
if((( end.tv_sec - begin.tv_sec ) + ( end.tv_nsec - begin.tv_nsec ) / 1000000000.0) < (frameToGuiTimerinMS/1000))
|
||||
continue;
|
||||
//done with timer, look into data
|
||||
randomSendNow = true;
|
||||
|
@ -2177,9 +2177,9 @@ int slsReceiverTCPIPInterface::set_read_receiver_timer(){
|
||||
}
|
||||
else{
|
||||
if(index >= 0 ){
|
||||
receiverBase->setDataStreamTimer(index);
|
||||
receiverBase->setFrameToGuiTimer(index);
|
||||
}
|
||||
retval=receiverBase->getDataStreamTimer();
|
||||
retval=receiverBase->getFrameToGuiTimer();
|
||||
if(index>=0 && retval!=index){
|
||||
strcpy(mess,"Could not set datastream timer");
|
||||
cprintf(RED,"%s\n",mess);
|
||||
|
Reference in New Issue
Block a user