HP NonStop G-Series User Manual
Page 124

Creating a Custom Measurement Application
Measure User’s Guide — 520560-003
6- 12
Step 4: Call MEASCLOSE (Optional)
! Initialize the trailer record.
CONTAB.TRAILER.TYPE := CONTAB^TRAILER^T;
CONTAB.TRAILER.LEN := $LEN(CONTAB.TRAILER);
! Start the measurement. First open the data file with
! MEASOPEN: request both read and write access and
! specify an alternate volume for MEASFH swap files.
! Next, call MEASCONFIGURE to pass CONTAB. Finally,
! call MEASCONTROL and pass it the current time in
! starttime.
MEASCB.FIRSTWORD ':=' -1 & MEASCB.FIRSTWORD FOR
(WLEN(MEASCB) - 1);
IF ERROR := MEASOPEN(DFNAME,DFNUM,TRUE,TRUE,SWAPVOL)
THEN ... ! handle error
IF ERROR := MEASCONFIGURE(MEASCB,DFNUM,MEASNUM,CONTAB)
THEN ... ! handle error
IF ERROR := MEASCONTROL(MEASCB,MEASNUM,
CONVERTTIMESTAMP(JULIANTIMESTAMP,0))
THEN ... ! handle error
.
.
.
! Stop the measurement. Call MEASCONTROL and pass it
! a -1 in starttime and the current time in stoptime.
IF ERROR := MEASCONTROL(MEASCB, MEASNUM, -1F,
CONVERTTIMESTAMP(JULIANTIMESTAMP,0))
THEN... ! handle error
Example 6-2. Starting and Stopping a Measurement (page 2 of 2)