##########################                                            ##-#
#                                                                     ##-#
# Assembled by checkpoint, 1.18.2 (23-Sep-99).                        ##-#
# (EDIT THE ORIGINAL SOURCE, NOT THIS FILE!)                          ##-#
# Date-assembled: Thu Apr  8 12:23:15 EDT 2010                        ##-#
# Orig-source: /mdisw/cfl/flight/src/dummy_test_v01.src               ##-#
#                                                                     ##-#
##########################                                            ##-#
# File: dummy_test.src
# Created:  16-Apr-96 by M.Morrison
#
#	Created for testing command link and DELAYED commanding capability
#       
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "/mdisw/cfl/flight/src/q_dummy_test_v01.src"
descr "q_dummy_test - Perform 50 dummy commands"
                                                                      ##-#
#=#=#=#=#=#=#=#=#=#=# src ln 11.  (Open Log file)                     ##-#
if !GS9 = "" then                                                     ##-#
  display "Opening logfile from q_dummy_test_v01"                     ##-#
  perf openlog                                                        ##-#
end if                                                                ##-#
write !GS9 "%s q_dummy_test_v01:" !TIME                               ##-#
writen !GS9 "Starting..."                                             ##-#
#=#=#=#=#=#=#=#=#=#=#+ src ln 11.  Block 0  Next line is #27          ##-#
 display "Running block 0 of q_dummy_test_v01."                       ##-#
set !LI0 = getint(mktccnt)                                            ##-#
queue on ## Queue next 19 commands.                                   ##-#
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy

tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
queue off ## Synchronize w/ POCC                                      ##-#
tcb mbdummy
#=#=#=#=#=#=#=#=#=#=#- src ln 32.  Block 0   Cmds:20   Total:20       ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 20                                                  ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "CMD CT ERR in block 0. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 20 cmds; expected cmd ctr: %d)" !LI1       ##-#
 writen !GS9  "      Halted.  (restart at line 27)"                   ##-#
 display "ERR: q_dummy_test_v01 blk 0: cmd ctr isnt %d. (CONT 27)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Override.  Continuing past block 0..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Block 0 completed OK."                                 ##-#
display "Completed block 0 of q_dummy_test_v01."                      ##-#
end if                                                                ##-#
#################### END of BLOCK 0 ####################              ##-#
#=#=#=#=#=#=#=#=#=#=#+ src ln 33.  Block 1  Next line is #77          ##-#
 display "Running block 1 of q_dummy_test_v01."                       ##-#
set !LI0 = getint(mktccnt)                                            ##-#
queue on ## Queue next 19 commands.                                   ##-#
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy

tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
queue off ## Synchronize w/ POCC                                      ##-#
tcb mbdummy
#=#=#=#=#=#=#=#=#=#=#- src ln 54.  Block 1   Cmds:20   Total:40       ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 20                                                  ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "CMD CT ERR in block 1. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 20 cmds; expected cmd ctr: %d)" !LI1       ##-#
 writen !GS9  "      Halted.  (restart at line 77)"                   ##-#
 display "ERR: q_dummy_test_v01 blk 1: cmd ctr isnt %d. (CONT 77)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Override.  Continuing past block 1..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Block 1 completed OK."                                 ##-#
display "Completed block 1 of q_dummy_test_v01."                      ##-#
end if                                                                ##-#
#################### END of BLOCK 1 ####################              ##-#
#=#=#=#=#=#=#=#=#=#=#+ src ln 55.  Block 2  Next line is #127         ##-#
 display "Running block 2 of q_dummy_test_v01."                       ##-#
set !LI0 = getint(mktccnt)                                            ##-#
queue on ## Queue next 9 commands.                                    ##-#
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
tcb mbdummy
queue off ## Synchronize w/ POCC                                      ##-#
tcb mbdummy
#=#=#=#=#=#=#=#=#=#=#- src ln 65.  Block 2   Cmds:10   Total:50       ##-#
wait time 8 ## Wait for hk packet                                     ##-#
set !LI2 = !LI0 + 10                                                  ##-#
if !LI2 > 255 then                                                    ##-#
 set !LI1 = !LI2 - 256                                                ##-#
else                                                                  ##-#
 set !LI1 = !LI2                                                      ##-#
end if                                                                ##-#
set !LI2 = getint(mktccnt)                                            ##-#
if !LI1 <> !LI2 then                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "CMD CT ERR in block 2. cmd ctr: %d" !LI2               ##-#
 writen !GS9  "      (Sent 10 cmds; expected cmd ctr: %d)" !LI1       ##-#
 writen !GS9  "      Halted.  (restart at line 127)"                  ##-#
 display "ERR: q_dummy_test_v01 blk 2: cmd ctr isnt %d. (CONT 127)" !LI1##-#
 halt                                                                 ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Override.  Continuing past block 2..."                 ##-#
else                                                                  ##-#
 write !GS9 "%s q_dummy_test_v01:" !TIME                              ##-#
 writen !GS9  "Block 2 completed OK."                                 ##-#
display "Completed block 2 of q_dummy_test_v01."                      ##-#
end if                                                                ##-#
#################### END of BLOCK 2 ####################              ##-#
write !GS9 "%s q_dummy_test_v01:" !TIME                               ##-#
writen !GS9 "Falling off the bottom."                                 ##-#
