Manually sets the timeout for LJM's stream data collection. Writing to this configuration sets LJM_STREAM_RECEIVE_TIMEOUT_MODE to LJM_STREAM_RECEIVE_TIMEOUT_MODE_MANUAL.
Writing a non-zero value to LJM_STREAM_RECEIVE_TIMEOUT_MS will manually set the timeout for LJM stream data collection. Note that using LJM_STREAM_RECEIVE_TIMEOUT_MODE of LJM_STREAM_RECEIVE_TIMEOUT_MODE_CALCULATED is almost always better than using manual non-zero LJM_STREAM_RECEIVE_TIMEOUT_MS value.
Writing a value of 0 to LJM_STREAM_RECEIVE_TIMEOUT_MS will set an infinite timeout for LJM stream data collection. An infinite timeout should only be necessary for externally clocked or triggered stream modes where the necessary clock/trigger may not occur within a normal milliseconds long timeout period. Note that LJM will still configure a short, internal socket or pipe timeout setting to avoid deadlock conditions. Stream data collection will (attempt to) continue if a socket timeout occurs while LJM_STREAM_RECEIVE_TIMEOUT_MS is set to a value of 0.
The constant LJM_STREAM_RECEIVE_TIMEOUT_MS can be used interchangeably with the string "LJM_STREAM_RECEIVE_TIMEOUT_MS".
Default
The default timeout is 20000 ms.
Remarks
LJM_STREAM_RECEIVE_TIMEOUT_MS does not affect currently running or already initialized streams.
Relevant Functions
To read LJM_STREAM_RECEIVE_TIMEOUT_MS, use LJM_ReadLibraryConfigS.
To write LJM_STREAM_RECEIVE_TIMEOUT_MS, use LJM_WriteLibraryConfigS or LJM_LoadConfigurationFile.
LJM_STREAM_RECEIVE_TIMEOUT_MS affects the behavior of LJM_eStreamRead.
Example
Set the LJM_STREAM_RECEIVE_TIMEOUT_MS mode to 5 seconds.
char ErrorString[LJM_MAX_NAME_SIZE];
int LJMError = 0;
LJMError = LJM_WriteLibraryConfigS(
LJM_STREAM_RECEIVE_TIMEOUT_MS,
5000
);
if (LJMError != LJME_NOERROR) {
LJM_ErrorToString(LJMError, ErrorString);
printf("LJM_WriteLibraryConfigS error: %s\n", ErrorString);
}
For more LJM configurations, see Library Configuration Functions.