User manual

Series 3700 System Switch/Multimeter Reference Manual Section 13: Instrument Control Library (ICL)
3700S-901-01 Rev. C / July 2008 13-85
dataqueue functions and attributes
Use the dataqueue commands to share data between test scripts running in
parallel, and to access data from a remote group or a local node on a TSP-Link
network at any time. You can access data from the data queue even if a remote
group or a node has overlapped operations in process.
dataqueue.add()
Function
Store an item of data in the data queue.
Usage
success = dataqueue.add(value[, timeout])
value: The data item to add.
timeout: Maximum amount of time in seconds to wait for room in the queue if it is full.
success: Success indication.
Remarks
This function will add one entry to the data queue. If the queue is full, this function will
wait up to timeout seconds for room to be made available. This function will return
true if the value was added to the data queue. It will return false if the queue is full and
the item could not be added before the timeout expires.
The timeout value may only be specified when called from the local node. If a timeout
value is not given, the function will not wait for room in the queue if it is full.
NOTE If value is a table, this function will make a deep copy of it rather than
storing a reference to it. This will make a complete copy of all entries within
the table, including all nested tables.
dataqueue.CAPACITY
Attribute
The maximum number of entries the data queue can hold.
Usage
capacity = dataqueue.CAPACITY
capacity: Maximum number of entries in the data queue.
Remarks
This constant indicates the maximum number of values that can be stored in the data
queue.
dataqueue.clear()
Function
Clear the data queue.
Usage
dataqueue.clear()
Remarks
This function will remove all entries from the data queue. If any nodes are waiting to
add data to the queue, this method will force them to fail as if they timed out.