1 | %ZISG ;Device Handler prototype ;2/18/93 16:30
|
---|
2 | ;;8.0T3
|
---|
3 | S $ZT="ERR^%ZISG"
|
---|
4 | D LOAD^%ZISG2
|
---|
5 | D INIT
|
---|
6 | K TMP("ZISGDEV","PARENT")
|
---|
7 | I $D(%PARENT) S TMP("ZISGDEV","PARENT")=%PARENT("PARENT")
|
---|
8 | S TMP("ZISGDEV","G","QFRAME","VISIBLE")=1
|
---|
9 | M ^$WINDOW("ZISGDEV")=TMP("ZISGDEV")
|
---|
10 | ;D M^XG("ZISGDEV",$NA(TMP("ZISGDEV")))
|
---|
11 | ;I $G(^%ZOSF("OS"))["VAX DSM" ESTART 0 ;NEEDED FOR VAX DSM
|
---|
12 | ;D ESTA^XG(0)
|
---|
13 | D B1
|
---|
14 | ESTART
|
---|
15 | W !,"THIS IS THE LINE AFTER ESTART COMMAND IN ^%ZISG"
|
---|
16 | ;D ESTA^XG()
|
---|
17 | ERR ;K ^$W("ZISGDEV")
|
---|
18 | ;D K^XG("ZISGTRM")
|
---|
19 | ;D K^XG("ZISGDEV")
|
---|
20 | W !,"$ZE="_$ZE
|
---|
21 | W !,"$EC="_$EC
|
---|
22 | W !,"$EREF="_$EREF
|
---|
23 | K:$D(^$W("ZISGMT")) ^$W("ZISGMT")
|
---|
24 | K:$D(^$W("ZISGHFS")) ^$W("ZISGHFS")
|
---|
25 | K:$D(^$W("ZISGSDP")) ^$W("ZISGSDP")
|
---|
26 | K:$D(^$W("ZISGSPL")) ^$W("ZISGSPL")
|
---|
27 | K:$D(^$W("ZISGTRM")) ^$W("ZISGTRM")
|
---|
28 | K:$D(^$W("ZISGDEV")) ^$W("ZISGDEV")
|
---|
29 | W !,"$D(%PARENT)="_$D(%PARENT)
|
---|
30 | ;I '$D(%PARENT) D CLEAN^XG
|
---|
31 | Q
|
---|
32 | B1 ;***VADIMS MWAPI/KWAPI INTERFACE***
|
---|
33 | I '@XGWIN@("ZISGDEV","G","PROMPT","VISIBLE") D
|
---|
34 | .;D S^XG("ZISGDEV","G","PROMPT","VALUE",@XGWIN@("ZISGDEV","G","DEV","VALUE"))
|
---|
35 | .S DEV=@XGWIN@("ZISGDEV","G","DEV","VALUE")
|
---|
36 | .I DEV]"" D
|
---|
37 | ..S ITEM=$$DEVITEM(DEV)
|
---|
38 | ..I ITEM]"" D
|
---|
39 | ...D S^XG("ZISGDEV","G","PROMPT","VALUE",ITEM,"")
|
---|
40 | ...D S^XG("ZISGDEV","G","PROMPT","TOPSHOW",ITEM)
|
---|
41 | .D S^XG("ZISGDEV","G","PROMPT","VISIBLE",1)
|
---|
42 | .;S ^$W("ZISGDEV","G","QFRAME","VISIBLE")=0
|
---|
43 | E D
|
---|
44 | .D S^XG("ZISGDEV","G","PROMPT","VISIBLE",0)
|
---|
45 | .;S ^$W("ZISGDEV","G","QFRAME","VISIBLE")=1
|
---|
46 | .S ITEM=$O(@XGWIN@("ZISGDEV","G","PROMPT","VALUE",""))
|
---|
47 | .I ITEM D
|
---|
48 | ..D S^XG("ZISGDEV","G","DEV","VALUE",@XGWIN@("ZISGDEV","G","PROMPT","CHOICE",ITEM))
|
---|
49 | ..S XGION=@XGWIN@("ZISGDEV","G","PROMPT","CHOICE",ITEM)
|
---|
50 | Q
|
---|
51 | PROMPT ;PROMPT CALLBACK
|
---|
52 | D B1
|
---|
53 | N ITEM,VALUE
|
---|
54 | S ITEM=$O(^$W("ZISGDEV","G","PROMPT","VALUE",""))
|
---|
55 | S VALUE=^$W("ZISGDEV","G","PROMPT","CHOICE",ITEM)
|
---|
56 | W !,"ION==>>"_VALUE
|
---|
57 | S DA=$O(^%ZIS(1,"B",VALUE,0))
|
---|
58 | Q:'DA
|
---|
59 | S XGIOST=$P($G(^%ZIS(2,+$G(^%ZIS(1,+DA,"SUBTYPE")),0)),"^")
|
---|
60 | S XGIOM=+$G(^%ZIS(1,+DA,91)),XGIOSL=$P($G(^(91)),"^",3)
|
---|
61 | Q
|
---|
62 | SELQ ;SELECT/DESELECT QUEUING
|
---|
63 | D S^XG("ZISGDEV","G","QTIME","ACTIVE",1)
|
---|
64 | Q
|
---|
65 | DSELQ D S^XG("ZISGDEV","G","QTIME","ACTIVE",0)
|
---|
66 | Q
|
---|
67 | DEV ; Callback for DEV item.
|
---|
68 | N REF,ITEM
|
---|
69 | S REF="^$W("""_^$EVENT("WINDOW")_""",""G"")"
|
---|
70 | W !,^$W("ZISGDEV","G","DEV","VALUE")
|
---|
71 | S DEV=^$W("ZISGDEV","G","DEV","VALUE")
|
---|
72 | I DEV]"" D
|
---|
73 | .N %,%1
|
---|
74 | .K ^$W("ZISGDEV","G","PROMPT","VALUE")
|
---|
75 | .F %=1:1 Q:'$D(^$W("ZISGDEV","G","PROMPT","CHOICE",%))!(DEV="") D
|
---|
76 | ..S %1=^$W("ZISGDEV","G","PROMPT","CHOICE",%)
|
---|
77 | ..I %1=DEV S ^$W("ZISGDEV","G","PROMPT","VALUE",%)="" S DEV="" Q
|
---|
78 | ..I %1]DEV S ^$W("ZISGDEV","G","PROMPT","TOPSHOW")=% S DEV="" Q
|
---|
79 | S XGION=$S($D(@REF@("DEV","VALUE")):@REF@("DEV","VALUE"),1:"")
|
---|
80 | Q
|
---|
81 | DEVITEM(X) ;
|
---|
82 | N %,%1,Y S Y=""
|
---|
83 | K ^$W("ZISGDEV","G","PROMPT","VALUE")
|
---|
84 | F %=1:1 Q:'$D(^$W("ZISGDEV","G","PROMPT","CHOICE",%))!(X="") D
|
---|
85 | .S %1=^$W("ZISGDEV","G","PROMPT","CHOICE",%)
|
---|
86 | .I %1=X!(%1]X) S Y=% S X="" Q
|
---|
87 | Q Y
|
---|
88 | SETST ;Set subtype
|
---|
89 | Q
|
---|
90 | SUB ; Callback for SUB item
|
---|
91 | Q
|
---|
92 | OK ;Callbak for OK button.
|
---|
93 | G OK^%ZISG2
|
---|
94 | MSGOK ;
|
---|
95 | K ^$W("MESSAGE")
|
---|
96 | ESTOP
|
---|
97 | Q
|
---|
98 | MORE ; Callback for advanced setup.
|
---|
99 | Q
|
---|
100 | HELP ;Callback for help.
|
---|
101 | D ^XGLMSG("I","Help is not available at this time.")
|
---|
102 | Q
|
---|
103 | EXIT ; Callback for exit item in menu
|
---|
104 | S IOP="^" D ^%ZIS
|
---|
105 | ;ESTOP
|
---|
106 | D ESTO^XG
|
---|
107 | QUIT
|
---|
108 | INIT ;create names of devices into ACDEV
|
---|
109 | N %,%1,%2
|
---|
110 | K TMP("ZISGDEV","G","PROMPT","CHOICE")
|
---|
111 | S %1="" F %=1:1 S %1=$O(^%ZIS(1,"B",%1)) Q:%1']"" F %2=0:0 S %2=$O(^%ZIS(1,"B",%1,%2)) Q:%2'>0 S TMP("ZISGDEV","G","PROMPT","CHOICE",%)=%1
|
---|
112 | Q
|
---|
113 | ;
|
---|
114 | QTIME ;
|
---|
115 | G QTIME^%ZISG2
|
---|