dwSensorCamera_readFrameNew with Zero timeout

Software Version
DRIVE OS Linux 5.2.0 and DriveWorks 3.5

Target Operating System
Linux

Hardware Platform
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version
1.4.1.7402

Host Machine Version
native Ubuntu 18.04

Is it possible to use dwSensorCamera_readFrameNew in polling mode, with zero timeout? If I try this, I constantly get “CameraClient: Readframe timeout” errors.

Dear @john.murdoch ,
The timeout parameter indicates maximum amount of time it should wait if frame is not available. Keeping it as ‘0’ would check if any frame available to read immediately else it throws time out. I would expect this error.

Dear @SivaRamaKrishnaNV,

yes, I expect that function return status of DW_TIME_OUT, however, it also throws error to dwLogger as DW_LOG_ERROR which would indicate serious error, which timeout should not be.

Dear @john.murdoch ,
I am a bit confused here. Could you print the return value of the dwSensorCamera_readFrameNew() for confirmation.

Dear @SivaRamaKrishnaNV

output from dwSensorCamera_readFrameNew() is:
dwStatus = 20, DW_TIME_OUT

code:

dwStatus status = dwSensorCamera_readFrameNew(&frameHandle, 0, m_Cameras[camIdx].camHandle);
std::cout << "dwStatus = " << status << ", " << dwGetStatusName(status) << std::endl;

but I also get (from dwLogger, dwLogCallback), for every dwSensorCamera_readFrameNew call:
[23-03-2021 10:12:16]
CameraClient: Readframe timeout

code:

void myLoggerCallback(dwContextHandle_t context, dwLoggerVerbosity type, const char* msg)
{
std::cout << msg << std::endl;
}

I can disable dwLogger, but in that case I’ll miss some other errors.

Dear @john.murdoch,
The timeout error from dwSensorCamera_readFrameNew() will cause
CameraClient: Readframe timeout in SIPL lib calls internally. Hence you notice this in dwLogger. I hope it is clear now.