/*
*
*      Acceptence Test Procedure Guidance Program   ---  C.DEF Source Code
*
*/

/*
*     source file:   ATP1.DEF
*     written by:    DMY
*
*/

/*
* --->>>  Revision History
*
* $ Revision:   1.0 $
*     $ Date:     April 29, 1991   11:19:06 $
*      $ Log:   c:\st8a\ver\atp1.cv $
*
*     Rev 1.0     April 29, 1991   11:19:06
*  - Initial Revision
*
*/

/*
*     DATA TYPES
*
*  There is a structure for each window that is displayed on the terminal.
*  Not all of the windows runs a test on the ST-8000A.  Some windows require
*  the operator to press a <CR> others require test parameter information.
*  Most windows will either run a test or describe a test.  Those tests that
*  are run by the unit get the results logged automatically.  The tests that
*  require the technician to enter the results are varied.  Some of the
*  input data is Y or N answers, some are levels, and some are frequencies.
*
*  Each window is assigned a 'data type', post window operation index, that
*  guides the program towards the function to perform.  The data types, called
*  instr[].typdata, are listed below with their associatied function.
*
*
*   TYPE                DESCRIPTION
*
*     0.        No test and no data input, just get an <Enter>
*
*     I.        Input a Y or N, y=PASS, n=FAIL
*
*    II.        Run key pad test on the ST-8000A
*
*   III.        Input real number to 1 decimal place
*
*    IV.        Input real number, no decimal places
*
*     V.        Input real number to 1 decimal place
*
*    VI.        Input real number to 2 decimal places
*
*   VII.        Request and read status page from ST-8000A
*
*  VIII.        Transmit and receive QBF across data port
*
*    IX.        Send two <Enter>'s across data port and get Y or N
*
*     X.        Send QBF across data port and input real number
*
*    XI.        Request and read results of BIT from ST-8000A, get Y or N
*
*   XII.        Input test information from technician
*
*
*
*
*    See  ATP1.C  for further program descriptions.
*
*/



int  nbr_instr = 35;            /* # of pages of instructions */

int  (*pfa[13])(int);

struct cmd{			/* structure for each instruction section */
        int     cls;            /* set if to clear screen text */
        int     action;         /* set if to send string to remote port */
        char    *cstr;          /* command string for the remote port */
        int     bline;          /* # of window to backup towards */
	char	*tmsg;          /* from 1 to 25 lines of messages */
        char    *dmsg;          /* data input message */
        int     typdata;        /* data type, I-VII */
        float   datalo;         /* lowest allowed valid data */
        float   datahi;         /* highest allowed valid data */
	};

struct testlog{                 /* type structure for test result logging */
       int     result;          /* 1 = passed, 0 = failed */
       int     typdata;         /* data type from 0-12 */
       float   data1;           /* float data results */
       char    *comnt;          /* if result is 0 then may hold a comment string */
       };


struct testlog   tlog[36];      /* a structure for each {log} step */

char  *keystr[27] = { "\'1\'","\'2\'","\'3\'","\'4\'","M/S","FSK","DIV","AMH","CHAN",
                      "\'5\'","\'6\'","\'7\'","\'8\'","BIT","MARK","MUTE","NORM","BAUD",
                      "ENTER","\'9\'","\'0\'","\'0.5\'","2nd","SPACE","REMOTE","SYNCH","CLEAR"
                    };

int   keycode[27] = { 0x02,0x0a,0x12,0x1a,0x22,0x2a,0x32,0x3a,0x2b,
                      0x01,0x09,0x11,0x19,0x21,0x29,0x31,0x39,0x33,
                      0x00,0x08,0x10,0x18,0x20,0x28,0x30,0x38,0x3b
                    };


