Enqueue Operation - Queue Settings Edit Tab

Enqueue Operation

Use the Enqueue operation to add new elements to the queue. Enable the Enqueue option on the left of the Queue Settings panel.

The Enqueue operation contains the following options:

  • Queue Name or Reference Expression —The queue on which to perform the operation. You can specify the queue by name or by the object reference you receive when you create the queue using the Use Object Reference for the Queue Reference Lifetime option.
  • New Element to Enqueue —The data to insert into the queue. The data can be any type, including a number, string, Boolean, object reference, structured type (container), or arrays of these types. When you dequeue the element you must specify a location with the appropriate type. By default, the queue stores a copy of the data you enqueue. However, when you enable the Store by Reference Instead of by Value option, the enqueue operation stores an object reference to the data value instead. When you dequeue this reference into an object reference variable, you can access the data using the TestStand API PropertyObject interface and the ActiveX/COM Adapter.
  • Insert At —The location where TestStand stores the new queue element. The choices are Front of Queue and Back of Queue.
  • Store by Reference Instead of by Value —Specifies how to store the data you specify in the New Element to Enqueue control. Enable this option when you want to store an object reference to the data. Disable this option when you want to store a copy of the data.
  • If the Queue is Full —The action to use when the queue is full. The available options are Wait, Discard Front Element, Discard Back Element, and Do Not Enqueue. If you select Wait, the thread blocks until the queue is no longer full. All other options return immediately.
  • Timeout Enabled, Timeout Expression, Timeout Causes Run-Time Error —The timeout behavior TestStand uses when the queue is full. The timeout applies only if you specify the Wait option for the If the Queue is Full setting. If a timeout occurs, the Step.Result.TimeoutOccurred property is set to True .

See Also

PropertyObject