Listener.WaitForNotification Method

Definition

Namespace: P1.CameraSdk

Block the thread and wait for the next notification to arrive

public NotificationEvent? WaitForNotification(uint timeoutMs = 0);

This method is used to process incoming notifications. A received notification is returned this this method, as soon as it arrives. Only notifications that you have enabled will arrive.

You can define a timeout, where the method should return and let you thread do other work.seealso If a timeout occurs, or another thread has called WakeUpWaitingThread, this method return null.

Parameters:

timeoutMs

Optional: Provide a timeout in milliseconds.seealso Zero is no timeout.

SdkException

an error-code inside if something goes wrong

Returns:

A received notification or null if timed out.

See also:

EnableNotification(Camera, UInt32, bool), WakeUpWaitingThread