struct cmd   instr[35] =
{

{   /*  window # 00 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
00,                             /* # of backup window */
"\r\n"
"\r\n                        ACCEPTANCE TEST PROCEDURES"
"\r\n                                 No. 002\r\n"
"\r\n                                   for\r\n"
"\r\n                           ST-8000A FSK Modem\r\n"
"\r\n              "
"\r\n                  USAF Contract Number F04606-90-D-0941  \r\n"
"\r\n                           CLIN 0005/CDRL D001\r\n"
"\r\n         HAL Communications Corp. Document Number   0794-5D001-002"
"\r\n\n\n\n                 *** ESD HANDLING PROCEDURES REQUIRED ***"
"\r\n\n\n"
"\r\n         Press <Enter>...",
"",                             /* data input msg */
12,                             /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 01 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
0,                              /* # of backup window */
"\r\n\n\n"
"\r\n CONTROL BOARD TEST SETUP\r\n"
"\r\n\n>>>  Use Test Diagram in Figure 1 <<<\r\n"
"\r\n     1.  SW3-2         ON        (Rest OFF)        (9600 Baud) "
"\r\n     2.  SW4-1         ON        (Rest OFF)        (UNIT Address = 01) "
"\r\n     3.  SW2-7         ON        (Rest OFF)        (250ms Mute Delay)"
"\r\n     4.  SW1-2,4       ON        (Rest OFF)        (250ms Mute Delay) "
"\r\n     5.   J7     \"232\" Position                    (Remote type select)"
/*"\r\n     6.   J4       Installed                       (Rem TXD term res)"*/
"\r\n     6.   J4     \"232\" Position                    (Rem TXD term res)"
"\r\n          J8       Installed                       (Rem DTR term res)"
"\r\n     7.   J2     \"232\" Position                    (Data type select)"
/*"\r\n     8.   J6     \"232\" Position                    (RXD clock polarity)"*/
"\r\n     8.   J6     \"NORM\" Position                   (RXD clock polarity)"
"\r\n"
"\r\n\n\n     Press <Enter> when done...",
"",                             /* data input msg */
0,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 02 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
0,                              /* # of backup window */
"\r\n MODEM BOARD  TEST SETUP                   \r\n"
"\r\n     1.   J6       Right Position                  (600 Ohm Terminated)"
"\r\n     2.   J8    \"TONES ON\"  Position               (MUTE Defeated)"
"\r\n     3.  SW1-8          ON           (Rest OFF)    (-42 dBm AMH Threshold)"
"\r\n     4.  SW2-8          ON           (Rest OFF)    (1 sec AMH Delay)"
"\r\n     5.   J9      \"-V\" Position              \r\n"
"\r\n TF 2  TEST SETUP                          \r\n"
"\r\n     1. All SW's      DOWN Position                "
"\r\n     2. RTS Dial      \"EXT\"                  \r\n"
"\r\n TF 1  TEST SETUP                          \r\n"
"\r\n     1. 0 dBm          2. FSK enabled      3. 600 ohm IN & OUT disabled.\r\n"
"\r\n HP-5316B  TEST SETUP                          "
"\r\n     1. Line = ON      2. Gate Time = 9 o'clock    3. Atten =  X1\r\n"
"\r\n HP-400FL  TEST SETUP                          "
"\r\n     1. Line = ON      2. Range = 0 dBm     3. Low Pass Filter = OFF (OUT)"
"\r\n"
"\r\n Press <Enter> when done...",
"",                             /* data input msg */
0,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 03 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
0,                              /* # of backup window */
"\r\n\n\n\n"
"\r\nPOWER ON TESTS\r\n"
"\r\n     KEY "
"\r\nSTEP SEQUENCE                   ACTION"
"\r\n-----------------------------------------------------------------"
"\r\n1.   Power ON                   Turn unit under test (UUT) power"
"\r\n                                ON.  "
"\r\n\n2.   Observe front panel for:   a) all display segments and LED "
"\r\n                                indicators turn ON for 1 second."
"\r\n                                b) all LED indicators turn OFF "
"\r\n                                and HAL model and firmware version"
"\r\n                                notice is  displayed for 1 second."
"\r\n",
"\r\nType Y if a. and b. were observed or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 04 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
3,                              /* # of backup window */
"\r\n\nTEST EEPROM OPERATION                                  "
"\r\n                                                       "
"\r\n3.  MARK                        Selects MARK for input."
"\r\n4.  1000                        Sets Mark display to 1000."
"\r\n5.  ENTER                       MARK display = 1000.0."
"\r\n                                                      "
"\r\n6.  SPACE                       Selects SPACE for input."
"\r\n7.  3000                        Sets SPACE display to 3000."
"\r\n8.  ENTER                       SPACE display = 3000.0."
"\r\n                                                      "
"\r\n9.  BAUD                        Selects BAUD for input."
"\r\n10. 75                          Sets BAUD to 75."
"\r\n11. ENTER                       Stores BAUD rate of 75."
"\r\n                                                      "
"\r\n12. 2ND,  CHAN,  ENTER          Copies setup to other channel."
"\r\n                                                      "
"\r\n13. Cycle power                 Turn POWER switch OFF then ON."
"\r\n                                                      "
"\r\n14. Observe setup               Stored  values will be those  set "
"\r\n                                in step 3 through 12. "
"\r\n",
"\r\nType Y if setup is correct or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 05 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
3,                              /* # of backup window */
"\r\n\n\nTEST DEFAULT RESTORATION                          \r\n"
"\r\n15. Return to defaults          Cycle POWER OFF then ON and push"
"\r\n                                CLEAR key during POST indicator "
"\r\n                                tests. "
"\r\n                                                      "
"\r\n16. Check setup.                Factory default setup is restored?"
"\r\n                                For both channels the default is:"
"\r\n                                     MARK = 1575.0"
"\r\n                                    SPACE = 2425.0"
"\r\n                                     BAUD = 50"
"\r\n                                 MARK LED = ON"
"\r\n                                SPACE LED = ON"
"\r\n                                  FSK LED = ON"
"\r\n                                  AMH LED = ON"
"\r\n                                Other LED = OFF"
"\r\n",
"\r\nType Y if factory defaults are restored or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 06 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
3,                              /* # of backup window */
"5.0  BUILT-IN TESTS (BIT)\r\n"
"\r\n     KEY                "
"\r\nSTEP SEQUENCE                   ACTION"
"\r\n-----------------------------------------------------------------"
"\r\n17.  *C01R1T1<CR>               *CHAN = 1, REMOTE ON, BIT selected."
"\r\n\n18.  Observe Front Panel        During test number 5, all front "
"\r\n                                panel display segments and LEDs "
"\r\n                                turn ON for 2.5 seconds and OFF "
"\r\n                                for 2.0 seconds. "
"\r\n\n19.  *Observe Remote PC         *During test B, two Quick Brown Fox"
"\r\n                                 messages are echoed to Remote PC. "
"\r\n\n20.  Results displayed          This program will monitor the remote"
"\r\n                                BIT text.  Operator should observe"
"\r\n                                the front panel BAUD RATE display."
"\r\n                                The word \"PASS\" will be displayed"
"\r\n                                for four seconds.  "
"\r\n\nPress <Enter> to begin...",
"\r\nType Y if front panel operated correctly, R to repeat or N for failure...",
11,                             /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 07 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
6,                              /* # of backup window */
"\r\n\nTEST FRONT PANEL KEY PAD\r\n"
"\r\n21.  *C01R1T9<CR>               *Accesses BIT menu."
"\r\n22.  *K                         *Selects KEY Test from menu."
"\r\n23.  *Press keys                *Press all 27 front panel keys on "
"\r\n                                 the UUT  and verify echo of key "
"\r\n                                 is displayed on Remote PC.  ",

"\r\n\n24.  *<CR>                      *Exit keypad echo test."
"\r\n25.  *X<CR>                     *Exit BIT menu."
"\r\nWaiting 5 seconds for ST-8000A to Reset.....",
2,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 08 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
6,                              /* # of backup window */
"\r\n\n\n\n\n\n\nTEST REMOTE IN MIL-188"
"\r\n\n26.  Change A2J7                Control Board J7:  MIL-188"
"\r\n\n27.  Change TF2                 Remote  \"MIL/RS\":  MIL-188."
"\r\n\n28.  *G3                        *Dump the status screen at 9,600 "
"\r\n                                 Baud in MIL-188. "
"\r\n\nPress <Enter> when set to MIL-188...",
"",
7,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 09 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
6,                              /* # of backup window */
"\r\n\n\n\n\n\n\n\nRESTORE REMOTE TO RS-232"
"\r\n\n29.  Change A2J7                Control Board J7:  RS-232. "
"\r\n\n30.  Change TF2                 Remote  \"MIL/RS\":  RS-232."
"\r\n\nPress <Enter> when set back to RS-232...",
"",                             /* data input msg */
0,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 10 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"c01r1b30m300s360p1a0\r",       /* command string for remote ST-8000A */
06,                             /* # of backup window */
"\r\n\n\n\n\n"
"\r\nMEASURE MARK FREQUENCY \r\n"
"\r\n     KEY                "
"\r\nSTEP SEQUENCE                   ACTION"
"\r\n-----------------------------------------------------------------"
"\r\n\n31.  *C01R1B30M300S360P1A0<CR>  *Sets both channels to:"
"\r\n                                 BAUD = 30, MARK = 300, SPACE = 360"
"\r\n                                 AMH = OFF "
"\r\n\n32.  Measure frequency          Measure audio output frequency "
"\r\n                                on counter. (300 Hz +/-0.2  Hz) "
"\r\n",
"\r\n\nEnter the FREQUENCY, to 1 decimal places: ",
3,                              /* data type, I-VII */
299.8,                          /* lowest value allowed for data */
300.2                           /* highest value allowed for data */
},

{   /*  window # 11 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nMEASURE STRONGEST HARMONIC"
"\r\n\n33.  Measure harmonics          Measure the level of the harmonics "
"\r\n                                of 300 Hz and record strongest on "
"\r\n                                the data sheet. ( < -40 dBm)"
"\r\n",
"\r\nEnter LEVEL in dBm, use negative: ",
4,                              /* data type, I-VII */
-200.0,                         /* lowest value allowed for data */
-40.000001                      /* highest value allowed for data */
},

{   /*  window # 12 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nMEASURE STRONGEST SPURIOUS OUTPUT"
"\r\n\n34.  Measure spurious outputs   Measure the level of the spurious "
"\r\n                                outputs and record strongest on "
"\r\n                                the data sheet. ( < -60 dBm)"
"\r\n",
"\r\nEnter LEVEL in dBm, use negative: ",
4,                              /* data type, I-VII */
-200.0,                         /* lowest value allowed for data */
-60.00001                       /* highest value allowed for data */
},

{   /*  window # 13 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"c02n1\r",                      /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\nMEASURE REVERSE OUTPUTS"
"\r\n\n35.  *C02N1<CR>                 *Reverse modulator tones."
"\r\n\n36.  Measure tone output        Measure  tone output  on  counter"
"\r\n                                (360 Hz +/-0.2 Hz) and level on"
"\r\n                                ACVM (-1 <= value <= 0 dBm). "
"\r\n",
"\r\nEnter the FREQUENCY read to 1 decimal place: ",
3,                              /* data type, I-VII */
359.8,                          /* lowest value allowed for data */
360.2                           /* highest value allowed for data */
},

{   /*  window # 14 */
0,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"",                             /* no text, data input structure */
"\r\nEnter the LEVEL read in dBm to 1 decimal place: ",
4,                              /* data type, I-VII */
-1.0,                           /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 15 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\nMEASURE LOWEST OUTPUT LEVEL"
"\r\n\n37.  Reduce OUTPUT LEVEL        Change ST-8000A front panel level "
"\r\n                                control full  COUNTER-Clock-Wise."
"\r\n\n38.  Measure tone output        Measure the 360 Hz tone amplitude "
"\r\n                                on the ACVM and record the level"
"\r\n                                on the data sheet. ( < -20 dBm)"
"\r\n",
"\r\nEnter the LEVEL in dBm, use a negative: ",
4,                              /* data type, I-VII */
-200.0,                         /* lowest value allowed for data */
-20.0001                        /* highest value allowed for data */
},

{   /*  window # 16 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nMEASURE HIGHEST OUTPUT LEVEL"
"\r\n\n39.  Return output to full      Change front panel level control "
"\r\n                                full Clock-Wise."
"\r\n\n40.  Measure amplitude          Measure the 360 Hz tone amplitude "
"\r\n                                on the ACVM. (-1 <= value <= 0 dBm)"
"\r\n",
"\r\nEnter the LEVEL in dBm, use negative: ",
5,                              /* data type, I-VII */
-1.0,                           /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 17 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"u1\r",                         /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nMEASURE MUTED OUTPUT"
"\r\n\n41.  *U1<CR>                    *Assert MUTE."
"\r\n\n42.  Measure  output            Measure output level on ACVM."
"\r\n                                ( < -50 dBm) "
"\r\n",
"\r\nEnter LEVEL in dBm, use negative: ",
4,                              /* data type, I-VII */
-200.0,                         /* lowest value allowed for data */
-50.00001                       /* highest value allowed for data */
},

{   /*  window # 18 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"u0e1\r",                       /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nTEST .5 HZ OUTPUT"
"\r\n\n43.  *U0E1<CR>                  *MUTE turns OFF and 0.5 Hz ON."
"\r\n\n44.  Measure output freq.       Measure frequency of output."
"\r\n                                (360.5 Hz +/- .2 Hz) "
"\r\n",
"\r\nEnter FREQUENCY read on counter, 1 decimal place: ",
3,                              /* data type, I-VII */
360.3,                          /* lowest value allowed for data */
360.7                           /* highest value allowed for data */
},

{   /*  window # 19 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"n0c01e1\r",                    /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nMOD & DEMOD AT SLOWEST SPEED"
"\r\n\n45.  *N0C01E1<CR>               *MOD to NORM and DEMOD to 0.5 Hz."
"\r\n\n46.  *Send QBF                  *Set DATA PC to 30 baud and  send "
"\r\n                                 QBF.  (Echo error free.) "
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
-1.0,                           /* neg if qbf speed is 30 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 20 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"p0c01r1b600p1a0\r",            /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\nDEMOD AT -20 dBm INPUT LEVEL"
"\r\n\n47.  *P0C01R1B600P1A0<CR>       *Channels 1 & 2 changed to "
"\r\n                                 BAUD = 600     MARK = 1575"
"\r\n                                 SPACE = 2425   DATA RATE = 600"
"\r\n\n48.  Change TF1                 Set TF1 ATTN:  -20 dBm"
"\r\n\n49.  *Send QBF                  *Send QBF. (Echo error free.)"
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 21 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nDEMOD AT -45 dBm INPUT LEVEL"
"\r\n\n50.  Change TF1                 Set TF1 ATTN:  -45 dBm"
"\r\n\n51.  *Send QBF                  *Send  QBF.  (Echo  error  free.) "
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 22 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\nDEMOD AT +6 dBm INPUT LEVEL"
"\r\n\n52.  Change TF1                 Set TF1 ATTN:  +6 dBm"
"\r\n\n53.  *Send QBF                  *Send  QBF.  (Echo  error  free.) "
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 23 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"c01w5y1\r",                             /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\nTEST MOD REGENERATION"
"\r\n\n54.  Change TF1                 Set TF1 ATTN:  0 dBm"
"\r\n\n55.  *C01W5Y1<CR>               *Set 5 level REGEN mode."
"\r\n56.  *Send QBF                  *Send 5 level/ 600 baud QBF from"
"\r\n                                 Computer. (Echo error free.) "
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
-1.0                            /* negative for 5bits per character */
},

{   /*  window # 24 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"c01y0\r",                      /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\n\n\n\n\n\n\n\n57.  *C01Y0<CR>                 Turn REGEN OFF."
"\r\n\nPress <Enter>...",
"",                             /* data input msg */
0,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 25 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"c02p0c01r1b600p1a0\r",         /* command string for remote ST-8000A */
10,                             /* # of backup window */
"\r\n\n\n\nTEST DATA PORT IN MIL-188\r\n"
"\r\n>>> CHANGE TEST SETUP TO FIGURE 2 <<<\r\n"
"\r\n     KEY                "
"\r\nSTEP SEQUENCE                   ACTION"
"\r\n-----------------------------------------------------------------"
"\r\n\n58.  Change A2J2                Control Board J2:  MIL-188"
"\r\n\n59.  Change TF2                 Set TF2    TX/RX:   MIL-188"
"\r\n                                              RX:   MIL-188"
"\r\n\n60.  *Send QBF                  *Send 8 level 600 baud QBF message. "
"\r\n                                 (Echo error free.)"
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 26 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"n1c02n1\r",                    /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\n\n\n\nTRANSMIT AND RECEIVE USING REVERSED TONES"
"\r\n\n61.  Change A2J2                Control Board J2:  RS-232 "
"\r\n\n62.  Change TF2                 Set TF2    TX/RX:   RS-232 "
"\r\n                                              RX:   RS-232 "
"\r\n\n63.  *N1C02N1<CR>               *Reverse tones on MOD and DEMOD."
"\r\n64.  *Send QBF                  *Send 8 level QBF at 600 baud."
"\r\n                                 (Echo error free.) "
"\r\n\nPress <Enter> when ready for QBF test...",
"",                             /* data input msg */
8,                              /* data type, I-VII */
1.0,                            /* pos if qbf speed is 600 */
1.0                             /* positive for 8bits per character */
},

{   /*  window # 27 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"n0c01n0w0\r",                  /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\n\n\nMEASURE SYNCH TRANSMIT CLOCK"
"\r\n\n65.  *N0C01N0W0<CR>             *Change to NORMAL and SYNCH ON."
"\r\n\n66.  Change TF2                 Set TF2 DATA/REMOTE:  DATA."
"\r\n\n67.  Change TF2                 Set TF2     PROBE A:  TXC."
"\r\n\n68.  Measure clock freq.        Measure transmit clock  frequency "
"\r\n                                on  counter.  (600 Hz +/-0.2  Hz.)"
"\r\n",
"\r\nEnter FREQUENCY read on counter, to 1 decimal place: ",
3,                              /* data type, I-VII */
599.8,                          /* lowest value allowed for data */
600.2                           /* highest value allowed for data */
},

{   /*  window # 28 */
0,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n69.  Observe O-scope            Verify TXC is a stable squarewave"
"\r\n                                on the O-scope. "
"\r\n",
"\r\nEnter Y if squarewave on scope is stable, or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 29 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\nDEMOD TRACKS AT -5% OF BAUD RATE"
"\r\n     "
"\r\n70.  Change TF2                 Set TF2  TX TXD:  INT -> 555"
"\r\n                                        PROBE A:  INTTXC"
"\r\n     "
"\r\n71.  Set TF2 clock              Set TF2   RANGE:  position  3 "
"\r\n                                           RATE:  570 Hz +/-2 Hz"
"\r\n     "
"\r\n72.  Change TF2                 Set TF2 PROBE A:  RXC"
"\r\n                                        PROBE B:  RSRXD"
"\r\n                                  Scope Trigger:  CH 2"
"\r\n     "
"\r\n73.  Observe Mid-bit clock      Compare falling edge of CH1 display"
"\r\n                                to data displayed on CH2. "
"\r\n                                (Falling edges on CH1 occur at "
"\r\n                                 mid-bit of CH2 display)"
"\r\n",
"\r\nEnter Y if falling edge is at mid-bit or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 30 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\n\nDEMOD TRACKS AT +5% OF BAUD RATE"
"\r\n     "
"\r\n74.  Change TF2                 Set TF2 PROBE A:  INTTXC."
"\r\n     "
"\r\n75.  Adjust TF2 clock           Set TF2    RATE:  630 Hz +/-2 Hz."
"\r\n     "
"\r\n76.  Change TF2                 Set TF2 PROBE A:  RXC."
"\r\n                                  Scope Trigger:  CH 2"
"\r\n     "
"\r\n77.  Observe Mid-bit clock      Compare falling edge of CH1 display"
"\r\n                                to data displayed on CH2. "
"\r\n                                (Falling edges on CH1 occur at "
"\r\n                                 mid-bit of CH2 display)"
"\r\n",
"\r\nEnter Y if falling edge is at mid-bit or N for failure...",
1,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 31 */
1,                              /* clear screen if set */
1,                              /* set if need to send string to ST-8000A */
"c01a1w8\r",                    /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\nTEST DEMOD CARRIER DETECT OPERATION"
"\r\n     "
"\r\n78.  Change TF2                 Set TF2  TX TXD:  EXT"
"\r\n     "
"\r\n79.  Change A1J8                Modem Board  J8:  AUTO-MUTE"
"\r\n     "
"\r\n80.  *C01A1<CR>                 *Enable AMH"
"\r\n     "
"\r\n81.  Change TF1                 Set TF1    ATTN:  -20 dBm"
"\r\n                                            FSK:  600 Ohm"
"\r\n     "
"\r\n82.  Change TF2 DATA A          Set TF2 PROBE A:  DRTS"
"\r\n                                        PROBE B:  CD"
"\r\n     "
"\r\n83.  Observe CD toggle          Computer will send data, observe"
"\r\n                                O-scope channel 2.  (Level will go "
"\r\n                                high and then low.) "
"\r\n     "
"\r\nPress <Enter> when ready to observe O-scope...",
"\r\n     "
"\r\nPress Y if level toggled, R to repeat or N for failure...",
9,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 32 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\n\n\n\nTEST CD THRESHOLD CUTOFF"
"\r\n     "
/*"\r\n84.  Change CD Threshold        Control Board  SW1-1:  ON   (closed)"*/
"\r\n84.  Change CD Threshold          Modem Board  SW1-1:  ON   (closed)"
"\r\n                                             SW1-2-8:  OFF  (open)"
"\r\n     "
"\r\n85.  Observe threshold effect   Computer will send data, observe"
"\r\n                                O-scope  CH2.   (The level will "
"\r\n                                not change.) "
"\r\n     "
"\r\nPress <Enter> when ready to observe O-scope...",
"\r\n     "
"\r\nPress Y if level did not change, R to repeat or N for failure...",
9,                              /* data type, I-VII */
0.0,                            /* lowest value allowed for data */
0.0                             /* highest value allowed for data */
},

{   /*  window # 33 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\nMEASURE CARRIER DETECT DELAY"
"\r\n     "
"\r\n86.  Change TF1                 Set TF1   ATTN:  0 dBm"
"\r\n     "
"\r\n87.  Change MUTE delay to 0     Ctrl Board SW1:  all OFF   (open)"
"\r\n                                           SW2:  all OFF   (open)"
"\r\n     "
"\r\n88.  Change counter setup       Set counter to the following: "
"\r\n                                      Function:  TI A->B. "
"\r\n                                       Trigger:  Trig Level, Neg Edge"
"\r\n                                     Level/Sen:  12 o'clock"
"\r\n                                      Coupling:  DC"
"\r\n                                          ATTN:  X20 "
"\r\n                                     GATE TIME:  MIN"
"\r\n     "
"\r\n89.  Measure CD Delay           Computer will send QBF.  CD delay "
"\r\n                                shown on counter. (1.0 +/- 0.2 sec.)"
"\r\n     "
"\r\nPress <Enter> when ready...",
"\r\n     "
"\r\nEnter SECONDS shown on counter, to 1 decimal places: ",
10,                             /* data type, I-VII */
0.8,                            /* lowest value allowed for data */
1.2                             /* highest value allowed for data */
},

{   /*  window # 34 */
1,                              /* clear screen if set */
0,                              /* set if need to send string to ST-8000A */
"",                             /* command string for remote ST-8000A */
25,                             /* # of backup window */
"\r\n\n\nMEASURE MUTE DELAY"
"\r\n     "
/*"\r\n90.  Change MUTE Delay          Control Board SW1:  2 & 4 ON,  rest OFF"*/
"\r\n90.  Change MUTE Delay          Control Board SW1:  1 - 8 OFF"
/*"\r\n                                              SW2:  7     ON,  rest OFF"*/
"\r\n                                              SW2:  6 & 8 ON,  rest OFF"
"\r\n     "
"\r\n91.  Change TF2                 Set TF2   PROBE B:  KEY"
"\r\n     "
"\r\n92.  Change counter             Change counter to the following: "
"\r\n                                     CH B Trigger:  POS Edge "
"\r\n                                       Level/Sens:  Trigger LED just ON "
"\r\n     "
"\r\n93.  Measure MUTE Delay         Computer will send QBF.  The MUTE "
"\r\n                                delay is shown on counter. "
"\r\n                                ( 0.500 +/ -0.25 seconds.)"
"\r\n     "
"\r\nPress <Enter> when ready...",
"\r\n     "
"\r\nEnter SECONDS shown on counter, to 2 decimal places: ",
10,                             /* data type, I-VII */
.250,                            /* lowest value allowed for data */
.750                             /* highest value allowed for data */
}
};

