Agilent Technologies A.18.00 Weather Radio User Manual


 
525
Chapter 8, Programming the Call Processing Subsystem
Example Programs
6090 CASE "Register"
6100 Ptr_value=1
6110 CASE "Page"
6120 Ptr_value=32
6130 CASE "Handoff"
6140 Ptr_value=32
6150 CASE "Originate"
6160 Ptr_value=32
6170 CASE "Release"
6180 Ptr_value=1
6190 END SELECT
6200 PRINT "Sending the "&State$&" command."
6210 IF State$="Originate" THEN
6220 OUTPUT Inst_addr;"STAT:CALLP:PTR "&VAL$(Ptr_value)
6230 ELSE
6240 OUTPUT Inst_addr;"STAT:CALLP:PTR "&VAL$(Ptr_value)&";:CALLP:&State$
6250 END IF
6260 LOOP
6270 DISP "Waiting for an interrupt."
6280 WAIT Wait_time
6290 EXIT IF Oper_complete OR Error_flag
6300 END LOOP
6400 DISP
6410 IF Error_flag THEN
6420 RETURN 0
6430 ELSE
6440 RETURN 1
6450 END IF
6460 FNEND
6470 !
7000 Order: DEF FNOrder(Order$,INTEGER Parm)
7010 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
7020 COM /Prog_control/ INTEGER Oper_complete,Wait_time,Error_flag
7030 Oper_complete=0 !Initialize to zero at start of any order to mobile
7040 Error_flag=0 !Initialize to zero at start of any order to mobile
7050 SELECT Order$
7060 CASE "Power"
7070 OUTPUT Inst_addr;"STAT:CALLP:PTR 32"
7080 OUTPUT Inst_addr;"CALLP:ORD ’CHNG PL "&VAL$(Parm)&"’"
7090 CASE "Mainten"
7100 BEEP
7110 OUTPUT Inst_addr;"STAT:CALLP:PTR 16;:CALLP:ORD ’MAINTEN’"
7120 CASE "Alert"
7130 BEEP
7140 OUTPUT Inst_addr;"STAT:CALLP:PTR 32;:CALLP:ORD ’ALERT’"
7150 END SELECT
7160 LOOP
7170 WAIT Wait_time
7180 EXIT IF Oper_complete OR Error_flag
7190 END LOOP