Starting and stopping a measurement, Step 1: call measopen, Step 2: call measconfigure – HP NonStop G-Series User Manual
Page 121
![background image](/manuals/397027/121/background.png)
Creating a Custom Measurement Application
Measure User’s Guide — 520560-003
6 -9
Starting and Stopping a Measurement
Starting and Stopping a Measurement
To start a measurement:
1. Call MEASOPEN and pass it the data file plus a nonzero
write
parameter.
2. Call MEASCONFIGURE and pass it the data file number returned by MEASOPEN
plus the location of the configuration table.
3. Call MEASCONTROL and pass it the measurement number returned by
MEASCONFIGURE plus a specific start time and (optionally) a stop time.
4. If you will read data only from active counters, call MEASCLOSE to close the data
file and delete the MEASFH process to release resources held by MEASFH.
Step 1: Call MEASOPEN
When you call MEASOPEN, you must pass it the data file name and a nonzero
write
parameter. Specifying read access when you make this call lets you later read from the
data file without calling MEASOPEN again.
MEASOPEN creates a MEASFH process and sends it the data file name. If the file
exists, MEASFH initializes the file. Any existing data in the file is deleted. If the data file
does not exist, MEASFH creates it.
An existing file passed to the MEASOPEN procedure can be a local tape file or an
unstructured local disk file with a file code of 175. (For data analysis, the data file can
be local or remote, but it must be a disk file.) If MEASOPEN creates the data file, it
creates an unstructured disk file, code 175, with a primary extent size of 30 pages and
a secondary extent size of 30 pages. Maximum extent size for the data file is set to
256, which gives a maximum file size of 15 megabytes. If you need a file larger than 15
megabytes, create the file yourself before you start the measurement.
When you call MEASOPEN to start a measurement on an existing file, the file cannot
be already open from a previous MEASOPEN call. If it is, MEASOPEN returns error
ERR^FILEINUSE (code 3255). Call MEASCLOSE to close the file, then try to start the
measurement again.
To specify a volume for MEASFH swap files other than the volume on which the data
file resides, use the MEASOPEN option SWAPVOL. SWAPVOL is an array that
contains the name of the volume for MEASFH to use for swap files when processing
the data file.
Step 2: Call MEASCONFIGURE
You must call MEASCONFIGURE and pass it the data file number returned by
MEASOPEN and the location of the configuration table.
MEASCONFIGURE passes the configuration table to MEASFH. MEASFH validates
the format of the table and writes a copy of it to the data file.