char *congrat =
"\r\n\n\n\n"
"\r\n                             CONGRATULATIONS!!!"
"\r\n                     "
"\r\n                     "
"\r\n                    Another fine HAL ST-8000A has passed"
"\r\n                     "
"\r\n                         Acceptance Test Procedures."
"\r\n                     "
"\r\n                     "
"\r\n                    Submit the unit for final inspection.  "
"\r\n\n\n\n\n\n";



char *fmsg =
" RETURN ST-8000A TO FACTORY DEFAULTs "
"\r\n     "
"\r\n     1. Turn ST-8000A OUTPUT LEVEL to MAX, full Clock-Wise."
"\r\n     "
"\r\n CONTROL BOARD DEFAULTS"
"\r\n     "
"\r\n     1.  SW3-2         ON        (Rest OFF)        (9600 Baud) "
"\r\n     2.  SW4-1         ON        (Rest OFF)        (UNIT Address = 01) "
"\r\n     3.  SW2-7         ON        (Rest OFF)        (250ms Mute Delay)"
"\r\n     4.  SW1-2,4       ON        (Rest OFF)        (250ms Mute Delay) "
"\r\n     5.   J7     \"232\" Position                    (Remote type select)"
/*"\r\n     6.   J4       Installed                       (Rem TXD term res)"*/
"\r\n     6.   J4     \"232\" Position                    (Rem TXD term res)"
"\r\n          J8       Installed                       (Rem DTR term res)"
"\r\n     7.   J2     \"232\" Position                    (Data type select)"
/*"\r\n     8.   J6     \"232\" Position                    (RXD clock polarity)"*/
"\r\n     8.   J6     \"NORM\" Position                   (RXD clock polarity)"
"\r\n     "
"\r\n MODEM BOARD DEFAULTS"
"\r\n     "
"\r\n     1.   J6      Right Position                   (600 Ohm Terminated)"
/*"\r\n     2.   J8   \"AUTO-MUTE\"  Position               (MUTE Defeated)"*/
"\r\n     2.   J8   \"AUTO-MUTE\"  Position               (MUTE Enabled)"
"\r\n     3.  SW1-8         ON         (Rest OFF)       (-42 dBm AMH Threshold)"
"\r\n     4.  SW2-8         ON         (Rest OFF)       (1 sec AMH Delay)"
"\r\n     5.   J9     \"-V\" Position               "
"\r\n     "
"\r\n Press <Enter> to leave...";

