User manual
Section 7: Buffer: Data Storage and Retrieval Series 3700 System Switch/Multimeter Reference Manual
7-8 3700S-901-01 Rev. C / July 2008
Data store (buffer) commands
The following commands are associated with data store operation:
dmm.makebuffer() (on page 7-8)
dmm.savebuffer() (on page 7-10)
To delete a dynamically allocated buffer, use the command mybuffer = nil.
Command
Description
dmm.buffer.catalog()
An iterator that can act on all reading buffer names in
the system.
dmm.buffer.info("buffer
name")
Returns the number of stored readings in the specified
buffer, along with the overall buffer capacity. The first
returned value is the stored readings number, while the
second is the capacity.
dmm.buffer.maxcapacity
Returns the overall maximum storage capacity of all
reading buffers in the system.
dmm.buffer.usedcapacity
Returns the sum storage capacity allocated for all
currently created reading buffers in the system.
To see the current storage number and capacity of all reading buffers in the
system, use the following at a Test Script Processor (TSP
TM
) prompt or in a
script:
for n in dmm.buffer.catalog() do stored, cap =
dmm.buffer.info(n) print(n, 'stored = ' .. stored,
'capacity = ' .. cap) end
Sample output
buf1
stored = 0
capacity = 1000
buf2
stored = 0
capacity = 2000
buf4
stored = 0
capacity = 4000
buf5
stored = 0
capacity = 5000
buf3
stored = 0
capacity = 3000
As the sample output shows, the system has five reading buffers, but currently
none of them have data stored in them (stored = 0). The storage capacity of
the buffers range from 1000 to 5000. If you send:
print(dmm.buffer.usedcapacity)
The output is 1.500000000e+004.
Overall, the system is allocating 15000 of its max storage capacity for reading
buffers.