00001 #!/usr/bin/env python 00002 # 00003 # Copyright 2002 00004 # by 00005 # The Board of Trustees of the 00006 # Leland Stanford Junior University. 00007 # All rights reserved. 00008 # 00009 00010 __facility__ = "Online" 00011 __abstract__ = "RunControl Power Panel Implementation" 00012 __author__ = "S. Tuvi <stuvi@SLAC.Stanford.edu> SLAC - GLAST LAT I&T/Online" 00013 __date__ = "10/11/2002" 00014 __version__ = "$Revision: 2.10 $" 00015 __release__ = "$Name: R04-12-00 $" 00016 __credits__ = "SLAC" 00017 00018 import LATTE.copyright_SLAC 00019 00020 from qt import SIGNAL, QCursor, Qt, QAction, QKeySequence, QPixmap 00021 00022 import PowerPanel 00023 import FEpowerUp 00024 00025 class PowerPanelImpl(PowerPanel.PowerPanel): 00026 00027 image_green_off = \ 00028 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00029 "\x49\x48\x44\x52\x00\x00\x00\x0e\x00\x00\x00\x0e" \ 00030 "\x08\x06\x00\x00\x00\x1f\x48\x2d\xd1\x00\x00\x01" \ 00031 "\x46\x49\x44\x41\x54\x78\x9c\x85\x92\x2d\x92\xc2" \ 00032 "\x30\x1c\xc5\x7f\xed\x44\x44\x20\x10\x08\x44\x05" \ 00033 "\x02\x51\x81\xac\xa8\x40\x70\x00\x04\xb2\x07\xe8" \ 00034 "\x01\x2a\x57\x54\x56\xac\x40\x70\x00\xe4\x8a\x4a" \ 00035 "\x04\x07\x58\x81\x40\x44\x20\x10\x08\x44\x45\x45" \ 00036 "\x04\x02\x51\x81\xe8\x4c\x56\xf4\x63\xda\xa1\xcc" \ 00037 "\xbe\x99\x4c\xbe\xde\xcb\x7b\x49\xfe\x16\x03\x38" \ 00038 "\xe7\x37\xd3\x8c\x7d\xc7\xb5\x86\x38\x3d\x68\xad" \ 00039 "\x8d\xd6\xda\x74\x85\x00\x87\xc3\xc1\x7c\xd2\xd0" \ 00040 "\x15\x84\xdf\xa1\x59\x46\x4b\x13\xc6\xa1\xf9\x24" \ 00041 "\xb6\x1a\x51\x56\x3e\x39\xe7\x17\xd2\x74\xc7\xf3" \ 00042 "\x55\xb6\x84\xb1\x14\x04\x41\xc4\x4c\x4b\x94\x52" \ 00043 "\x24\x49\x62\x01\xd8\xdd\xbb\xa4\xe9\x8e\xeb\xa3" \ 00044 "\x64\x22\x25\x79\x01\x79\x01\xd7\x47\x49\x9a\xee" \ 00045 "\xde\x12\x5a\x4d\xbc\xfd\xcf\x96\x53\x76\x61\xe6" \ 00046 "\x7a\x00\x9c\x94\x6a\x49\xce\x08\x26\x52\xb2\x1a" \ 00047 "\xad\x00\x48\x92\xc4\xb2\x1b\xb7\x86\x94\xdd\x14" \ 00048 "\xd9\x4d\xe1\x8c\x68\x1b\x40\x59\x96\x68\x74\x7b" \ 00049 "\x98\xed\x3b\x6e\xe5\x5a\xc0\x58\x88\xe1\x26\x05" \ 00050 "\x42\x88\x5e\x54\xd1\x75\xf4\x23\xdf\x50\x32\x08" \ 00051 "\x77\xea\xc2\x1d\xf4\xb4\x72\xb5\xbb\x4f\x1d\x04" \ 00052 "\x51\x7d\x54\x1f\x02\x01\x45\x3d\xa9\xa3\xb7\x77" \ 00053 "\xeb\xfe\xd3\xf6\x77\xcb\xe3\xf5\x62\x2c\x05\x8b" \ 00054 "\xe9\xa2\x5a\xbc\xd7\x9b\x73\xd8\x7f\xed\xad\x5e" \ 00055 "\x39\xc5\x71\x6c\x00\x3c\xcf\xe3\xa8\x8e\xd5\xa2" \ 00056 "\xee\x10\xe6\x55\xf7\x26\xec\x3a\xab\xfa\x3b\x34" \ 00057 "\xba\x8d\x07\xb0\x76\xd7\x6c\x36\x9b\xff\xeb\xf7" \ 00058 "\x13\xfe\x00\xbe\x37\x89\x8a\x88\xac\xe1\x96\x00" \ 00059 "\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82" 00060 image_green_on = \ 00061 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00062 "\x49\x48\x44\x52\x00\x00\x00\x0e\x00\x00\x00\x0e" \ 00063 "\x08\x06\x00\x00\x00\x1f\x48\x2d\xd1\x00\x00\x01" \ 00064 "\x16\x49\x44\x41\x54\x78\x9c\x8d\x92\x2b\xb2\xc2" \ 00065 "\x30\x14\x86\xbf\x32\x15\x88\x2b\x2b\x10\x08\x04" \ 00066 "\x02\x81\xa8\xcc\x22\x10\x91\x5d\x08\x0b\xc8\x02" \ 00067 "\x58\x02\xa2\xb2\x12\xc1\x22\x22\x2b\x2a\x2a\x2a" \ 00068 "\x22\x22\x22\x90\x15\x88\xcc\xe4\x8a\xd2\xde\xe6" \ 00069 "\x52\x66\x38\x2a\xe7\xf1\xcd\x7f\x1e\x49\x58\x30" \ 00070 "\xad\x75\x18\xdf\x42\x88\x64\xa9\x66\x35\x77\x9c" \ 00071 "\x73\xc1\x39\x17\xfe\x17\xdd\x6e\xb7\xb7\x58\x04" \ 00072 "\x8d\x4a\xb2\x95\x41\x78\x11\x64\x2b\xc3\x27\x38" \ 00073 "\x19\x21\x63\x0c\x7a\xad\xa9\x8e\x15\x0f\x9e\x53" \ 00074 "\x41\xc6\x9a\xa2\x29\xd8\x99\x1d\x75\x57\xa3\xce" \ 00075 "\x2a\x89\x5a\x15\x42\x24\x23\x94\xb2\x99\xc0\x07" \ 00076 "\x4f\xaa\x63\x35\x38\xfd\x6c\x46\xad\x75\x30\xc6" \ 00077 "\x20\x5b\x19\x3c\x3e\x82\x46\xf3\x78\xca\x43\x09" \ 00078 "\x3f\xa0\x2e\x2a\xbc\x2d\x67\x28\x72\x78\xdc\x1b" \ 00079 "\x6c\xf7\x16\xdb\xdb\xc9\x4f\xe7\xc9\x94\x94\x2c" \ 00080 "\x0e\x4d\xb6\xe9\xe2\x4e\xd2\xf9\x9d\x84\x17\x1f" \ 00081 "\xd7\x9e\x55\x19\x58\xb0\xdb\x41\x75\x05\x7f\xab" \ 00082 "\x2e\x9a\xe2\x2b\x35\x78\x9d\x63\x0e\x03\x94\x87" \ 00083 "\x92\x66\x6f\x38\x76\xbb\x41\x09\x60\x1c\x6f\x0b" \ 00084 "\x57\x75\x4d\xa2\xef\xa4\x2e\x2a\xd0\x43\x9e\xe7" \ 00085 "\xdc\xeb\x7b\x0c\xbc\x20\x58\x00\xe7\xca\x75\x57" \ 00086 "\x0f\x5c\x6f\xa3\xfc\x29\x3f\x21\xa5\x5c\xfc\xbf" \ 00087 "\x5f\xd9\x2f\x41\x44\x7e\xe4\x06\x4c\xc7\x96\x00" \ 00088 "\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82" 00089 00090 00091 image_green_off_old = \ 00092 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00093 "\x49\x48\x44\x52\x00\x00\x00\x1c\x00\x00\x00\x1c" \ 00094 "\x08\x06\x00\x00\x00\x72\x0d\xdf\x94\x00\x00\x02" \ 00095 "\xc9\x49\x44\x41\x54\x78\x9c\xbd\x96\x21\x73\xdb" \ 00096 "\x30\x14\xc7\xff\xee\x09\x04\x04\x14\x14\x08\x04" \ 00097 "\x14\x06\x18\x14\x08\x04\x04\x14\x0c\x06\x04\x14" \ 00098 "\xf8\x43\x14\x04\x04\x0c\x14\x0c\x04\x04\x04\x18" \ 00099 "\x0c\xf6\x03\x18\x0c\x08\x04\x0c\x14\x18\x0c\x18" \ 00100 "\x08\x0c\x18\x14\x0c\x14\x04\x18\x14\x04\x18\x04" \ 00101 "\xe8\xce\x03\xce\x93\x25\x5b\x76\x9b\xbb\xdd\x5e" \ 00102 "\xce\x97\x44\x92\xdf\xef\xfd\x9f\xf4\x24\x01\xff" \ 00103 "\xd9\x82\x4b\x06\x67\x87\xd7\xaa\xdd\x36\x9b\x4c" \ 00104 "\x2f\xf2\xc1\x3e\x03\xb9\x65\xd7\x9d\xf6\x37\x7d" \ 00105 "\xbc\x84\x63\xac\x37\x3a\x1f\x88\x20\x7d\xaa\xa4" \ 00106 "\x94\x15\x00\x2c\x97\xcb\x5e\xbf\xde\x8e\xa2\x28" \ 00107 "\x9c\xd4\x71\xce\x3f\x95\x36\x02\x0e\x41\x3b\x8d" \ 00108 "\x36\xec\x4d\x1f\x8d\x9a\x38\x4b\xaa\x3c\x7d\x41" \ 00109 "\x5e\xe4\x60\x60\x98\xf2\x29\x50\x02\x0b\xb1\x70" \ 00110 "\x9c\x7f\x04\x75\x1a\xec\x34\x92\x2a\x29\x65\xb5" \ 00111 "\x4b\x77\x00\x00\x0d\xed\x55\xc6\xc0\xb0\xbe\x5f" \ 00112 "\x1b\x80\x94\xb2\x52\x4a\x41\x08\xd1\x81\x5e\xd9" \ 00113 "\x7f\x08\x46\x73\x15\x67\x49\xb5\x4d\xb7\xd0\xe7" \ 00114 "\xcf\xf1\xd4\x7d\x28\x90\x6d\xba\x45\x9c\x25\xce" \ 00115 "\x54\x28\xa5\x3a\xc1\x19\xa0\xbd\xe4\x67\x93\x69" \ 00116 "\x10\x67\x49\x95\x24\x31\x00\xe0\x78\xd2\xc8\xdf" \ 00117 "\x35\x0e\x25\x3a\x4f\xfe\xde\x80\x93\x24\x86\x94" \ 00118 "\xb2\xea\x4b\xb1\x03\x6c\xab\xcb\xf7\x2f\x06\x76" \ 00119 "\x28\x81\xb9\x10\xb8\xbb\x19\x79\x53\x7a\x28\x61" \ 00120 "\xa0\xbb\x74\x07\x29\x65\xb5\xd9\x6c\x02\x9f\xca" \ 00121 "\xab\xf6\xcb\xa4\x2e\x2f\x73\xe3\x6c\x2e\x04\xbe" \ 00122 "\x3d\xac\xf0\x10\x3d\x62\x32\xf6\x32\x71\x28\xeb" \ 00123 "\x6f\x0d\x0d\xa5\x94\xa3\xcc\xfe\xcd\x80\x26\x9d" \ 00124 "\x46\x5d\xda\xa8\x23\xcb\x0e\xbf\xf1\x33\x4b\x8d" \ 00125 "\x63\x9f\x1d\x4f\x1a\xd7\x23\x86\xb4\x4c\x01\x4b" \ 00126 "\x98\xad\xd2\xbb\xd3\xe4\x45\xee\xfc\xff\xa5\x14" \ 00127 "\xde\x5e\xd5\x20\xac\x6d\xc5\xb8\xc0\x62\xba\xc0" \ 00128 "\x7e\xbf\x07\xe7\xdc\x0f\xa4\x9a\x0b\x79\x68\xa0" \ 00129 "\x76\x0a\xfb\xd2\xd9\x36\xad\xeb\xcc\xec\xd5\xbe" \ 00130 "\xd3\x67\x80\xf6\xde\x48\xb0\xeb\xd1\xc0\x56\xeb" \ 00131 "\x2f\xc9\xda\x29\xeb\x7f\xef\x0a\x68\x94\xd1\x5c" \ 00132 "\x86\xe3\xb0\x71\xda\xf7\x78\x49\xfd\x41\x74\x86" \ 00133 "\xd8\x1b\x32\x07\x47\x8e\xbc\xee\x1d\x50\xe2\x33" \ 00134 "\x7d\xd2\x60\x94\x99\x82\xbe\x0a\xd3\xdf\x29\x0b" \ 00135 "\x00\xd8\x6c\x36\x01\xa3\x58\x3e\x11\xb5\x3d\xae" \ 00136 "\x04\xea\x7d\xb6\x65\x54\x1a\x1d\x20\x75\x3c\x44" \ 00137 "\x8f\x1d\x67\x83\x30\x5d\x97\xc5\xfc\xf6\xae\x6e" \ 00138 "\xfb\xe3\x0e\xa1\xd2\x70\x80\x76\x81\xae\x66\x51" \ 00139 "\x10\x45\xab\x8f\xa1\x04\xd3\x1a\x37\xa3\xf3\x4e" \ 00140 "\xd4\x2e\x9f\xb1\x3b\xbc\x63\xe6\x20\x9d\x2d\x83" \ 00141 "\x38\x4b\xaa\x1f\xc9\xf7\xfa\xa4\xf0\x8d\x3e\xcf" \ 00142 "\xb1\x51\x56\x02\xd6\x94\x01\xe7\x12\x2c\xc6\x75" \ 00143 "\xa3\xa3\xb0\x7d\x94\x48\x29\xab\xd5\x2c\x0a\xd6" \ 00144 "\xf7\x6b\x84\x3c\x04\x03\x33\xa9\xa3\x39\x66\x8c" \ 00145 "\x21\x9c\x84\xcd\x4b\x36\xac\xa5\x0e\xe8\x39\xf1" \ 00146 "\xe9\x3c\x03\x00\x21\x84\x09\x86\x0e\x61\xaf\xb5" \ 00147 "\x95\x91\x3a\x0b\xf8\xfc\xf5\x39\x18\xbc\x3a\x3c" \ 00148 "\x3d\x3d\x39\x47\x8b\x10\x02\x4a\x29\x67\x99\x03" \ 00149 "\x1e\x90\x07\x16\xde\x7f\xc1\x6a\x16\x05\x83\xeb" \ 00150 "\x8f\xd4\x91\x5a\xa5\x14\x8a\xc2\xe7\xbd\x1f\x44" \ 00151 "\x76\x5b\xd4\x0b\xea\xe2\xcb\x91\x1d\x00\x99\x51" \ 00152 "\xdc\xb3\xd7\x2e\xa6\xcd\xbd\xe7\xa2\x4b\xec\x50" \ 00153 "\x40\x4a\x29\xb3\x12\xc9\x78\xc9\xbd\xf7\x9a\x7f" \ 00154 "\x6a\xed\x6c\xb4\xed\x2f\x6a\x02\x7f\xd3\xbb\x1f" \ 00155 "\xcf\x2c\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42" \ 00156 "\x60\x82" 00157 00158 image_green_on_old = \ 00159 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00160 "\x49\x48\x44\x52\x00\x00\x00\x1c\x00\x00\x00\x1c" \ 00161 "\x08\x06\x00\x00\x00\x72\x0d\xdf\x94\x00\x00\x02" \ 00162 "\x71\x49\x44\x41\x54\x78\x9c\xbd\x96\xaf\x92\xdb" \ 00163 "\x30\x10\xc6\x3f\x67\x0c\x0e\x04\x14\x04\x18\x18" \ 00164 "\x04\x18\x14\x04\x08\x14\x1c\x34\x28\x0c\x30\x0c" \ 00165 "\xbc\x47\x30\xb8\x07\x30\x38\x10\x70\x20\x0f\x51" \ 00166 "\x10\x28\x10\x50\x70\x20\xa0\xc0\x50\xe0\x40\x81" \ 00167 "\x81\x81\x81\x41\x40\x40\x80\x81\x67\x5c\xe0\xac" \ 00168 "\xa2\x7f\xb1\x93\xb4\xd3\x9d\xc9\x64\x2c\xad\xf7" \ 00169 "\xa7\x6f\x77\x25\x19\xf8\xcf\xe6\xdd\xea\x98\xe7" \ 00170 "\x79\x77\x6d\xee\xf9\xf9\xf9\xe6\x38\x83\x8e\x04" \ 00171 "\x99\xcf\xe7\xd6\x5c\x59\x96\x0f\x41\xaf\x3a\xe5" \ 00172 "\x79\xde\x99\x20\x13\x62\xc2\x38\xe7\x1d\x00\x24" \ 00173 "\x49\x72\x35\xae\x73\xa2\xae\x6b\x2d\x7d\x41\x10" \ 00174 "\xdc\xb4\x7a\x02\x0e\x41\xad\x41\x15\x56\x96\xa5" \ 00175 "\x5c\xfd\x46\x6c\xba\xfd\xd3\x1e\x75\x54\xf7\x8b" \ 00176 "\x28\x02\x00\x40\xdc\xc4\x48\x59\x2a\xe3\x8c\x41" \ 00177 "\xb5\x01\x35\x8d\xa4\x6a\x23\x36\xdd\x76\xb1\x1d" \ 00178 "\x55\xb7\xfa\x5c\x49\x30\xe7\xbc\x13\x85\x00\x8b" \ 00179 "\x98\x05\x9d\xb8\x60\x54\x2b\x13\x76\x40\x63\xfd" \ 00180 "\xc8\xb6\x8b\x2d\x36\x62\xa3\x95\x42\x14\xc2\x5a" \ 00181 "\xd8\xc4\x1a\x41\xdf\x04\x2a\xac\x45\xab\x05\x57" \ 00182 "\xed\x80\x06\x2d\x5a\x09\xe5\x9c\x77\xaa\x2a\x35" \ 00183 "\xc5\x1a\xd0\x54\xb7\x7f\xda\xcb\x80\x47\xb4\xf0" \ 00184 "\x11\xc0\x47\xe0\x84\x1e\xd1\x4a\xe8\x7a\xb9\x06" \ 00185 "\xe7\xbc\xcb\x5e\x33\x0f\x27\x40\x08\x5d\xe5\x04" \ 00186 "\xd0\x37\x35\xa9\xa3\xe6\x00\x00\x1f\x01\xd6\xc7" \ 00187 "\x0c\x71\xfb\xdd\x09\x24\x28\x99\x28\x44\xaf\x6c" \ 00188 "\x6a\xab\xf4\xd5\x97\x4c\x75\xad\x12\xe4\xe7\xf4" \ 00189 "\x17\xf6\xfe\xc7\x55\x20\xf9\xfb\xf0\x21\x96\x02" \ 00190 "\xd8\x5d\xc6\xd5\x5a\x3a\x6b\x48\xea\x68\xd5\x2d" \ 00191 "\x6a\x7c\xf8\x3f\xd0\xa2\x76\xb9\x4b\x23\xff\x3a" \ 00192 "\xaa\x51\x9d\x2a\xb0\x88\xa1\xaa\x2a\xcd\xc7\x09" \ 00193 "\xa4\x3d\xf6\x45\x4f\xc0\xa8\x91\x3f\x65\x66\x27" \ 00194 "\x76\x96\x8f\x8c\xa8\x1e\x5b\xa4\xd0\x87\x8f\xd9" \ 00195 "\x9d\x50\x7a\xef\x9a\x0d\x2a\x7c\xd4\x86\xde\x77" \ 00196 "\x02\xe3\x26\xfe\x2b\xa0\xb4\x73\xf9\xaa\xd3\xa5" \ 00197 "\x8e\x13\xe0\x72\xda\xd3\xbf\x7a\x36\xde\x6b\x07" \ 00198 "\x34\x98\x6d\x67\xd6\x38\x6d\x0d\xa9\xd0\xbc\x62" \ 00199 "\x56\x9f\xab\x87\x60\xf1\xdb\xb7\xfe\x41\x6f\x4e" \ 00200 "\xb9\x35\xb4\x94\xaa\x1b\x34\x65\xa9\x77\x0f\xf4" \ 00201 "\x80\x06\x8b\x62\x3e\xea\xe7\x6c\x27\x79\x91\xb2" \ 00202 "\xc4\x33\xaf\x25\x97\xb5\x68\x2f\xca\x00\x5d\x5d" \ 00203 "\x78\x1e\x3a\xd7\x51\x53\x68\x5e\x25\x9c\xf3\x2e" \ 00204 "\x65\xa9\xf7\xf2\xfb\x05\x41\x11\xc8\xee\xa3\x83" \ 00205 "\x9c\xc6\xd8\x1b\x73\xc3\x1c\x66\x29\x4c\x92\xc4" \ 00206 "\xa3\xfb\x4c\x55\xcb\xbf\x72\x2f\x7b\xcf\x3a\xb5" \ 00207 "\xe3\x2c\x33\xa7\x42\xdb\x65\xb0\x1b\xb3\xf7\xac" \ 00208 "\xaf\xe9\x09\xc0\x14\x60\x11\x83\x28\x04\x2c\xa8" \ 00209 "\x6b\x0d\x06\x2c\x9c\x86\xc8\x5e\x33\x6f\xf0\x18" \ 00210 "\x61\x51\x9f\x2a\x21\x04\xe8\xaa\x31\xcf\xc6\x31" \ 00211 "\x90\x19\xeb\xee\x8f\x23\xc0\xb8\xc9\x4f\x40\x35" \ 00212 "\x52\xb8\x25\x5b\xca\xfe\x78\x78\x83\x9b\x0b\x72" \ 00213 "\xa5\x3a\x9c\x86\xce\xef\x9a\x7f\x6a\x66\x36\x4c" \ 00214 "\xfb\x03\xae\x8f\x50\xbe\x7d\x72\xee\xdd\x00\x00" \ 00215 "\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82" 00216 00217 image_yellow_on = \ 00218 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00219 "\x49\x48\x44\x52\x00\x00\x00\x1c\x00\x00\x00\x1c" \ 00220 "\x08\x06\x00\x00\x00\x72\x0d\xdf\x94\x00\x00\x02" \ 00221 "\x38\x49\x44\x41\x54\x78\x9c\xbd\x96\xaf\x72\xab" \ 00222 "\x40\x14\xc6\x3f\x3a\x88\x8a\x88\x48\x44\x05\x22" \ 00223 "\x02\x11\x11\x51\x81\x88\x40\xf4\x01\xf6\x21\x22" \ 00224 "\xf2\x00\x57\x54\x44\x46\x44\x56\x22\x10\x7d\x04" \ 00225 "\x44\xc5\x15\x11\x88\x08\x44\x05\x22\x02\x81\x40" \ 00226 "\x54\x20\x22\x10\x2b\x22\x76\x66\xaf\x60\x96\x2e" \ 00227 "\xbb\x0b\xdd\xb4\x73\x7b\x0c\x19\xce\xe6\xfc\xce" \ 00228 "\xf7\xed\x3f\x80\x5f\x0e\xc7\x76\x60\x9e\xe7\x7c" \ 00229 "\x2c\x17\x86\xa1\x75\x9d\xc9\x81\x02\x12\x04\xbe" \ 00230 "\x96\x2b\xcb\xfa\x5b\xd0\xd1\x41\x79\x9e\x73\x15" \ 00231 "\xa4\x42\x54\x58\x9a\xa6\x1c\x00\x08\x21\xa3\x75" \ 00232 "\x8d\x89\xb6\x6d\x06\xf6\xcd\xe7\x9e\x55\xf7\x02" \ 00233 "\x38\x05\xbd\x9b\x82\x95\x65\xdd\xc3\xb2\x2c\xe1" \ 00234 "\x55\xb9\xe5\x8c\x85\x9c\xb1\xb0\xff\x9d\x65\x89" \ 00235 "\x11\x22\xc3\xe5\x18\x74\x21\xdb\x28\x83\xd6\xeb" \ 00236 "\xe4\x4b\x75\xa7\xd3\x06\x51\xb4\xe9\xad\x6d\xca" \ 00237 "\x33\xbc\x60\xa9\x29\xed\x15\xca\x30\x31\x57\xb6" \ 00238 "\x30\x00\x58\xaf\x13\xc8\x6a\x01\xa0\x29\xcf\xda" \ 00239 "\x38\xcd\x52\xa0\x5b\x04\xb7\xc0\x64\x28\xf0\x69" \ 00240 "\x6d\x73\xbd\x6a\xd6\xf6\x40\x55\xdd\xad\x30\x11" \ 00241 "\x8c\x85\x3c\x4d\x53\xbe\x7d\xde\x39\x00\x50\x14" \ 00242 "\xef\x83\xfc\x1d\x30\xdc\xd4\x42\x9d\x5a\x88\xd2" \ 00243 "\x14\x8c\x3d\x59\x41\x55\x2b\x65\x95\xae\x9c\x10" \ 00244 "\xea\x1e\xbc\x61\x57\x5d\xe7\x99\x15\x0c\x00\x9e" \ 00245 "\xc8\x07\x62\xec\x39\xd0\xd9\x2a\x37\x60\x9c\x43" \ 00246 "\x7f\x51\x68\xef\xe6\xf3\x17\xb8\xee\xd1\x0a\xe8" \ 00247 "\x2f\x0a\xd0\xba\x86\x17\x2c\x71\xb9\xb4\x68\xae" \ 00248 "\xd7\x69\x60\x5d\xad\xac\x0a\x8f\x07\x03\x00\x54" \ 00249 "\x7f\xdf\xb4\x4c\x0f\x94\x8f\x2d\x93\xc2\xdb\xc2" \ 00250 "\x1d\xcd\x18\x15\xfe\x34\xa6\x1c\xfa\x2f\x96\x1e" \ 00251 "\x5f\x69\x57\xc7\xbd\x07\x00\x5c\x2e\xed\x10\x28" \ 00252 "\x4e\x7b\xf1\x5c\x04\xb1\xf5\xfd\xa6\x07\x05\x6d" \ 00253 "\xef\xb5\xb7\xf1\xa1\x5b\xb5\xbd\x42\xf5\x8a\x39" \ 00254 "\x9d\x36\xdf\x82\x25\xbb\xce\x1d\xa1\x0e\x00\x7c" \ 00255 "\x36\xb2\x4a\xe5\x0d\x1a\x45\x1b\xe7\x36\x68\x07" \ 00256 "\x33\xa9\x93\xc3\xb8\x9c\x04\x38\x8a\x88\xe5\x99" \ 00257 "\xca\x06\x30\x93\x3a\x5a\xd7\x00\x0c\x17\xb0\x7a" \ 00258 "\xd8\x8a\x83\xb8\x2a\xb7\x1c\x10\x5b\x86\x02\x98" \ 00259 "\xa1\xae\x56\x38\xbe\x0e\xe7\x4c\x86\xc9\x40\x00" \ 00260 "\xf8\x13\x27\x8e\xa6\x90\x10\xe2\x88\xfb\x4c\x6e" \ 00261 "\x60\x11\x10\x27\x3e\xec\x39\xad\xd9\x40\x19\x60" \ 00262 "\x07\x13\x31\xb9\x1a\xe3\xc3\x9e\xcb\xc7\xd2\x6a" \ 00263 "\xf5\x88\xa6\x3c\xf7\xf6\x98\x20\x63\xb0\x99\xef" \ 00264 "\x63\xfb\xbc\xd3\x15\xca\xe1\x05\x4b\x78\xf8\xbc" \ 00265 "\x62\x8a\xe2\xbd\xdb\x53\x23\x90\x31\x98\xa8\x05" \ 00266 "\x58\x7e\x97\xaa\xf3\xaa\xde\x71\xb3\xa6\x99\xfc" \ 00267 "\xbf\x50\x67\x0d\xb4\x69\x48\xb5\x5a\x80\x4c\xdf" \ 00268 "\x35\xbf\x1a\xff\x00\xb3\xe3\x40\xd9\xc1\x60\x1b" \ 00269 "\x94\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60" \ 00270 "\x82" 00271 00272 image_yellow_off = \ 00273 "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \ 00274 "\x49\x48\x44\x52\x00\x00\x00\x1c\x00\x00\x00\x1c" \ 00275 "\x08\x06\x00\x00\x00\x72\x0d\xdf\x94\x00\x00\x02" \ 00276 "\xc0\x49\x44\x41\x54\x78\x9c\xbd\x96\x21\x77\xa3" \ 00277 "\x40\x10\xc7\xff\xf4\xad\x40\x44\x20\x10\x08\x04" \ 00278 "\x22\x12\x81\xa8\x88\xa8\xbc\x0f\x80\x88\x38\x71" \ 00279 "\xf2\x44\xc4\x89\x7e\x80\x8a\xca\xca\x48\xc4\x89" \ 00280 "\x13\x11\x15\x88\xfd\x00\x15\x27\x2a\x10\x27\x22" \ 00281 "\x10\x15\x11\x08\x04\x62\x05\x02\xb1\x62\xde\xe3" \ 00282 "\x04\x6f\xc9\x2e\x2c\x69\x5a\xd1\x79\x8f\x17\xb2" \ 00283 "\xbb\xec\x6f\xfe\xb3\xcc\x0c\xc0\x17\x9b\x73\xed" \ 00284 "\xc2\xa2\x28\xfa\xa5\xb9\xcd\x66\x73\xf5\x3e\x17" \ 00285 "\x17\x2a\x48\x14\x86\xb3\xb9\xaa\xae\x3f\x05\x5d" \ 00286 "\x5c\x54\x14\x45\x3f\x05\x4d\x21\x53\x18\xe7\xbc" \ 00287 "\x07\x80\x34\x4d\x17\xf7\xb5\x4e\x34\x75\x6d\x84" \ 00288 "\x2f\x08\xc3\xab\xbc\x57\xc0\x4b\xd0\xd9\xa0\x0e" \ 00289 "\xab\xea\x7a\xf4\x3e\xcf\xf6\xbd\x38\x96\x70\x45" \ 00290 "\x09\x5a\x85\x20\xd7\x03\x93\x2d\xfc\xf4\x87\xb1" \ 00291 "\x39\xe7\xbc\xa7\xa6\x02\x0b\x22\x2b\xd4\x18\xd0" \ 00292 "\xc3\xa8\x54\x71\xce\x7b\xc1\x0f\x60\x9d\x3d\x9c" \ 00293 "\x00\x40\xab\xd0\x00\xe7\xd9\xbe\x07\x60\x85\xde" \ 00294 "\xd8\x60\xea\xac\xf2\x6c\xdf\xb7\x87\xa7\x11\xd6" \ 00295 "\x4a\x39\xbb\x00\x80\x75\x35\xda\xc3\x93\x01\x2a" \ 00296 "\x1b\x01\x6a\xaa\x99\x73\x37\xb3\x11\x0c\x2f\x41" \ 00297 "\x9e\xed\xfb\xee\xe5\x79\x50\x40\x84\xb7\x96\xd0" \ 00298 "\x48\x36\xbb\xde\x5a\x02\x11\x01\x00\xba\x97\x67" \ 00299 "\x70\xce\xfb\x34\x4d\x9d\x38\xf0\x51\x36\xc2\x38" \ 00300 "\x57\x03\x38\x55\xd7\x16\xaf\xa3\xaa\x53\x07\x44" \ 00301 "\xeb\x04\xeb\x30\xb2\x86\xf4\xd4\x61\x84\x0a\x7e" \ 00302 "\x00\xe7\xbc\xdf\xee\xee\x1d\x00\x38\x1e\xff\xcd" \ 00303 "\x15\xea\x49\xad\xd4\xa9\x30\x36\x92\x21\x5a\x27" \ 00304 "\x48\x1f\x1e\x71\xb7\xfd\x6e\x05\x2a\x28\x30\x84" \ 00305 "\x77\x1a\x4a\x5d\xa5\x11\x52\xa5\x4e\x1c\x4b\x00" \ 00306 "\x67\xaf\xd5\x5c\xb9\x90\x87\xca\xd4\xfa\xb6\x78" \ 00307 "\x45\x9e\xed\xfb\x38\xf0\x87\x71\xcd\x01\x66\x7b" \ 00308 "\xd0\x15\xa5\xe1\x75\x75\x3a\xa2\x7a\xf8\x75\x11" \ 00309 "\x06\x00\x1d\x11\x3c\xc6\xc0\xba\x1a\xe2\x58\xc2" \ 00310 "\x4f\x62\x08\xd1\xa2\xd4\xd6\x58\x5f\x1a\xe9\xc7" \ 00311 "\x00\x80\xf5\x0a\x08\xdc\xb3\xca\xc0\x25\xe3\xd2" \ 00312 "\x4d\xff\x4f\x72\xb8\xff\x5b\x9e\x66\x7b\x8f\x0a" \ 00313 "\xf5\xb2\xa5\x14\x32\xc6\xe0\x31\x06\xcf\x9d\x2d" \ 00314 "\x07\x00\x6d\xdc\x9c\x63\x2e\x83\xe9\xce\xd9\xac" \ 00315 "\x0a\x69\x35\x2f\xd6\x1f\x31\xfd\xec\xaf\x02\x7a" \ 00316 "\x9b\xbb\xcf\xc3\x24\x01\x5e\x64\x8c\x09\xd1\x9a" \ 00317 "\x40\x55\x2f\xd5\xef\x76\x77\xef\x7c\x56\x65\x07" \ 00318 "\x02\xb9\xde\x6c\x5c\x55\xa1\x51\xe1\xb4\xc5\x7c" \ 00319 "\x54\x25\x49\x42\x2b\x25\xdc\xf0\x16\x00\x50\x32" \ 00320 "\xe3\x80\x51\x36\x02\x06\x50\x87\x01\x83\xca\xd5" \ 00321 "\xb7\xe5\x44\x9f\xc2\x3a\x10\x56\xfe\xda\x0a\x8b" \ 00322 "\x49\x8e\xf7\xd6\x3c\xd4\x1b\x69\x9e\xed\xfb\xb6" \ 00323 "\x78\x5d\xec\x16\x0a\xe6\x86\xb7\x20\x0b\x4c\x59" \ 00324 "\xd0\x34\x00\x26\x0a\x55\x2b\xa1\xa6\x02\x35\xd5" \ 00325 "\x58\x13\x7f\xfe\xc9\x1d\xe9\xc7\x20\x22\x90\xa4" \ 00326 "\x31\xcf\x5a\x29\x01\x3f\x1a\xc3\x68\x33\x5d\x1d" \ 00327 "\xb0\xd0\xf1\x55\x13\x05\x86\x56\xa3\xab\x55\x65" \ 00328 "\x6f\x6a\x4b\xca\x74\xe0\x2e\xfb\xed\x5c\xfc\x74" \ 00329 "\x78\x7c\x7c\x30\x5a\x8b\xaa\x8d\xb6\x0a\xf2\x1e" \ 00330 "\xcc\x4f\x62\x6c\x77\xf7\x8e\xf5\x0c\x95\x25\xc9" \ 00331 "\x2d\xa8\xa9\xc6\x37\xac\x6c\x84\x91\x53\xd7\x80" \ 00332 "\x94\xa9\x48\x7d\xf8\xe3\x48\x77\x40\x99\x72\xc2" \ 00333 "\x06\x02\xce\xea\xae\x06\xbe\x67\x2a\xa9\xa7\xe7" \ 00334 "\xeb\x27\xf1\xe2\xc7\xd4\x97\xd9\x7f\xcc\x73\xa6" \ 00335 "\x1e\xf4\x37\xb0\x0e\x00\x00\x00\x00\x49\x45\x4e" \ 00336 "\x44\xae\x42\x60\x82" 00337 00338 def __init__(self, rc, common, parent = None, name = None, fl = 0): 00339 PowerPanel.PowerPanel.__init__(self, parent, name, fl) 00340 self.__rc = rc 00341 self.__common = common 00342 self.__parent = parent 00343 self.__fePowerUp = FEpowerUp.FEpowerUp() 00344 if self.chkCALTKR.isChecked(): 00345 self.__bothCALandTKR = 1 00346 else: 00347 self.__bothCALandTKR = 0 00348 # Hide the warning message 00349 self.TextLabel.hide() 00350 # Hide the schema button 00351 self.cmdSelectSchema.hide() 00352 00353 self.connect(self.PwrUpButton,SIGNAL("clicked()"), self.powerUp) 00354 self.connect(self.PwrDownButton,SIGNAL("clicked()"), self.powerDown) 00355 self.connect(self.cmdRefresh,SIGNAL("clicked()"),self.refreshPowerStatus) 00356 self.connect(self.cmdSelectAllACD,SIGNAL("clicked()"),self.selectAllACD) 00357 self.connect(self.cmdSelectAllCAL,SIGNAL("clicked()"),self.selectAllCAL) 00358 self.connect(self.cmdSelectAllTKR,SIGNAL("clicked()"),self.selectAllTKR) 00359 self.connect(self.cmdDeselectAllACD,SIGNAL("clicked()"),self.deSelectAllACD) 00360 self.connect(self.cmdDeselectAllCAL,SIGNAL("clicked()"),self.deSelectAllCAL) 00361 self.connect(self.cmdDeselectAllTKR,SIGNAL("clicked()"),self.deSelectAllTKR) 00362 self.connect(self.chkCALTKR,SIGNAL("toggled(bool)"),self.selectBothCALTKR) 00363 self.connect(self.bgCAL,SIGNAL("clicked(int)"),self.selectCAL) 00364 self.connect(self.bgTKR,SIGNAL("clicked(int)"),self.selectTKR) 00365 00366 self.imgGreenOff = QPixmap() 00367 self.imgGreenOff.loadFromData(PowerPanelImpl.image_green_off,"PNG") 00368 self.imgGreenOn = QPixmap() 00369 self.imgGreenOn.loadFromData(PowerPanelImpl.image_green_on,"PNG") 00370 self.imgYellowOn = QPixmap() 00371 self.imgYellowOn.loadFromData(PowerPanelImpl.image_yellow_on,"PNG") 00372 self.imgYellowOff = QPixmap() 00373 self.imgYellowOff.loadFromData(PowerPanelImpl.image_yellow_off,"PNG") 00374 00375 self.__operator = None 00376 self.__adminOverride = None 00377 self.setEnablePowerUpButton(1) 00378 self.setEnablePowerDownButton(1) 00379 00380 def applyPermissions(self, operator): 00381 self.__operator = operator 00382 self.__adminOverride = operator.isAdministrator() 00383 self.setEnablePowerUpButton(1) 00384 self.setEnablePowerDownButton(1) 00385 00386 def setEnablePowerUpButton(self, enable): 00387 if self.__common.options().securedir is not None: 00388 if self.__operator is not None: 00389 if not 'enable_power_up' in self.__operator.getPermissions() and not self.__adminOverride: 00390 self.PwrUpButton.setEnabled(0) 00391 return 00392 self.PwrUpButton.setEnabled(enable) 00393 00394 def setEnablePowerDownButton(self, enable): 00395 if self.__common.options().securedir is not None: 00396 if self.__operator is not None: 00397 if not 'enable_power_down' in self.__operator.getPermissions() and not self.__adminOverride: 00398 self.PwrDownButton.setEnabled(0) 00399 return 00400 self.PwrDownButton.setEnabled(enable) 00401 00402 00403 def selectBothCALTKR(self, state): 00404 if state: 00405 self.__bothCALandTKR = 1 00406 else: 00407 self.__bothCALandTKR = 0 00408 00409 def selectCAL(self, id): 00410 if id > 15: return 00411 check = self.bgCAL.find(id) 00412 if check.isChecked(): 00413 state = 1 00414 else: 00415 state = 0 00416 if self.__bothCALandTKR: 00417 check = self.bgTKR.find(id) 00418 check.setChecked(state) 00419 00420 def selectTKR(self, id): 00421 if id > 15: return 00422 check = self.bgTKR.find(id) 00423 if check.isChecked(): 00424 state = 1 00425 else: 00426 state = 0 00427 if self.__bothCALandTKR: 00428 check = self.bgCAL.find(id) 00429 check.setChecked(state) 00430 00431 def selectAllACD(self): 00432 if self.__lat.existsAEM(): 00433 for arcId in self.__lat.AEM.ARC: 00434 check = self.bgACD.find(arcId) 00435 check.setChecked(1) 00436 00437 def deSelectAllACD(self): 00438 if self.__lat.existsAEM(): 00439 for arcId in self.__lat.AEM.ARC: 00440 check = self.bgACD.find(arcId) 00441 check.setChecked(0) 00442 00443 def selectAllCAL(self): 00444 for temId in self.__lat.TEM: 00445 check = self.bgCAL.find(temId) 00446 check.setChecked(1) 00447 self.selectCAL(temId) 00448 00449 def deSelectAllCAL(self): 00450 for temId in self.__lat.TEM: 00451 check = self.bgCAL.find(temId) 00452 check.setChecked(0) 00453 self.selectCAL(temId) 00454 00455 def selectAllTKR(self): 00456 for temId in self.__lat.TEM: 00457 check = self.bgTKR.find(temId) 00458 check.setChecked(1) 00459 self.selectTKR(temId) 00460 00461 def deSelectAllTKR(self): 00462 for temId in self.__lat.TEM: 00463 check = self.bgTKR.find(temId) 00464 check.setChecked(0) 00465 self.selectTKR(temId) 00466 00467 def activate(self): 00468 self.__lat = self.__common.getLAT() 00469 if self.__lat is None: 00470 self.__rc.loadSchema() 00471 self.__xbrd = self.__common.getXBRD() 00472 self.disableAllCheck() 00473 self.__fePowerUp.initialize(self.__lat, self.__xbrd) 00474 self.refreshPowerStatus() 00475 app = self.__rc.getApp() 00476 currentState = 'RESET' 00477 if app is not None: 00478 if app.__class__.__name__ == 'userSuite': 00479 currentState = app.getScriptState() 00480 elif self.__rc.getFSM() is not None: 00481 currentState = self.__rc.getFSM().current_state 00482 if currentState == 'RESET': 00483 self.setEnablePowerUpButton(1) 00484 self.setEnablePowerDownButton(1) 00485 else: 00486 self.setEnablePowerUpButton(0) 00487 self.setEnablePowerDownButton(0) 00488 00489 00490 00491 def disableAllCheck(self, preserveExisting=0): 00492 lat = self.__lat 00493 for i in range(12): 00494 check = self.bgACD.find(i) 00495 if preserveExisting and lat.existsAEM() and lat.AEM.existsARC(i): 00496 pass 00497 else: 00498 check.setEnabled(0) 00499 check.setChecked(0) 00500 for i in range(16): 00501 if preserveExisting and lat.existsTEM(i): 00502 pass 00503 else: 00504 check = self.bgCAL.find(i) 00505 check.setEnabled(0) 00506 check.setChecked(0) 00507 for i in range(16): 00508 if preserveExisting and lat.existsTEM(i): 00509 pass 00510 else: 00511 check = self.bgTKR.find(i) 00512 check.setEnabled(0) 00513 check.setChecked(0) 00514 00515 def initCheckPower(self): 00516 lat = self.__lat 00517 if self.__fePowerUp.isAEMactive(lat.AEM): 00518 for arcId in lat.AEM.ARC.keys(): 00519 check = self.bgACD.find(arcId) 00520 check.setEnabled(1) 00521 activeTEMs = self.__fePowerUp.getActiveTEMs(lat) 00522 for temId in activeTEMs.keys(): 00523 check = self.bgCAL.find(temId) 00524 check.setEnabled(1) 00525 check = self.bgTKR.find(temId) 00526 check.setEnabled(1) 00527 00528 def getACDPowerUps(self): 00529 acdPowerUp = [] 00530 for i in range(self.bgACD.count()): 00531 check = self.bgACD.find(i) 00532 if check.isOn(): 00533 acdPowerUp.append(i) 00534 return acdPowerUp 00535 00536 def getTEMPowerUps(self): 00537 temPowerUp = {} 00538 for i in range(self.bgCAL.count()): 00539 powerSupply = 0 00540 check = self.bgCAL.find(i) 00541 if check.isOn(): 00542 powerSupply |= 2 00543 check = self.bgTKR.find(i) 00544 if check.isOn(): 00545 powerSupply |= 1 00546 if powerSupply != 0: temPowerUp[i] = powerSupply 00547 return temPowerUp 00548 00549 def powerUp(self): 00550 self.__fePowerUp.setAcdPowerUp(self.getACDPowerUps()) 00551 self.__fePowerUp.setTemPowerUp(self.getTEMPowerUps()) 00552 (acdPowerCheck, calPowerCheck, tkrPowerCheck) = self.__fePowerUp.up() 00553 self.refreshLEDs(acdPowerCheck, calPowerCheck, tkrPowerCheck) 00554 00555 def powerDown(self): 00556 self.__fePowerUp.setAcdPowerUp(self.getACDPowerUps()) 00557 self.__fePowerUp.setTemPowerUp(self.getTEMPowerUps()) 00558 (acdPowerCheck, calPowerCheck, tkrPowerCheck) = self.__fePowerUp.down() 00559 self.refreshLEDs(acdPowerCheck, calPowerCheck, tkrPowerCheck) 00560 00561 def refreshPowerStatus(self): 00562 self.initCheckPower() 00563 apply(self.refreshLEDs, self.__fePowerUp.refreshPowerStatus()) 00564 00565 def refreshLEDs(self, acdPowerCheck, calPowerCheck, tkrPowerCheck): 00566 for i in range(12): 00567 acdLed = eval("self.acdLed"+str(i)) 00568 if i in acdPowerCheck: 00569 acdLed.setPixmap(self.imgGreenOn) 00570 else: 00571 acdLed.setPixmap(self.imgGreenOff) 00572 for i in range(16): 00573 calLed = eval("self.calLed"+str(i)) 00574 tkrLed = eval("self.tkrLed"+str(i)) 00575 if i in calPowerCheck: 00576 calLed.setPixmap(self.imgGreenOn) 00577 else: 00578 calLed.setPixmap(self.imgGreenOff) 00579 if i in tkrPowerCheck: 00580 tkrLed.setPixmap(self.imgGreenOn) 00581 else: 00582 tkrLed.setPixmap(self.imgGreenOff)