char *notes =
"\r\n                    AUTOMATED  A.T.P.  INSTRUCTIONS"
"\r\n     "
"\r\n     This program will execute all of the same tests as the procedures  "
"\r\n     in the documents and in the same order.  Some of the testing is    "
"\r\n     done by this program. The remainder will need  a Test Engineer to  "
"\r\n     enter test results.  A test log will print out upon exit.          "
"\r\n                                                                        "
"\r\n     errors  --  The program will exit after the first error.           "
"\r\n       *     --  An asterisk signifies the step is done by the program."
"\r\n     <ESC>   --  will initiate exit procedures at any time.             "
"\r\n    <Pg Up>  --  backs up to the beginning of the current/last section. "
"\r\n     ";

char *dsheet_head =
"\r                           HAL COMMUNICATIONS CORP"
"\r\n                             ACCEPTANCE TEST DATA"
"\r\n                              ST-8000A FSK MODEM"
"\r\n"
"\r\nST-8000A S/N: ________  Test Engr/Tech: ____________________________________";


char *dsheet[32] =
{ "\r\n"
"\r\n4.2  Power-On Self Test (POST)\r\n"
"\r\nSTEP  CRITERIA                              OBSERVATION           RESULTS"
"\r\n2.a.  All displays segments and"
"\r\n      LEDs turn ON.                   "
"\r\n2.b.  All LEDs turn OFF and"
"\r\n      Model/Firmware displayed.                            pass______ fail______",
"\r\n14.   Set-up is as stored.                                 pass______ fail______",


"\r\n16.   Factory default setup restored.                      pass______ fail______",

"\r\n"
"\r\n5.2  Built-In Tests (BIT)\r\n"
"\r\n19.   Test B - 2 QBFs echoed.                              pass______ fail______",

"\r\n20.   Pass from PC and on front panel.                     pass______ fail______",

"\r\n18.   Test 5 - Front panel displays"
"\r\n      and LEDs turn ON then OFF.                           pass______ fail______",


"\r\n23.   All keys echoed to PC.                               pass______ fail______",

"\r\n28.   Status screen dumped to PC.                          pass______ fail______",

"\r\n"
"\r\n6.2  Performance Tests\r\n"
"\r\n6.2.1  AUDIO I/O Tests\r\n"
"\r\n32.   Counter = 300.0 Hz +/-0.2 Hz.       ______________   pass______ fail______",

"\r\n33.   Harmonics < -40 dBm.                ______________   pass______ fail______",

"\r\n34.   Spurious  < -60 dBm.                ______________   pass______ fail______",

"\r\n36.   Counter = 360.0 +/-0.2 Hz.          ______________   pass______ fail______",

"\r\n      ACVM = -1 <= VALUE <= 0dBm.         ______________   pass______ fail______",

"\r\n38.   ACVM < -20 dBm.                     ______________   pass______ fail______",

"\r\n40.   ACVM = -1 <= VALUE <= 0dBm.         ______________   pass______ fail______",

"\r\n42.   ACVM < -50 dBm.                     ______________   pass______ fail______",

"\r\n44.   Counter = 360.5 +/-0.2 Hz.          ______________   pass______ fail______",

"\r\n46.   QBF echoed error free.                               pass______ fail______",

"\r\n49.   QBF echoed error free.                               pass______ fail______",

"\r\n51.   QBF echoed error free.                               pass______ fail______",

"\r\n53.   QBF echoed error free.                               pass______ fail______",

"\r\n56.   QBF echoed error free.                               pass______ fail______",

"\r\n"
"\r\n6.2.2  DATA I/O Tests\r\n"
"\r\n60.   QBF echoed error free.                               pass______ fail______",

"\r\n64.   QBF echoed error free.                               pass______ fail______",

"\r\n68.   Counter = 600.0 +/-0.2 Hz.          ______________   pass______ fail______",

"\r\n69.   Stable squarewave on O-scope.                        pass______ fail______",

"\r\n73.   Stable mid-bit display.                              pass______ fail______",

"\r\n77.   Stable mid-bit display.                              pass______ fail______",

"\r\n83.   CH2 goes high then low.                              pass______ fail______",

"\r\n85.   CH2 does not change.                                 pass______ fail______",

"\r\n89.   Counter = 1.0 +/-0.2 sec.           ______________   pass______ fail______",

"\r\n93.   Counter = 0.5 +/-0.25 sec.          ______________   pass______ fail______"
};


char *dsheet_tail =
"\r\n\n\nDate of Test: _________________  OVERALL TEST RESULTS: pass/fail _____________ ";


char *dsheet_end =
"\r\n\n\n\n\n\n\n\n";



char *p_msg =
"\r                                                                 YES";

char *f_msg =
"\r                                                                            YES ";


char *nmb_msg =
"    ______________";



char *fsheet1 =
"\r                           HAL COMMUNICATIONS CORP"
"\r\n                             ACCEPTANCE TEST DATA"
"\r\n                              ST-8000A FSK MODEM"
"\r\n"
"\r\nST-8000A S/N: ________  Test Engr/Tech: ____________________________________";

char *fsheet2 =
"\r\n"
"\r\nDate and Time of Test: ___________________";

char *fsheet3 =
"\r\n"
"\r\n"
"\r\n                                FAILURE REPORT"
"\r\n"
"\r\n"
"\r\n-----------------------------------------------------------------------------"
"\r\nFAILED           NATURE OF FAILURE              CORRECTIVE ACTION"
"\r\nSTEP"
"\r\n-----------------------------------------------------------------------------";

char *fsheet_line =
"\r\n\r\n_____________________________________________________________________________";


char *fsheet_end =
"\r\n\n\n\n\n\n\n\n";
