Design: 05.02/P07
This is an abstract, language-independent design. Grim
details may be found in the
corresponding source code.
You may return to the
documentation
for the module containing this program design, or to the
entire hierarchical table of
topics covered by the PVT.
PROGRAM 7: Deferral mode BNIG
CHARACTERISTICS: ynnn
OPERATOR SCRIPT: passive test.
DESIGN:
if (there is a non-primary workst with INPUT capabilities) then
set inwk = non-primary
else
if (primary workstation has INPUT capabilities) then
informative msg: using local input to test BNIG
inwk = primary
else
informative msg: cannot test BNIG; no input available
goto done
endif
endif
picture change categories are numbered from 1 to 17:
workstation changes : 1 to 12
structure changes : 13 to 17
set pcctab to names of picture change categories
invoke PICENV to set up standard picture environment
<set display update state> BNIG, NIVE
<inquire number of available logical input devices> for inwk
inclas = input class for which a device is available
ct = 0
for pcc = 1 to 17 = picture change category
pcclbl = pcctab(pcc)
for instat = underway, inactive
<redraw all structures>/COND to make state of visual
representation = CORRECT
if (instat = underway) then
activate input:
ct = ct + 1
if (ct mod 2 = 0) then
inmode = SAMPLE
else
inmode = EVENT
endif
vary order of operation:
if (ct mod 3 = 0) then
invoke PICCHG for category = pcc
set mode of input device #1 on inwk of class = inclas to inmode
else
set mode of input device #1 on inwk of class = inclas to inmode
invoke PICCHG for category = pcc
endif
if (PICCHG reports failure) then
informative message: skipping test
goto skip_pcc_act
endif
TEST: #SR 3 4 13 30 32
"A picture change of category " + pcclbl +
" performed under mode [BNIG, NIVE] when input is
underway should leave the state of visual
representation CORRECT."
pass/fail depending on (current_SVR = CORRECT)
skip_pcc_act:
deactivate global input:
set mode of input device #1 on inwk of class = inclas to REQUEST
else (input is inactive)
invoke PICCHG for category = pcc
if (PICCHG reports failure) then
informative message: skipping test
goto skip_pcc_inact
endif
TEST: #SR 3 4 13 15 32
"A picture change of category " + pcclbl +
" performed under mode [BNIG, NIVE] when input is
inactive should leave the state of visual
representation DEFERRED or CORRECT."
pass/fail depending on (current_SVR = DEFERRED or CORRECT)
skip_pcc_inact:
endif
next instat
next pcc
ct = 0
for modmd = UWOR,UQUM
set modlbl = string for modmd
for sevrty = IRG,CBS,IMM
set sevlbl = string for sevrty
for oldsvr = DEFERRED,SIMULATED,CORRECT
set oldlbl = string for oldsvr
cndlbl = "update mode = [BNIG, " + modlbl + "],
picture change severity = " + sevlbl + ",
old state of visual representation = " + oldlbl
for instat = underway, inactive
attempt to set SVR to oldsvr
<set display update state> BNIG, modmd
if (current_SVR not= oldsvr)
informative message: skipping test
goto skip_oldsvr
endif
if (instat = underway) then
ct = ct + 1
if (ct mod 2 = 0) then
inmode = SAMPLE
else
inmode = EVENT
endif
vary order of operation:
if (ct mod 3 = 0) then
attempt to perform sevrty-type operation:
invoke PICCHG of type = sevrty
set mode of input device #1 on inwk of class = inclas to inmode
else
set mode of input device #1 on inwk of class = inclas to inmode
attempt to perform sevrty-type operation:
invoke PICCHG of type = sevrty
endif
if (PICCHG reports failure) then
informative message: skipping test
goto skip_sev_und
endif
TEST: #SR 3 4 13 30 32
"If " + cndlbl + ", and input is underway, then
current state of visual representation should be
CORRECT."
pass/fail depending on (current_SVR = CORRECT)
skip_sev_und:
deactivate global input:
set mode of input device #1 on inwk of class = inclas to REQUEST
else (input is inactive)
attempt to perform sevrty-type operation:
invoke PICCHG of type = sevrty
if (PICCHG reports failure) then
informative message: skipping test
goto skip_sev_inact
endif
svrlst = calculate list of expected SVRs, based on
sevrty, defmod, modmd, and oldsvr
set explbl = string for svrlst
TEST: #SR 3 4 13 14 15 32
"If " + cndlbl + ", and input is inactive, then
current state of visual representation should be " +
explbl + "."
pass/fail depending on (svr contained in svrlst)
skip_sev_inact:
endif
next instat
skip_oldsvr:
next oldsvr
next sevrty
next modmd
done:
END PROGRAM 7