523
Chapter 8, Programming the Call Processing Subsystem
Example Programs
480 BEEP
490 DISP "Originate a call from the mobile station."
500 IF FNSet_state("Originate") THEN
510 DISP ""
520 Read_rcdd_data("12345")
530 ELSE
540 Print_error
550 END IF
560 IF NOT FNSet_state("Release") THEN CALL Print_error
570 PRINT "Program completed."
580 END
590 !
1000 Cond_test_set: SUB Cond_test_set
1010 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
1020 !**************************************************************
1030 ! Prompt operator to make sure that no RF power is applied to the
1040 ! RF IN/OUT port when the power meter is zeroed.
1050 !**************************************************************
1060 BEEP
1070 DISP "Remove all input power to the test set, then press Continue"
1080 PAUSE
1090 OUTPUT Inst_addr;"DISP RFAN;:RFAN:PME:ZERO"
1100 BEEP
1110 DISP "Reconnect all cables, then press Continue."
1120 PAUSE
1130 OUTPUT Inst_addr;"DISP CONF;:CONF:NOTC ’AFGEN1’"
1140 SUBEND
1150 !
2000 Cnfg_srvc_intrp: SUB Cnfg_srvc_intrp
2010 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
2020 OUTPUT Inst_addr;"*RST;*CLS;*ESE 60;*SRE 160"
2030 OUTPUT Inst_addr;"STAT:CALLP:PTR 0;NTR 0"
2040 OUTPUT Inst_addr;"STAT:CALLP:ENAB 63;:STAT:OPER:ENA 512;*OPC?"
2050 ON TIMEOUT Bus_addr,10 GOTO Cnfg_failed
2060 ENTER Inst_addr;Cnfg_complete
2070 OFF TIMEOUT Bus_addr
2080 SUBEXIT
2090 Cnfg_failed: BEEP
2100 PRINT "Cnfg_srvc_intrp SUB timed out on *OPC? query."
2110 STOP
2120 SUBEND
2130 !
3000 Srvice_interupt: SUB Srvice_interupt
3010 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
3020 COM /Prog_control/ INTEGER Oper_complete,Wait_time,Error_flag
3030 INTEGER Std_event,Status_byte,Call_proc_event,Oper_event
3040 Status_byte=SPOLL(Inst_addr)
3050 IF BIT(Status_byte,5) THEN ! Check for error conditions first
3060 Error_flag=1
3070 SUBEXIT !Dont re-enable interrupts until current errors processed.