Click or drag to resize

ListAPITryWaitForProgress Method

Waits up to timeout for a Progress Event to be reported from the card.

Namespace: RAYLASE.SPICE3.ClientLib
Assembly: RAYLASE.SPICE3.ClientLib (in RAYLASE.SPICE3.ClientLib.dll) Version: 3.4.1
Syntax
C#
public bool TryWaitForProgress(
	out int? progressID,
	int? timeout = null
)

Parameters

progressID  NullableInt32
The last progressID that was received.

This will be a value originally specified as the parameter of CommandListAppendProgress(Int32).

timeout  NullableInt32  (Optional)
null
(or omitted)
use the default timeout period specified by ClientAPITimeout
  -1wait indefinitely for the event
   0do not wait, simply check if an event has already been reported
 > 0timeout period in ms

Return Value

Boolean
trueif an event is reported within the specified timeout period,
falseotherwise.
Exceptions
Remarks
  • Note that in case of a timeout this function will always return false.

    See WaitForProgress(NullableInt32, NullableInt32) if you wish to wait for a TimeoutException instead.

  • Waiting can be interrupted by calling InterruptWaitForProgress.

    Doing so will cause a ThreadInterruptedException.

  • Like all methods which involve communication with the card, this method is not thread-safe.
  • A progress event occurs when a PROGRESS_ID command within a list is executed by the firmware.
  • Note in particular that there is limit to the rate at which the card can report successive progress events: beyond this limit, excess events will simply be discarded.

    If your application inserts very many PROGRESS_ID s into its lists, it may not be able to rely on the occurrence of every single progress event in the sequence.

See Also