7: TSP command reference Series 2600B System SourceMeter® Instrument
7-50 2600BS-901-01 Rev. C / August 2016
Example
dataqueue.add(10)
dataqueue.add(11, 2)
result = dataqueue.add(12, 3)
if result == false then
print("Failed to add 12 to the dataqueue")
end
print("The dataqueue contains:")
while dataqueue.count > 0 do
print(dataqueue.next())
Clear the data queue.
Each line adds one item to the data queue.
Output:
The dataqueue contains:
1.00000e+01
1.10000e+01
1.20000e+01
Also see
dataqueue.CAPACITY (on page 7-50)
dataqueue.clear() (on page 7-51)
dataqueue.count (on page 7-51)
dataqueue.next() (on page 7-52)
dataqueue.CAPACITY
This constant is the maximum number of entries that you can store in the data queue.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
count = dataqueue.CAPACITY
The variable that is assigned the value of dataqueue.CAPACITY
Details
This constant always returns the maximum number of entries that can be stored in the data queue.
Example
MaxCount = dataqueue.CAPACITY
while dataqueue.count < MaxCount do
dataqueue.add(1)
end
print("There are " .. dataqueue.count
.. " items in the data queue")
This example fills the data queue until it is full
and prints the number of items in the queue.
Output:
There are 128 items in the data
queue
Also see
dataqueue.add() (on page 7-49)
dataqueue.clear() (on page 7-51)
dataqueue.count (on page 7-51)
dataqueue.next() (on page 7-52)