- Timestamp:
- 02/08/13 22:54:26 (12 years ago)
- Location:
- fact/tools/PyDimCtrl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/PyDimCtrl/fact_dim_servers.py
r14788 r14884 2 2 class FTM_CONTROL ( FactDimServer): 3 3 def version_number(self): 4 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 5 L 4 """ 5 Dim Service 6 Native Dim service: Version number of Dim in use 7 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 8 L 6 9 """ 7 10 return self._get("VERSION_NUMBER") 11 8 12 def disable_reports(self, *args): 9 """ disable sending rate reports|status[bool]:disable or enable that the FTM sends rate reports (yes/no) 10 B 13 """ 14 Dim Command 15 disable sending rate reports 16 status[bool]:disable or enable that the FTM sends rate reports (yes/no) 17 B 11 18 """ 12 19 self._cmd("DISABLE_REPORTS", *args) 20 13 21 def toggle_pixel(self, *args): 14 """ DESC in SERVICE_DESC is empty ?! 15 S:1 22 """ 23 Dim Command 24 DESC in SERVICE_DESC is empty ?! 25 S:1 16 26 """ 17 27 self._cmd("TOGGLE_PIXEL", *args) 28 18 29 def disable_all_patches_except(self, *args): 19 """ DESC in SERVICE_DESC is empty ?! 20 S:1 30 """ 31 Dim Command 32 DESC in SERVICE_DESC is empty ?! 33 S:1 21 34 """ 22 35 self._cmd("DISABLE_ALL_PATCHES_EXCEPT", *args) 36 23 37 def set_trigger_multiplicity(self, *args): 24 """ Setup the Multiplicity condition for physcis triggers|N[int]:Number of requirered coincident triggers from sum-patches (1-40) 25 S:1 38 """ 39 Dim Command 40 Setup the Multiplicity condition for physcis triggers 41 N[int]:Number of requirered coincident triggers from sum-patches (1-40) 42 S:1 26 43 """ 27 44 self._cmd("SET_TRIGGER_MULTIPLICITY", *args) 45 28 46 def state(self): 29 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 30 C 47 """ 48 Dim Service 49 Provides the state of the state machine as quality of service. 50 Text[string]:A human readable string sent by the last state change. 51 C 31 52 """ 32 53 return self._get("STATE") 54 33 55 def set_trigger_interval(self, *args): 34 """ Sets the trigger interval which is the distance between two consecutive artificial triggers.|interval[ms]:The applied trigger interval in millisecond (min 1ms / 10bit) 35 I:1 56 """ 57 Dim Command 58 Sets the trigger interval which is the distance between two consecutive artificial triggers. 59 interval[ms]:The applied trigger interval in millisecond (min 1ms / 10bit) 60 I:1 36 61 """ 37 62 self._cmd("SET_TRIGGER_INTERVAL", *args) 63 38 64 def enable_ftu(self, *args): 39 """ Enable or disable FTU|Board[idx]:Index of the board (0-39), -1 for all|Enable[bool]:Whether FTU should be enabled or disabled (yes/no) 40 I:1;B:1 65 """ 66 Dim Command 67 Enable or disable FTU 68 Board[idx]:Index of the board (0-39), -1 for all 69 Enable[bool]:Whether FTU should be enabled or disabled (yes/no) 70 I:1;B:1 41 71 """ 42 72 self._cmd("ENABLE_FTU", *args) 73 43 74 def service_list(self): 44 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 45 C 75 """ 76 Dim Service 77 Native Dim service: List of services, commands and formats 78 ServiceList[string]:For details see the Dim manual. 79 C 46 80 """ 47 81 return self._get("SERVICE_LIST") 82 48 83 def set_calibration_multiplicity(self, *args): 49 """ Setup the Multiplicity condition for artificial (calibration) triggers|N[int]:Number of requirered coincident triggers from sum-patches (1-40) 50 S:1 84 """ 85 Dim Command 86 Setup the Multiplicity condition for artificial (calibration) triggers 87 N[int]:Number of requirered coincident triggers from sum-patches (1-40) 88 S:1 51 89 """ 52 90 self._cmd("SET_CALIBRATION_MULTIPLICITY", *args) 91 53 92 def reset_crate(self, *args): 54 """ Reset one of the crates 0-3|crate[short]:Crate number to be reseted (0-3) 55 S:1 93 """ 94 Dim Command 95 Reset one of the crates 0-3 96 crate[short]:Crate number to be reseted (0-3) 97 S:1 56 98 """ 57 99 self._cmd("RESET_CRATE", *args) 100 58 101 def reset_configure(self, *args): 59 """ Reset states during a configuration or in case of configuration error 60 102 """ 103 Dim Command 104 Reset states during a configuration or in case of configuration error 105 61 106 """ 62 107 self._cmd("RESET_CONFIGURE", *args) 108 63 109 def disable_pixel(self, *args): 64 """ (-1 or all) 65 S:1 110 """ 111 Dim Command 112 (-1 or all) 113 S:1 66 114 """ 67 115 self._cmd("DISABLE_PIXEL", *args) 116 68 117 def enable_veto(self, *args): 69 """ Enable veto line|Enable[bool]:Enable veto (yes/no) 70 B:1 118 """ 119 Dim Command 120 Enable veto line 121 Enable[bool]:Enable veto (yes/no) 122 B:1 71 123 """ 72 124 self._cmd("ENABLE_VETO", *args) 125 73 126 def enable_pixel(self, *args): 74 """ (-1 or all) 75 S:1 127 """ 128 Dim Command 129 (-1 or all) 130 S:1 76 131 """ 77 132 self._cmd("ENABLE_PIXEL", *args) 133 78 134 def set_calibration_window(self, *args): 79 """ DESC in SERVICE_DESC is empty ?! 80 S:1 135 """ 136 Dim Command 137 DESC in SERVICE_DESC is empty ?! 138 S:1 81 139 """ 82 140 self._cmd("SET_CALIBRATION_WINDOW", *args) 141 83 142 def enable_ext1(self, *args): 84 """ Switch on the triggers through the first external line|Enable[bool]:Enable ext1 trigger (yes/no) 85 B:1 143 """ 144 Dim Command 145 Switch on the triggers through the first external line 146 Enable[bool]:Enable ext1 trigger (yes/no) 147 B:1 86 148 """ 87 149 self._cmd("ENABLE_EXT1", *args) 150 88 151 def set_trigger_window(self, *args): 89 """ DESC in SERVICE_DESC is empty ?! 90 S:1 152 """ 153 Dim Command 154 DESC in SERVICE_DESC is empty ?! 155 S:1 91 156 """ 92 157 self._cmd("SET_TRIGGER_WINDOW", *args) 158 93 159 def service_desc(self): 94 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 95 C 160 """ 161 Dim Service 162 Descriptions of services or commands and there arguments 163 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 164 C 96 165 """ 97 166 return self._get("SERVICE_DESC") 167 98 168 def state_list(self): 99 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 100 C 169 """ 170 Dim Service 171 Provides a list with descriptions for each service. 172 StateList[string]:A \n separated list of the form id:name=description 173 C 101 174 """ 102 175 return self._get("STATE_LIST") 176 103 177 def set_threshold(self, *args): 104 """ Set the comparator threshold|Patch[idx]:Index of the patch (0-159), -1 for all|Threshold[counts]:Threshold to be set in binary counts 105 I:2 178 """ 179 Dim Command 180 Set the comparator threshold 181 Patch[idx]:Index of the patch (0-159), -1 for all 182 Threshold[counts]:Threshold to be set in binary counts 183 I:2 106 184 """ 107 185 self._cmd("SET_THRESHOLD", *args) 186 108 187 def request_static_data(self, *args): 109 """ request transmission of static data from FTM to memory 110 188 """ 189 Dim Command 190 request transmission of static data from FTM to memory 191 111 192 """ 112 193 self._cmd("REQUEST_STATIC_DATA", *args) 194 113 195 def dynamic_data(self): 114 """ Regular reports sent by FTM|FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled|OnTimeCounter[us]:Ontime, i.e. FTM processes triggers (e.g. No FAD busy)|Temperatures[Nan]:not yet defined nor used (wanna be FTM onboard temps)|TriggerPatchCounter[int]:counting since last update (prescaling)|BoardsCounter[int]:FTU board counting after N out of 4 and since last update|RateOverflow[bitpattern]:bits 0-4=patches overflow, 5=board overflow, 1 per board|Prescaling[500ms]:Update rate of the rate counter|CrcError[int]:Number of checksum error in RS485 communication|State[int]:State value of the FTM firmware (cf. FTM doc) 115 X:1;X:1;F:4;I:160;I:40;S:40;S:40;S:40;S:1 196 """ 197 Dim Service 198 Regular reports sent by FTM 199 FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled 200 OnTimeCounter[us]:Ontime, i.e. FTM processes triggers (e.g. No FAD busy) 201 Temperatures[Nan]:not yet defined nor used (wanna be FTM onboard temps) 202 TriggerPatchCounter[int]:counting since last update (prescaling) 203 BoardsCounter[int]:FTU board counting after N out of 4 and since last update 204 RateOverflow[bitpattern]:bits 0-4=patches overflow, 5=board overflow, 1 per board 205 Prescaling[500ms]:Update rate of the rate counter 206 CrcError[int]:Number of checksum error in RS485 communication 207 State[int]:State value of the FTM firmware (cf. FTM doc) 208 X:1;X:1;F:4;I:160;I:40;S:40;S:40;S:40;S:1 116 209 """ 117 210 return self._get("DYNAMIC_DATA") 211 118 212 def set_time_marker_delay(self, *args): 119 """ |delay[int]:The applied time marker delay is: delay*4ns+8ns 120 I:1 213 """ 214 Dim Command 215 delay[int]:The applied time marker delay is: delay*4ns+8ns 216 I:1 121 217 """ 122 218 self._cmd("SET_TIME_MARKER_DELAY", *args) 219 123 220 def configure(self, *args): 124 """ DESC in SERVICE_DESC is empty ?! 125 C 221 """ 222 Dim Command 223 DESC in SERVICE_DESC is empty ?! 224 C 126 225 """ 127 226 self._cmd("CONFIGURE", *args) 227 128 228 def reconnect(self, *args): 129 """ (Re)connect ethernet connection to FTM, a new address can be given|[host][string]:new ethernet address in the form <host:port> 130 O 229 """ 230 Dim Command 231 (Re)connect ethernet connection to FTM, a new address can be given 232 [host][string]:new ethernet address in the form <host:port> 233 O 131 234 """ 132 235 self._cmd("RECONNECT", *args) 236 133 237 def enable_clock_conditioner(self, *args): 134 """ Enable clock conidtioner output in favor of time marker output|Enable[bool]:Enable clock conditioner (yes/no) 135 B:1 238 """ 239 Dim Command 240 Enable clock conidtioner output in favor of time marker output 241 Enable[bool]:Enable clock conditioner (yes/no) 242 B:1 136 243 """ 137 244 self._cmd("ENABLE_CLOCK_CONDITIONER", *args) 245 138 246 def take_n_events(self, *args): 139 """ take n events (distribute n triggers)|number[int]:Number of events to be taken 140 I 247 """ 248 Dim Command 249 take n events (distribute n triggers) 250 number[int]:Number of events to be taken 251 I 141 252 """ 142 253 self._cmd("TAKE_N_EVENTS", *args) 254 143 255 def enable_group1_lpint(self, *args): 144 """ DESC in SERVICE_DESC is empty ?! 145 B:1 256 """ 257 Dim Command 258 DESC in SERVICE_DESC is empty ?! 259 B:1 146 260 """ 147 261 self._cmd("ENABLE_GROUP1_LPINT", *args) 262 148 263 def exit(self, *args): 149 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 150 L:1 264 """ 265 Dim Command 266 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 267 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 268 L:1 151 269 """ 152 270 self._cmd("EXIT", *args) 271 153 272 def trigger_rates(self): 154 """ Patch,Board,Camera trigger rates|FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled|OnTimeCounter[us]:Effective on-time, ie. FTM triggers (eg. w/o busy)|TriggerCounter[int]:Counter of triggers since enabled or disabled|TriggerRate[Hz]:Trigger rate|BoardRate[Hz]:Trigger rate of individual FTUs|PatchRate[Hz]:Trigger rate of individual patches|ElapsedTime[sec]:Time elapsed since previous report|OnTime[sec]:OnTime elapsed since previous report 155 X:1;X:1;I:1;F:1;F:40;F:160;F:1;F:1 273 """ 274 Dim Service 275 Patch,Board,Camera trigger rates 276 FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled 277 OnTimeCounter[us]:Effective on-time, ie. FTM triggers (eg. w/o busy) 278 TriggerCounter[int]:Counter of triggers since enabled or disabled 279 TriggerRate[Hz]:Trigger rate 280 BoardRate[Hz]:Trigger rate of individual FTUs 281 PatchRate[Hz]:Trigger rate of individual patches 282 ElapsedTime[sec]:Time elapsed since previous report 283 OnTime[sec]:OnTime elapsed since previous report 284 X:1;X:1;I:1;F:1;F:40;F:160;F:1;F:1 156 285 """ 157 286 return self._get("TRIGGER_RATES") 287 158 288 def passport(self): 159 """ Info about the FTM and FPGA version|BoardId[int]:BoardId, hexCode|DNA[int]:DNA of the FTM board 160 X:1;S:1 289 """ 290 Dim Service 291 Info about the FTM and FPGA version 292 BoardId[int]:BoardId, hexCode 293 DNA[int]:DNA of the FTM board 294 X:1;S:1 161 295 """ 162 296 return self._get("PASSPORT") 297 163 298 def set_n_out_of_4(self, *args): 164 """ Set the comparator threshold|Board[idx]:Index of the board (0-39), -1 for all|Threshold[counts]:Threshold to be set in binary counts 165 I:2 299 """ 300 Dim Command 301 Set the comparator threshold 302 Board[idx]:Index of the board (0-39), -1 for all 303 Threshold[counts]:Threshold to be set in binary counts 304 I:2 166 305 """ 167 306 self._cmd("SET_N_OUT_OF_4", *args) 307 168 308 def set_intensity_lpext(self, *args): 169 """ DESC in SERVICE_DESC is empty ?! 170 S:1 309 """ 310 Dim Command 311 DESC in SERVICE_DESC is empty ?! 312 S:1 171 313 """ 172 314 self._cmd("SET_INTENSITY_LPEXT", *args) 315 173 316 def enable_group2_lpext(self, *args): 174 """ DESC in SERVICE_DESC is empty ?! 175 B:1 317 """ 318 Dim Command 319 DESC in SERVICE_DESC is empty ?! 320 B:1 176 321 """ 177 322 self._cmd("ENABLE_GROUP2_LPEXT", *args) 323 178 324 def enable_group1_lpext(self, *args): 179 """ DESC in SERVICE_DESC is empty ?! 180 B:1 325 """ 326 Dim Command 327 DESC in SERVICE_DESC is empty ?! 328 B:1 181 329 """ 182 330 self._cmd("ENABLE_GROUP1_LPEXT", *args) 331 183 332 def set_clock_register(self, *args): 184 """ DESC in SERVICE_DESC is empty ?! 185 X:8 333 """ 334 Dim Command 335 DESC in SERVICE_DESC is empty ?! 336 X:8 186 337 """ 187 338 self._cmd("SET_CLOCK_REGISTER", *args) 339 188 340 def load(self, *args): 189 """ Loads the static data (FTM configuration) from a file into memory and sends it to the FTM|filename[string]:Filename (can include a path), .bin is automatically added 190 C 341 """ 342 Dim Command 343 Loads the static data (FTM configuration) from a file into memory and sends it to the FTM 344 filename[string]:Filename (can include a path), .bin is automatically added 345 C 191 346 """ 192 347 self._cmd("LOAD", *args) 348 193 349 def save(self, *args): 194 """ Saves the static data (FTM configuration) from memory to a file|filename[string]:Filename (can include a path), .bin is automatically added 195 C 350 """ 351 Dim Command 352 Saves the static data (FTM configuration) from memory to a file 353 filename[string]:Filename (can include a path), .bin is automatically added 354 C 196 355 """ 197 356 self._cmd("SAVE", *args) 357 198 358 def toggle_ftu(self, *args): 199 """ Toggle status of FTU (this is mainly meant to be used in the GUI)|Board[idx]:Index of the board (0-39) 200 I:1 359 """ 360 Dim Command 361 Toggle status of FTU (this is mainly meant to be used in the GUI) 362 Board[idx]:Index of the board (0-39) 363 I:1 201 364 """ 202 365 self._cmd("TOGGLE_FTU", *args) 366 203 367 def ftu_list(self): 204 """ Logs the changes of status of the FTUs|FTMtimeStamp[us]:Time in microseconds|ActiveFTU[bitpattern]:Description of enabled FTUs|NumBoards[int]:Total number of enabled FTUs|NumBoardsCrate[int]:Total number of enabled FTUs per crate|DNA[hexCode]:Hex code identifier of FTUs|Addr[bitpattern]:Crate address (hardware) of FTUs|Ping[int]:Number of pings until FTU response 205 X:1;X:1;S:1;C:4;X:40;C:40;C:40 368 """ 369 Dim Service 370 Logs the changes of status of the FTUs 371 FTMtimeStamp[us]:Time in microseconds 372 ActiveFTU[bitpattern]:Description of enabled FTUs 373 NumBoards[int]:Total number of enabled FTUs 374 NumBoardsCrate[int]:Total number of enabled FTUs per crate 375 DNA[hexCode]:Hex code identifier of FTUs 376 Addr[bitpattern]:Crate address (hardware) of FTUs 377 Ping[int]:Number of pings until FTU response 378 X:1;X:1;S:1;C:4;X:40;C:40;C:40 206 379 """ 207 380 return self._get("FTU_LIST") 381 208 382 def client_list(self): 209 """ Native Dim service: A list of all connected clients 210 C 383 """ 384 Dim Service 385 Native Dim service: A list of all connected clients 386 C 211 387 """ 212 388 return self._get("CLIENT_LIST") 389 213 390 def set_register(self, *args): 214 """ set register to value|addr[short]:Address of register|val[short]:Value to be set 215 I:2 391 """ 392 Dim Command 393 set register to value 394 addr[short]:Address of register 395 val[short]:Value to be set 396 I:2 216 397 """ 217 398 self._cmd("SET_REGISTER", *args) 399 218 400 def enable_ext2(self, *args): 219 """ Switch on the triggers through the second external line|Enable[bool]:Enable ext2 trigger (yes/no) 220 B:1 401 """ 402 Dim Command 403 Switch on the triggers through the second external line 404 Enable[bool]:Enable ext2 trigger (yes/no) 405 B:1 221 406 """ 222 407 self._cmd("ENABLE_EXT2", *args) 408 223 409 def enable_group2_lpint(self, *args): 224 """ DESC in SERVICE_DESC is empty ?! 225 B:1 410 """ 411 Dim Command 412 DESC in SERVICE_DESC is empty ?! 413 B:1 226 414 """ 227 415 self._cmd("ENABLE_GROUP2_LPINT", *args) 416 228 417 def toggle_led(self, *args): 229 """ toggle led 230 418 """ 419 Dim Command 420 toggle led 421 231 422 """ 232 423 self._cmd("TOGGLE_LED", *args) 424 233 425 def counter(self): 234 """ Communication statistics to or from FTM control and FTM|NumHeaders[int]:Num. of headers (any header) received by ftm control|NumStaticData[int]:Num. of static data blocks (ftm and ftu settings)|NumDynamicData[int]:Num. of dynamic data blocks (e.g. rates)|NumFtuList[int]:Num. of FTU list (FTU identifiers, answer from ping)|NumErrors[int]:Num. of error messages|NumRegister[int]:Num. of answers from a single register accesess 235 I:1;I:1;I:1;I:1;I:1;I:1 426 """ 427 Dim Service 428 Communication statistics to or from FTM control and FTM 429 NumHeaders[int]:Num. of headers (any header) received by ftm control 430 NumStaticData[int]:Num. of static data blocks (ftm and ftu settings) 431 NumDynamicData[int]:Num. of dynamic data blocks (e.g. rates) 432 NumFtuList[int]:Num. of FTU list (FTU identifiers, answer from ping) 433 NumErrors[int]:Num. of error messages 434 NumRegister[int]:Num. of answers from a single register accesess 435 I:1;I:1;I:1;I:1;I:1;I:1 236 436 """ 237 437 return self._get("COUNTER") 438 238 439 def enable_patch(self, *args): 239 """ DESC in SERVICE_DESC is empty ?! 240 S:1 440 """ 441 Dim Command 442 DESC in SERVICE_DESC is empty ?! 443 S:1 241 444 """ 242 445 self._cmd("ENABLE_PATCH", *args) 446 243 447 def set_dead_time(self, *args): 244 """ |dead_time[int]:The applied dead time is: dead_time*4ns+8ns 245 I:1 448 """ 449 Dim Command 450 dead_time[int]:The applied dead time is: dead_time*4ns+8ns 451 I:1 246 452 """ 247 453 self._cmd("SET_DEAD_TIME", *args) 454 248 455 def enable_trigger(self, *args): 249 """ Switch on the physics trigger|Enable[bool]:Enable physics trigger (yes/no) 250 B:1 456 """ 457 Dim Command 458 Switch on the physics trigger 459 Enable[bool]:Enable physics trigger (yes/no) 460 B:1 251 461 """ 252 462 self._cmd("ENABLE_TRIGGER", *args) 463 253 464 def set_verbose(self, *args): 254 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 255 B 465 """ 466 Dim Command 467 set verbosity state 468 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 469 B 256 470 """ 257 471 self._cmd("SET_VERBOSE", *args) 472 258 473 def message(self): 259 """ A general logging service providing a quality of service (severity)|Message[string]:The message 260 C 474 """ 475 Dim Service 476 A general logging service providing a quality of service (severity) 477 Message[string]:The message 478 C 261 479 """ 262 480 return self._get("MESSAGE") 481 263 482 def set_trigger_delay(self, *args): 264 """ |delay[int]:The applied trigger delay is: delay*4ns+8ns 265 I:1 483 """ 484 Dim Command 485 delay[int]:The applied trigger delay is: delay*4ns+8ns 486 I:1 266 487 """ 267 488 self._cmd("SET_TRIGGER_DELAY", *args) 489 268 490 def reset_camera(self, *args): 269 """ Reset all crates. The commands are sent in the order 0,1,2,3 270 491 """ 492 Dim Command 493 Reset all crates. The commands are sent in the order 0,1,2,3 494 271 495 """ 272 496 self._cmd("RESET_CAMERA", *args) 497 273 498 def stop_trigger(self, *args): 274 """ stop a run (stop distributing triggers) 275 499 """ 500 Dim Command 501 stop a run (stop distributing triggers) 502 276 503 """ 277 504 self._cmd("STOP_TRIGGER", *args) 505 278 506 def set_hex_output(self, *args): 279 """ enable or disable hex output for received data|hexout[bool]:disable or enable hex output for received data (yes/no) 280 B 507 """ 508 Dim Command 509 enable or disable hex output for received data 510 hexout[bool]:disable or enable hex output for received data (yes/no) 511 B 281 512 """ 282 513 self._cmd("SET_HEX_OUTPUT", *args) 514 283 515 def set_prescaling(self, *args): 284 """ Sets the FTU readout time intervals|time[0.5s]:The interval is given in units of 0.5s, i.e. 1 means 0.5s, 2 means 1s, ... 285 I:1 516 """ 517 Dim Command 518 Sets the FTU readout time intervals 519 time[0.5s]:The interval is given in units of 0.5s, i.e. 1 means 0.5s, 2 means 1s, ... 520 I:1 286 521 """ 287 522 self._cmd("SET_PRESCALING", *args) 523 288 524 def ping(self, *args): 289 """ send ping 290 525 """ 526 Dim Command 527 send ping 528 291 529 """ 292 530 self._cmd("PING", *args) 531 293 532 def static_data(self): 294 """ Configuration of FTM and FTUs|FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled|GeneralSettings[bitpattern]:Status of the FTM settings (cf. FTM doc)|LEDStatus[bitpattern]:Not Used|ActiveFTU[bitpattern]:List of enabled FTUs|TriggerInterval[bitpattern]:Period of cal. and ped. events (cf. FTM doc)|TriggerSeq[int]:Sequence of calib. and pedestal events (LPint, LPext, Ped)|LPSettings[bitpattern]:Settings of LP, enabled int, ext, intensity int, ext|PhysTrigMult[int]:N for N out of 40 logic on FTM (Physics)|CalibTrigMult[int]: N for N out of 40 logic on FTM (Calib)|PhysTrigWindow[ns]:Coincidence window for N out of 40 (Physics)|CalibTrigWindow[ns]:Coincidence window for N out of 40 (Calib)|TrigDelay[ns]:Trigger delay applied on FTM|TMDelay[ns]:TM delay applied on FTM|DeadTime[ns]:Dead time applied after each event on the FTM|ClkCond[bitpattern]:Clock conditionner settings on the FTM (DRS sampling freq.)|PixEnabled[bitpattern]:Enabled pixels, pckd in 90 shorts (160*9bits=180bytes)|PatchThresh[DACcounts]:Threshold of the trigger patches|Multiplicity[DACcounts]:N out of 4 logic settings per FTU|Prescaling[500ms]:Update rate of the rate counter 295 X:1;S:1;S:1;X:1;S:1;S:3;C:4;S:1;S:1;S:1;S:1;S:1;S:1;I:1;I:8;S:90;S:160;S:40;S:40 533 """ 534 Dim Service 535 Configuration of FTM and FTUs 536 FTMtimeStamp[us]:Time in microseconds, since trigger enabled or disabled 537 GeneralSettings[bitpattern]:Status of the FTM settings (cf. FTM doc) 538 LEDStatus[bitpattern]:Not Used 539 ActiveFTU[bitpattern]:List of enabled FTUs 540 TriggerInterval[bitpattern]:Period of cal. and ped. events (cf. FTM doc) 541 TriggerSeq[int]:Sequence of calib. and pedestal events (LPint, LPext, Ped) 542 LPSettings[bitpattern]:Settings of LP, enabled int, ext, intensity int, ext 543 PhysTrigMult[int]:N for N out of 40 logic on FTM (Physics) 544 CalibTrigMult[int]: N for N out of 40 logic on FTM (Calib) 545 PhysTrigWindow[ns]:Coincidence window for N out of 40 (Physics) 546 CalibTrigWindow[ns]:Coincidence window for N out of 40 (Calib) 547 TrigDelay[ns]:Trigger delay applied on FTM 548 TMDelay[ns]:TM delay applied on FTM 549 DeadTime[ns]:Dead time applied after each event on the FTM 550 ClkCond[bitpattern]:Clock conditionner settings on the FTM (DRS sampling freq.) 551 PixEnabled[bitpattern]:Enabled pixels, pckd in 90 shorts (160*9bits=180bytes) 552 PatchThresh[DACcounts]:Threshold of the trigger patches 553 Multiplicity[DACcounts]:N out of 4 logic settings per FTU 554 Prescaling[500ms]:Update rate of the rate counter 555 X:1;S:1;S:1;X:1;S:1;S:3;C:4;S:1;S:1;S:1;S:1;S:1;S:1;I:1;I:8;S:90;S:160;S:40;S:40 296 556 """ 297 557 return self._get("STATIC_DATA") 558 298 559 def error(self): 299 """ DESC in SERVICE_DESC is empty ?! 300 X:1;S:1;S:28 560 """ 561 Dim Service 562 DESC in SERVICE_DESC is empty ?! 563 X:1;S:1;S:28 301 564 """ 302 565 return self._get("ERROR") 566 303 567 def start_trigger(self, *args): 304 """ start a run (start distributing triggers) 305 568 """ 569 Dim Command 570 start a run (start distributing triggers) 571 306 572 """ 307 573 self._cmd("START_TRIGGER", *args) 574 308 575 def get_register(self, *args): 309 """ read register from address addr|addr[short]:Address of register 310 I 576 """ 577 Dim Command 578 read register from address addr 579 addr[short]:Address of register 580 I 311 581 """ 312 582 self._cmd("GET_REGISTER", *args) 583 313 584 def disconnect(self, *args): 314 """ disconnect from ethernet 315 585 """ 586 Dim Command 587 disconnect from ethernet 588 316 589 """ 317 590 self._cmd("DISCONNECT", *args) 591 318 592 def disable_all_pixels_except(self, *args): 319 """ DESC in SERVICE_DESC is empty ?! 320 S:1 593 """ 594 Dim Command 595 DESC in SERVICE_DESC is empty ?! 596 S:1 321 597 """ 322 598 self._cmd("DISABLE_ALL_PIXELS_EXCEPT", *args) 599 323 600 def set_trigger_sequence(self, *args): 324 """ Setup the sequence of artificial triggers produced by the FTM|Ped[short]:number of pedestal triggers in a row|LPext[short]:number of triggers of the external light pulser|LPint[short]:number of triggers of the internal light pulser 325 S:3 601 """ 602 Dim Command 603 Setup the sequence of artificial triggers produced by the FTM 604 Ped[short]:number of pedestal triggers in a row 605 LPext[short]:number of triggers of the external light pulser 606 LPint[short]:number of triggers of the internal light pulser 607 S:3 326 608 """ 327 609 self._cmd("SET_TRIGGER_SEQUENCE", *args) 610 328 611 def set_dynamic_output(self, *args): 329 """ enable or disable output for received dynamic data (data is still broadcasted via Dim)|dynout[bool]:disable or enable output for dynamic data (yes/no) 330 B 612 """ 613 Dim Command 614 enable or disable output for received dynamic data (data is still broadcasted via Dim) 615 dynout[bool]:disable or enable output for dynamic data (yes/no) 616 B 331 617 """ 332 618 self._cmd("SET_DYNAMIC_OUTPUT", *args) 619 333 620 def disable_patch(self, *args): 334 """ DESC in SERVICE_DESC is empty ?! 335 S:1 621 """ 622 Dim Command 623 DESC in SERVICE_DESC is empty ?! 624 S:1 336 625 """ 337 626 self._cmd("DISABLE_PATCH", *args) 627 338 628 def set_clock_frequency(self, *args): 339 """ DESC in SERVICE_DESC is empty ?! 340 S:1 629 """ 630 Dim Command 631 DESC in SERVICE_DESC is empty ?! 632 S:1 341 633 """ 342 634 self._cmd("SET_CLOCK_FREQUENCY", *args) 635 343 636 def request_dynamic_data(self, *args): 344 """ request transmission of dynamic data block 345 637 """ 638 Dim Command 639 request transmission of dynamic data block 640 346 641 """ 347 642 self._cmd("REQUEST_DYNAMIC_DATA", *args) 643 348 644 def set_intensity_lpint(self, *args): 349 """ DESC in SERVICE_DESC is empty ?! 350 S:1 645 """ 646 Dim Command 647 DESC in SERVICE_DESC is empty ?! 648 S:1 351 649 """ 352 650 self._cmd("SET_INTENSITY_LPINT", *args) 651 353 652 class RATE_SCAN ( FactDimServer): 354 653 def process_data(self): 355 """ Rate scan process data|min[DAC]:Value at which scan was started|max[DAC]:Value at which scan will end|step[DAC]:Step size for scan 356 I:1;I:1;I:1 654 """ 655 Dim Service 656 Rate scan process data 657 min[DAC]:Value at which scan was started 658 max[DAC]:Value at which scan will end 659 step[DAC]:Step size for scan 660 I:1;I:1;I:1 357 661 """ 358 662 return self._get("PROCESS_DATA") 663 359 664 def state(self): 360 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 361 C 665 """ 666 Dim Service 667 Provides the state of the state machine as quality of service. 668 Text[string]:A human readable string sent by the last state change. 669 C 362 670 """ 363 671 return self._get("STATE") 672 364 673 def service_desc(self): 365 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 366 C 674 """ 675 Dim Service 676 Descriptions of services or commands and there arguments 677 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 678 C 367 679 """ 368 680 return self._get("SERVICE_DESC") 681 369 682 def service_list(self): 370 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 371 C 683 """ 684 Dim Service 685 Native Dim service: List of services, commands and formats 686 ServiceList[string]:For details see the Dim manual. 687 C 372 688 """ 373 689 return self._get("SERVICE_LIST") 690 374 691 def start_threshold_scan(self, *args): 375 """ Start rate scan for the threshold in the defined range|min[int]:Start value in DAC counts|max[int]:Limiting value in DAC counts|step[int]:Single step in DAC counts 376 I:3 692 """ 693 Dim Command 694 Start rate scan for the threshold in the defined range 695 min[int]:Start value in DAC counts 696 max[int]:Limiting value in DAC counts 697 step[int]:Single step in DAC counts 698 I:3 377 699 """ 378 700 self._cmd("START_THRESHOLD_SCAN", *args) 701 379 702 def print_cmd(self, *args): 380 """ DESC in SERVICE_DESC is empty ?! 381 703 """ 704 Dim Command 705 DESC in SERVICE_DESC is empty ?! 706 382 707 """ 383 708 self._cmd("PRINT_CMD", *args) 709 384 710 def client_list(self): 385 """ Native Dim service: A list of all connected clients 386 C 711 """ 712 Dim Service 713 Native Dim service: A list of all connected clients 714 C 387 715 """ 388 716 return self._get("CLIENT_LIST") 717 389 718 def set_reference_patch(self, *args): 390 """ Use the given patch trigger-rate as reference for the reolution|patch[idx]:Index of the patch (360*crate+36*board+patch) 391 I:1 719 """ 720 Dim Command 721 Use the given patch trigger-rate as reference for the reolution 722 patch[idx]:Index of the patch (360*crate+36*board+patch) 723 I:1 392 724 """ 393 725 self._cmd("SET_REFERENCE_PATCH", *args) 726 394 727 def exit(self, *args): 395 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 396 L:1 728 """ 729 Dim Command 730 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 731 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 732 L:1 397 733 """ 398 734 self._cmd("EXIT", *args) 735 399 736 def change_step_size(self, *args): 400 """ Change the step size during a ratescan in progress|step[int]:Single step in DAC counts 401 I:1 737 """ 738 Dim Command 739 Change the step size during a ratescan in progress 740 step[int]:Single step in DAC counts 741 I:1 402 742 """ 403 743 self._cmd("CHANGE_STEP_SIZE", *args) 744 404 745 def data(self): 405 """ |Id[s]:Start time used to identify measurement (UnixTime)|Threshold[dac]:Threshold in DAC counts|ElapsedTime[s]:Real elapsed time|RelOnTime[ratio]:Relative on time|TriggerRate[Hz]:Camera trigger rate|BoardRate[Hz]:Board trigger rates|PatchRate[Hz]:Patch trigger rates 406 X:1;I:1;F:1;F:1;F:1;F:40;F:160 746 """ 747 Dim Service 748 Id[s]:Start time used to identify measurement (UnixTime) 749 Threshold[dac]:Threshold in DAC counts 750 ElapsedTime[s]:Real elapsed time 751 RelOnTime[ratio]:Relative on time 752 TriggerRate[Hz]:Camera trigger rate 753 BoardRate[Hz]:Board trigger rates 754 PatchRate[Hz]:Patch trigger rates 755 X:1;I:1;F:1;F:1;F:1;F:40;F:160 407 756 """ 408 757 return self._get("DATA") 758 409 759 def stop(self, *args): 410 """ Stop a ratescan in progress 411 760 """ 761 Dim Command 762 Stop a ratescan in progress 763 412 764 """ 413 765 self._cmd("STOP", *args) 766 414 767 def message(self): 415 """ A general logging service providing a quality of service (severity)|Message[string]:The message 416 C 768 """ 769 Dim Service 770 A general logging service providing a quality of service (severity) 771 Message[string]:The message 772 C 417 773 """ 418 774 return self._get("MESSAGE") 775 419 776 def start_n_out_of_4_scan(self, *args): 420 """ Start rate scan for N-out-of-4 in the defined range|min[int]:Start value in DAC counts|max[int]:Limiting value in DAC counts|step[int]:Single step in DAC counts 421 I:3 777 """ 778 Dim Command 779 Start rate scan for N-out-of-4 in the defined range 780 min[int]:Start value in DAC counts 781 max[int]:Limiting value in DAC counts 782 step[int]:Single step in DAC counts 783 I:3 422 784 """ 423 785 self._cmd("START_N_OUT_OF_4_SCAN", *args) 786 424 787 def change_maximum(self, *args): 425 """ Change the maximum limit during a ratescan in progress|max[int]:Limiting value in DAC counts 426 I:1 788 """ 789 Dim Command 790 Change the maximum limit during a ratescan in progress 791 max[int]:Limiting value in DAC counts 792 I:1 427 793 """ 428 794 self._cmd("CHANGE_MAXIMUM", *args) 795 429 796 def state_list(self): 430 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 431 C 797 """ 798 Dim Service 799 Provides a list with descriptions for each service. 800 StateList[string]:A \n separated list of the form id:name=description 801 C 432 802 """ 433 803 return self._get("STATE_LIST") 804 434 805 def version_number(self): 435 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 436 L 806 """ 807 Dim Service 808 Native Dim service: Version number of Dim in use 809 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 810 L 437 811 """ 438 812 return self._get("VERSION_NUMBER") 813 439 814 def set_reference_board(self, *args): 440 """ Use the given board trigger-rate as reference for the reolution|board[idx]:Index of the board (4*crate+board) 441 I:1 815 """ 816 Dim Command 817 Use the given board trigger-rate as reference for the reolution 818 board[idx]:Index of the board (4*crate+board) 819 I:1 442 820 """ 443 821 self._cmd("SET_REFERENCE_BOARD", *args) 822 444 823 def set_reference_camera(self, *args): 445 """ Use the camera trigger rate as reference for the reolution 446 824 """ 825 Dim Command 826 Use the camera trigger rate as reference for the reolution 827 447 828 """ 448 829 self._cmd("SET_REFERENCE_CAMERA", *args) 830 449 831 class RATE_CONTROL ( FactDimServer): 450 832 def state(self): 451 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 452 C 833 """ 834 Dim Service 835 Provides the state of the state machine as quality of service. 836 Text[string]:A human readable string sent by the last state change. 837 C 453 838 """ 454 839 return self._get("STATE") 840 455 841 def client_list(self): 456 """ Native Dim service: A list of all connected clients 457 C 842 """ 843 Dim Service 844 Native Dim service: A list of all connected clients 845 C 458 846 """ 459 847 return self._get("CLIENT_LIST") 848 460 849 def stop(self, *args): 461 """ Stop a calibration or ratescan in progress 462 850 """ 851 Dim Command 852 Stop a calibration or ratescan in progress 853 463 854 """ 464 855 self._cmd("STOP", *args) 856 465 857 def service_list(self): 466 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 467 C 858 """ 859 Dim Service 860 Native Dim service: List of services, commands and formats 861 ServiceList[string]:For details see the Dim manual. 862 C 468 863 """ 469 864 return self._get("SERVICE_LIST") 865 470 866 def state_list(self): 471 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 472 C 867 """ 868 Dim Service 869 Provides a list with descriptions for each service. 870 StateList[string]:A \n separated list of the form id:name=description 871 C 473 872 """ 474 873 return self._get("STATE_LIST") 874 475 875 def message(self): 476 """ A general logging service providing a quality of service (severity)|Message[string]:The message 477 C 876 """ 877 Dim Service 878 A general logging service providing a quality of service (severity) 879 Message[string]:The message 880 C 478 881 """ 479 882 return self._get("MESSAGE") 883 480 884 def print_cmd(self, *args): 481 """ Print current status 482 885 """ 886 Dim Command 887 Print current status 888 483 889 """ 484 890 self._cmd("PRINT_CMD", *args) 891 485 892 def calibrate(self, *args): 486 """ Start a search for a reasonable minimum global threshold 487 893 """ 894 Dim Command 895 Start a search for a reasonable minimum global threshold 896 488 897 """ 489 898 self._cmd("CALIBRATE", *args) 899 490 900 def service_desc(self): 491 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 492 C 901 """ 902 Dim Service 903 Descriptions of services or commands and there arguments 904 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 905 C 493 906 """ 494 907 return self._get("SERVICE_DESC") 908 495 909 def set_verbose(self, *args): 496 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 497 B 910 """ 911 Dim Command 912 set verbosity state 913 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 914 B 498 915 """ 499 916 self._cmd("SET_VERBOSE", *args) 917 500 918 def set_target_rate(self, *args): 501 """ Set a target trigger rate for the calibration 502 F:1 919 """ 920 Dim Command 921 Set a target trigger rate for the calibration 922 F:1 503 923 """ 504 924 self._cmd("SET_TARGET_RATE", *args) 925 505 926 def exit(self, *args): 506 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 507 L:1 927 """ 928 Dim Command 929 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 930 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 931 L:1 508 932 """ 509 933 self._cmd("EXIT", *args) 934 510 935 def threshold(self): 511 """ Resulting threshold after calibration|threshold[dac]:Resulting threshold from calibration 512 S:1 936 """ 937 Dim Service 938 Resulting threshold after calibration 939 threshold[dac]:Resulting threshold from calibration 940 S:1 513 941 """ 514 942 return self._get("THRESHOLD") 943 515 944 def set_min_threshold(self, *args): 516 """ Set a minimum threshold at which th rate control starts calibrating 517 I:1 945 """ 946 Dim Command 947 Set a minimum threshold at which th rate control starts calibrating 948 I:1 518 949 """ 519 950 self._cmd("SET_MIN_THRESHOLD", *args) 951 520 952 def version_number(self): 521 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 522 L 953 """ 954 Dim Service 955 Native Dim service: Version number of Dim in use 956 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 957 L 523 958 """ 524 959 return self._get("VERSION_NUMBER") 960 525 961 class FEEDBACK ( FactDimServer): 526 962 def reference(self): 527 """ Amplitude reference value(s)Vref[mV]:Amplitude reference 528 F:416 963 """ 964 Dim Service 965 Amplitude reference value(s)Vref[mV]:Amplitude reference 966 F:416 529 967 """ 530 968 return self._get("REFERENCE") 969 531 970 def enable_output(self, *args): 532 """ Enable sending of correction values caluclated by the control loop to the biasctrl 533 B:1 971 """ 972 Dim Command 973 Enable sending of correction values caluclated by the control loop to the biasctrl 974 B:1 534 975 """ 535 976 self._cmd("ENABLE_OUTPUT", *args) 977 536 978 def version_number(self): 537 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 538 L 979 """ 980 Dim Service 981 Native Dim service: Version number of Dim in use 982 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 983 L 539 984 """ 540 985 return self._get("VERSION_NUMBER") 986 541 987 def print_calibration(self, *args): 542 """ DESC in SERVICE_DESC is empty ?! 543 988 """ 989 Dim Command 990 DESC in SERVICE_DESC is empty ?! 991 544 992 """ 545 993 self._cmd("PRINT_CALIBRATION", *args) 994 546 995 def exit(self, *args): 547 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 548 L:1 996 """ 997 Dim Command 998 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 999 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1000 L:1 549 1001 """ 550 1002 self._cmd("EXIT", *args) 1003 551 1004 def state(self): 552 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 553 C 1005 """ 1006 Dim Service 1007 Provides the state of the state machine as quality of service. 1008 Text[string]:A human readable string sent by the last state change. 1009 C 554 1010 """ 555 1011 return self._get("STATE") 1012 556 1013 def stop(self, *args): 557 """ Stop any control loop 558 1014 """ 1015 Dim Command 1016 Stop any control loop 1017 559 1018 """ 560 1019 self._cmd("STOP", *args) 1020 561 1021 def start_temp_control(self, *args): 562 """ Start the temperature control loop|offset[V]:Offset from the nominal temperature corrected value in Volts 563 F:1 1022 """ 1023 Dim Command 1024 Start the temperature control loop 1025 offset[V]:Offset from the nominal temperature corrected value in Volts 1026 F:1 564 1027 """ 565 1028 self._cmd("START_TEMP_CONTROL", *args) 1029 566 1030 def set_kp(self, *args): 567 """ Set proportional constant Kp 568 D:1 1031 """ 1032 Dim Command 1033 Set proportional constant Kp 1034 D:1 569 1035 """ 570 1036 self._cmd("SET_KP", *args) 1037 571 1038 def store_reference(self, *args): 572 """ Store the last (averaged) value as new reference (for debug purpose only) 573 1039 """ 1040 Dim Command 1041 Store the last (averaged) value as new reference (for debug purpose only) 1042 574 1043 """ 575 1044 self._cmd("STORE_REFERENCE", *args) 1045 576 1046 def service_desc(self): 577 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 578 C 1047 """ 1048 Dim Service 1049 Descriptions of services or commands and there arguments 1050 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1051 C 579 1052 """ 580 1053 return self._get("SERVICE_DESC") 1054 581 1055 def print_cmd(self, *args): 582 """ DESC in SERVICE_DESC is empty ?! 583 1056 """ 1057 Dim Command 1058 DESC in SERVICE_DESC is empty ?! 1059 584 1060 """ 585 1061 self._cmd("PRINT_CMD", *args) 1062 586 1063 def set_t(self, *args): 587 """ Set time-constant. (-1 to use the cycle time, i.e. the time for the last average cycle, instead) 588 D:1 1064 """ 1065 Dim Command 1066 Set time-constant. (-1 to use the cycle time, i.e. the time for the last average cycle, instead) 1067 D:1 589 1068 """ 590 1069 self._cmd("SET_T", *args) 1070 591 1071 def start_feedback_control(self, *args): 592 """ Start the feedback control loop|Num[short]:Number of events 'medianed' to calculate the correction value 593 S:1 1072 """ 1073 Dim Command 1074 Start the feedback control loop 1075 Num[short]:Number of events 'medianed' to calculate the correction value 1076 S:1 594 1077 """ 595 1078 self._cmd("START_FEEDBACK_CONTROL", *args) 1079 596 1080 def set_current_request_interval(self, *args): 597 """ |interval[ms]:Interval between two current requests in modes which need that. 598 1081 """ 1082 Dim Command 1083 interval[ms]:Interval between two current requests in modes which need that. 1084 599 1085 """ 600 1086 self._cmd("SET_CURRENT_REQUEST_INTERVAL", *args) 1087 601 1088 def set_reference(self, *args): 602 """ Set a new global reference value (for debug purpose only) 603 F:1 1089 """ 1090 Dim Command 1091 Set a new global reference value (for debug purpose only) 1092 F:1 604 1093 """ 605 1094 self._cmd("SET_REFERENCE", *args) 1095 606 1096 def start_global_feedback(self, *args): 607 """ Start the global feedback control loopNum[short]:Number of events averaged to calculate the correction value 608 S:1 1097 """ 1098 Dim Command 1099 Start the global feedback control loopNum[short]:Number of events averaged to calculate the correction value 1100 S:1 609 1101 """ 610 1102 self._cmd("START_GLOBAL_FEEDBACK", *args) 1103 611 1104 def deviation(self): 612 """ Control loop information|DeltaAmpl[mV]:Amplitude offset measures|DeltaBias[mV]:Correction value calculated|DeltaTemp[mV]:Correction calculated from temperature|DeltaUser[mV]:Additional offset specified by user 613 F:416;F:416;F:1;F:1 1105 """ 1106 Dim Service 1107 Control loop information 1108 DeltaAmpl[mV]:Amplitude offset measures 1109 DeltaBias[mV]:Correction value calculated 1110 DeltaTemp[mV]:Correction calculated from temperature 1111 DeltaUser[mV]:Additional offset specified by user 1112 F:416;F:416;F:1;F:1 614 1113 """ 615 1114 return self._get("DEVIATION") 1115 616 1116 def client_list(self): 617 """ Native Dim service: A list of all connected clients 618 C 1117 """ 1118 Dim Service 1119 Native Dim service: A list of all connected clients 1120 C 619 1121 """ 620 1122 return self._get("CLIENT_LIST") 1123 621 1124 def message(self): 622 """ A general logging service providing a quality of service (severity)|Message[string]:The message 623 C 1125 """ 1126 Dim Service 1127 A general logging service providing a quality of service (severity) 1128 Message[string]:The message 1129 C 624 1130 """ 625 1131 return self._get("MESSAGE") 1132 626 1133 def calibration(self): 627 """ Current offsets|Avg[uA]:Average offset|Rms[uA]:Rms of offset|R[Ohm]:Measured calibration resistor 628 F:416;F:416;F:416 1134 """ 1135 Dim Service 1136 Current offsets 1137 Avg[uA]:Average offset 1138 Rms[uA]:Rms of offset 1139 R[Ohm]:Measured calibration resistor 1140 F:416;F:416;F:416 629 1141 """ 630 1142 return self._get("CALIBRATION") 1143 631 1144 def set_kd(self, *args): 632 """ Set derivative constant Kd 633 D:1 1145 """ 1146 Dim Command 1147 Set derivative constant Kd 1148 D:1 634 1149 """ 635 1150 self._cmd("SET_KD", *args) 1151 636 1152 def set_ki(self, *args): 637 """ Set integral constant Ki 638 D:1 1153 """ 1154 Dim Command 1155 Set integral constant Ki 1156 D:1 639 1157 """ 640 1158 self._cmd("SET_KI", *args) 1159 641 1160 def start_current_control(self, *args): 642 """ Start the current/temperature control loop|offset[V]:Offset from the nominal current/temperature corrected value in Volts 643 F:1 1161 """ 1162 Dim Command 1163 Start the current/temperature control loop 1164 offset[V]:Offset from the nominal current/temperature corrected value in Volts 1165 F:1 644 1166 """ 645 1167 self._cmd("START_CURRENT_CONTROL", *args) 1168 646 1169 def calibrate_currents(self, *args): 647 """ DESC in SERVICE_DESC is empty ?! 648 1170 """ 1171 Dim Command 1172 DESC in SERVICE_DESC is empty ?! 1173 649 1174 """ 650 1175 self._cmd("CALIBRATE_CURRENTS", *args) 1176 651 1177 def state_list(self): 652 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 653 C 1178 """ 1179 Dim Service 1180 Provides a list with descriptions for each service. 1181 StateList[string]:A \n separated list of the form id:name=description 1182 C 654 1183 """ 655 1184 return self._get("STATE_LIST") 1185 656 1186 def service_list(self): 657 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 658 C 1187 """ 1188 Dim Service 1189 Native Dim service: List of services, commands and formats 1190 ServiceList[string]:For details see the Dim manual. 1191 C 659 1192 """ 660 1193 return self._get("SERVICE_LIST") 1194 661 1195 class LID_CONTROL ( FactDimServer): 662 1196 def data(self): 663 """ |status[bool]:Lid1/2 open or closed|I[A]:Lid1/2 current|P[dac]:Lid1/2 hall sensor position in averaged dac counts 664 S:2;F:2;F:2 1197 """ 1198 Dim Service 1199 status[bool]:Lid1/2 open or closed 1200 I[A]:Lid1/2 current 1201 P[dac]:Lid1/2 hall sensor position in averaged dac counts 1202 S:2;F:2;F:2 665 1203 """ 666 1204 return self._get("DATA") 1205 667 1206 def close(self, *args): 668 """ Close the lids 669 1207 """ 1208 Dim Command 1209 Close the lids 1210 670 1211 """ 671 1212 self._cmd("CLOSE", *args) 1213 672 1214 def post(self, *args): 673 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 674 C 1215 """ 1216 Dim Command 1217 set verbosity state 1218 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1219 C 675 1220 """ 676 1221 self._cmd("POST", *args) 1222 677 1223 def exit(self, *args): 678 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 679 L:1 1224 """ 1225 Dim Command 1226 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1227 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1228 L:1 680 1229 """ 681 1230 self._cmd("EXIT", *args) 1231 682 1232 def service_desc(self): 683 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 684 C 1233 """ 1234 Dim Service 1235 Descriptions of services or commands and there arguments 1236 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1237 C 685 1238 """ 686 1239 return self._get("SERVICE_DESC") 1240 687 1241 def version_number(self): 688 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 689 L 1242 """ 1243 Dim Service 1244 Native Dim service: Version number of Dim in use 1245 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1246 L 690 1247 """ 691 1248 return self._get("VERSION_NUMBER") 1249 692 1250 def state_list(self): 693 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 694 C 1251 """ 1252 Dim Service 1253 Provides a list with descriptions for each service. 1254 StateList[string]:A \n separated list of the form id:name=description 1255 C 695 1256 """ 696 1257 return self._get("STATE_LIST") 1258 697 1259 def open(self, *args): 698 """ Open the lids 699 1260 """ 1261 Dim Command 1262 Open the lids 1263 700 1264 """ 701 1265 self._cmd("OPEN", *args) 1266 702 1267 def service_list(self): 703 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 704 C 1268 """ 1269 Dim Service 1270 Native Dim service: List of services, commands and formats 1271 ServiceList[string]:For details see the Dim manual. 1272 C 705 1273 """ 706 1274 return self._get("SERVICE_LIST") 1275 707 1276 def message(self): 708 """ A general logging service providing a quality of service (severity)|Message[string]:The message 709 C 1277 """ 1278 Dim Service 1279 A general logging service providing a quality of service (severity) 1280 Message[string]:The message 1281 C 710 1282 """ 711 1283 return self._get("MESSAGE") 1284 712 1285 def client_list(self): 713 """ Native Dim service: A list of all connected clients 714 C 1286 """ 1287 Dim Service 1288 Native Dim service: A list of all connected clients 1289 C 715 1290 """ 716 1291 return self._get("CLIENT_LIST") 1292 717 1293 def set_verbose(self, *args): 718 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 719 B 1294 """ 1295 Dim Command 1296 set verbosity state 1297 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1298 B 720 1299 """ 721 1300 self._cmd("SET_VERBOSE", *args) 1301 722 1302 def state(self): 723 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 724 C 1303 """ 1304 Dim Service 1305 Provides the state of the state machine as quality of service. 1306 Text[string]:A human readable string sent by the last state change. 1307 C 725 1308 """ 726 1309 return self._get("STATE") 1310 727 1311 class FSC_CONTROL ( FactDimServer): 728 1312 def state_list(self): 729 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 730 C 1313 """ 1314 Dim Service 1315 Provides a list with descriptions for each service. 1316 StateList[string]:A \n separated list of the form id:name=description 1317 C 731 1318 """ 732 1319 return self._get("STATE_LIST") 1320 733 1321 def state(self): 734 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 735 C 1322 """ 1323 Dim Service 1324 Provides the state of the state machine as quality of service. 1325 Text[string]:A human readable string sent by the last state change. 1326 C 736 1327 """ 737 1328 return self._get("STATE") 1329 738 1330 def exit(self, *args): 739 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 740 L:1 1331 """ 1332 Dim Command 1333 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1334 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1335 L:1 741 1336 """ 742 1337 self._cmd("EXIT", *args) 1338 743 1339 def voltage(self): 744 """ |t[s]:FSC uptime|FAD_Ud[V]:FAD digital (crate 0-3)|FAD_Up[V]:FAD positive (crate 0-3)|FAD_Un[V]:FAD negative (crate 0-3)|FPA_Ud[V]:FPA digital (crate 0-3)|FPA_Up[V]:FPA positive (crate 0-3)|FPA_Un[V]:FPA negative (crate 0-3)|ETH_U[V]:Ethernet switch (pos/neg)|FTM_U[V]:FTM - trigger master (pos/neg)|FFC_U[V]:FFC|FLP_U[V]:FLP - light pulser 745 F:1;F:4;F:4;F:4;F:4;F:4;F:4;F:2;F:2;F:1;F:1 1340 """ 1341 Dim Service 1342 t[s]:FSC uptime 1343 FAD_Ud[V]:FAD digital (crate 0-3) 1344 FAD_Up[V]:FAD positive (crate 0-3) 1345 FAD_Un[V]:FAD negative (crate 0-3) 1346 FPA_Ud[V]:FPA digital (crate 0-3) 1347 FPA_Up[V]:FPA positive (crate 0-3) 1348 FPA_Un[V]:FPA negative (crate 0-3) 1349 ETH_U[V]:Ethernet switch (pos/neg) 1350 FTM_U[V]:FTM - trigger master (pos/neg) 1351 FFC_U[V]:FFC 1352 FLP_U[V]:FLP - light pulser 1353 F:1;F:4;F:4;F:4;F:4;F:4;F:4;F:2;F:2;F:1;F:1 746 1354 """ 747 1355 return self._get("VOLTAGE") 1356 748 1357 def current(self): 749 """ |t[s]:FSC uptime|FAD_Id[A]:FAD digital (crate 0-3)|FAD_Ip[A]:FAD positive (crate 0-3)|FAD_In[A]:FAD negative (crate 0-3)|FPA_Id[A]:FPA digital (crate 0-3)|FPA_Ip[A]:FPA positive (crate 0-3)|FPA_In[A]:FPA negative (crate 0-3)|ETH_I[A]:Ethernet switch (pos/neg)|FTM_I[A]:FTM - trigger master (pos/neg)|FFC_I[A]:FFC|FLP_I[A]:FLP - light pulser 750 F:1;F:4;F:4;F:4;F:4;F:4;F:4;F:2;F:2;F:1;F:1 1358 """ 1359 Dim Service 1360 t[s]:FSC uptime 1361 FAD_Id[A]:FAD digital (crate 0-3) 1362 FAD_Ip[A]:FAD positive (crate 0-3) 1363 FAD_In[A]:FAD negative (crate 0-3) 1364 FPA_Id[A]:FPA digital (crate 0-3) 1365 FPA_Ip[A]:FPA positive (crate 0-3) 1366 FPA_In[A]:FPA negative (crate 0-3) 1367 ETH_I[A]:Ethernet switch (pos/neg) 1368 FTM_I[A]:FTM - trigger master (pos/neg) 1369 FFC_I[A]:FFC 1370 FLP_I[A]:FLP - light pulser 1371 F:1;F:4;F:4;F:4;F:4;F:4;F:4;F:2;F:2;F:1;F:1 751 1372 """ 752 1373 return self._get("CURRENT") 1374 753 1375 def client_list(self): 754 """ Native Dim service: A list of all connected clients 755 C 1376 """ 1377 Dim Service 1378 Native Dim service: A list of all connected clients 1379 C 756 1380 """ 757 1381 return self._get("CLIENT_LIST") 1382 758 1383 def service_list(self): 759 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 760 C 1384 """ 1385 Dim Service 1386 Native Dim service: List of services, commands and formats 1387 ServiceList[string]:For details see the Dim manual. 1388 C 761 1389 """ 762 1390 return self._get("SERVICE_LIST") 1391 763 1392 def service_desc(self): 764 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 765 C 1393 """ 1394 Dim Service 1395 Descriptions of services or commands and there arguments 1396 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1397 C 766 1398 """ 767 1399 return self._get("SERVICE_DESC") 1400 768 1401 def version_number(self): 769 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 770 L 1402 """ 1403 Dim Service 1404 Native Dim service: Version number of Dim in use 1405 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1406 L 771 1407 """ 772 1408 return self._get("VERSION_NUMBER") 1409 773 1410 def disconnect(self, *args): 774 """ disconnect from ethernet 775 1411 """ 1412 Dim Command 1413 disconnect from ethernet 1414 776 1415 """ 777 1416 self._cmd("DISCONNECT", *args) 1417 778 1418 def dump_stream(self, *args): 779 """ DESC in SERVICE_DESC is empty ?! 780 B:1 1419 """ 1420 Dim Command 1421 DESC in SERVICE_DESC is empty ?! 1422 B:1 781 1423 """ 782 1424 self._cmd("DUMP_STREAM", *args) 1425 783 1426 def humidity(self): 784 """ |t[s]:FSC uptime|H[%]:Humidity sensors readout 785 F:1;F:4 1427 """ 1428 Dim Service 1429 t[s]:FSC uptime 1430 H[%]:Humidity sensors readout 1431 F:1;F:4 786 1432 """ 787 1433 return self._get("HUMIDITY") 1434 788 1435 def temperature(self): 789 """ |t[s]:FSC uptime|T_sens[deg C]:Sensor compartment temperatures|T_crate[deg C]:Temperatures crate 0 (back/front), 1 (b/f), 2 (b/f), 3 (b/f)|T_ps[deg C]:Temp power supplies crate 0 (back/front), 1, 2, 3|T_aux[deg C]:Auxiliary power supply temperatures FTM (top/bottom), FSC (t/b)|T_back[deg C]:FTM backpanel temperatures FTM (top/bottom), FSC (top/bottom)|T_eth[deg C]:Ethernet switches temperatures top (front/back), bottom (f/b) 790 F:1;F:31;F:8;F:8;F:4;F:4;F:4 1436 """ 1437 Dim Service 1438 t[s]:FSC uptime 1439 T_sens[deg C]:Sensor compartment temperatures 1440 T_crate[deg C]:Temperatures crate 0 (back/front), 1 (b/f), 2 (b/f), 3 (b/f) 1441 T_ps[deg C]:Temp power supplies crate 0 (back/front), 1, 2, 3 1442 T_aux[deg C]:Auxiliary power supply temperatures FTM (top/bottom), FSC (t/b) 1443 T_back[deg C]:FTM backpanel temperatures FTM (top/bottom), FSC (top/bottom) 1444 T_eth[deg C]:Ethernet switches temperatures top (front/back), bottom (f/b) 1445 F:1;F:31;F:8;F:8;F:4;F:4;F:4 791 1446 """ 792 1447 return self._get("TEMPERATURE") 1448 793 1449 def set_verbose(self, *args): 794 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 795 B:1 1450 """ 1451 Dim Command 1452 set verbosity state 1453 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1454 B:1 796 1455 """ 797 1456 self._cmd("SET_VERBOSE", *args) 1457 798 1458 def reconnect(self, *args): 799 """ (Re)connect ethernet connection to FTM, a new address can be given|[host][string]:new ethernet address in the form <host:port> 800 O 1459 """ 1460 Dim Command 1461 (Re)connect ethernet connection to FTM, a new address can be given 1462 [host][string]:new ethernet address in the form <host:port> 1463 O 801 1464 """ 802 1465 self._cmd("RECONNECT", *args) 1466 803 1467 def message(self): 804 """ A general logging service providing a quality of service (severity)|Message[string]:The message 805 C 1468 """ 1469 Dim Service 1470 A general logging service providing a quality of service (severity) 1471 Message[string]:The message 1472 C 806 1473 """ 807 1474 return self._get("MESSAGE") 1475 808 1476 class PWR_CONTROL ( FactDimServer): 809 1477 def set_verbose(self, *args): 810 """ Set verbosity state|verbosity[bool]:disable or enable verbosity for interpreted data (yes/no) 811 B:1 1478 """ 1479 Dim Command 1480 Set verbosity state 1481 verbosity[bool]:disable or enable verbosity for interpreted data (yes/no) 1482 B:1 812 1483 """ 813 1484 self._cmd("SET_VERBOSE", *args) 1485 814 1486 def camera_power(self, *args): 815 """ Switch camera power|power[bool]:Switch camera power 'on' or 'off' 816 B:1 1487 """ 1488 Dim Command 1489 Switch camera power 1490 power[bool]:Switch camera power 'on' or 'off' 1491 B:1 817 1492 """ 818 1493 self._cmd("CAMERA_POWER", *args) 1494 819 1495 def set_debug_rx(self, *args): 820 """ Set debux-rx state|debug[bool]:dump received text and parsed text to console (yes/no) 821 B:1 1496 """ 1497 Dim Command 1498 Set debux-rx state 1499 debug[bool]:dump received text and parsed text to console (yes/no) 1500 B:1 822 1501 """ 823 1502 self._cmd("SET_DEBUG_RX", *args) 1503 824 1504 def version_number(self): 825 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 826 L 1505 """ 1506 Dim Service 1507 Native Dim service: Version number of Dim in use 1508 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1509 L 827 1510 """ 828 1511 return self._get("VERSION_NUMBER") 1512 829 1513 def service_desc(self): 830 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 831 C 1514 """ 1515 Dim Service 1516 Descriptions of services or commands and there arguments 1517 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1518 C 832 1519 """ 833 1520 return self._get("SERVICE_DESC") 1521 834 1522 def exit(self, *args): 835 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 836 L:1 1523 """ 1524 Dim Command 1525 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1526 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1527 L:1 837 1528 """ 838 1529 self._cmd("EXIT", *args) 1530 839 1531 def toggle_drive(self, *args): 840 """ Toggle drive power 841 1532 """ 1533 Dim Command 1534 Toggle drive power 1535 842 1536 """ 843 1537 self._cmd("TOGGLE_DRIVE", *args) 1538 844 1539 def state(self): 845 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 846 C 1540 """ 1541 Dim Service 1542 Provides the state of the state machine as quality of service. 1543 Text[string]:A human readable string sent by the last state change. 1544 C 847 1545 """ 848 1546 return self._get("STATE") 1547 849 1548 def client_list(self): 850 """ Native Dim service: A list of all connected clients 851 C 1549 """ 1550 Dim Service 1551 Native Dim service: A list of all connected clients 1552 C 852 1553 """ 853 1554 return self._get("CLIENT_LIST") 1555 854 1556 def data(self): 855 """ |water_lvl[bool]:Water level ok|water_flow[bool]:Water flowing|pwr_24V[bool]:24V power enabled|pwr_pump[bool]:Pump power enabled|pwr_bias[bool]:Bias power enabled|pwr_drive[bool]:Drive power enabled (command value)|main_drive[bool]:Drive manual main switch on|feedback_drive[bool]:Drive power on (feedback value) 856 C:1;C:1;C:1;C:1;C:1;C:1;C:1;C:1 1557 """ 1558 Dim Service 1559 water_lvl[bool]:Water level ok 1560 water_flow[bool]:Water flowing 1561 pwr_24V[bool]:24V power enabled 1562 pwr_pump[bool]:Pump power enabled 1563 pwr_bias[bool]:Bias power enabled 1564 pwr_drive[bool]:Drive power enabled (command value) 1565 main_drive[bool]:Drive manual main switch on 1566 feedback_drive[bool]:Drive power on (feedback value) 1567 C:1;C:1;C:1;C:1;C:1;C:1;C:1;C:1 857 1568 """ 858 1569 return self._get("DATA") 1570 859 1571 def service_list(self): 860 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 861 C 1572 """ 1573 Dim Service 1574 Native Dim service: List of services, commands and formats 1575 ServiceList[string]:For details see the Dim manual. 1576 C 862 1577 """ 863 1578 return self._get("SERVICE_LIST") 1579 864 1580 def post(self, *args): 865 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 866 C 1581 """ 1582 Dim Command 1583 set verbosity state 1584 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1585 C 867 1586 """ 868 1587 self._cmd("POST", *args) 1588 869 1589 def message(self): 870 """ A general logging service providing a quality of service (severity)|Message[string]:The message 871 C 1590 """ 1591 Dim Service 1592 A general logging service providing a quality of service (severity) 1593 Message[string]:The message 1594 C 872 1595 """ 873 1596 return self._get("MESSAGE") 1597 874 1598 def state_list(self): 875 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 876 C 1599 """ 1600 Dim Service 1601 Provides a list with descriptions for each service. 1602 StateList[string]:A \n separated list of the form id:name=description 1603 C 877 1604 """ 878 1605 return self._get("STATE_LIST") 1606 879 1607 class DATA_LOGGER ( FactDimServer): 880 1608 def filename_run(self): 881 """ Path and base name used for the run files.|Type[int]:type of open files (1=log, 2=rep, 4=fits)|Name[string]:path and base file name 882 I:1;C 1609 """ 1610 Dim Service 1611 Path and base name used for the run files. 1612 Type[int]:type of open files (1=log, 2=rep, 4=fits) 1613 Name[string]:path and base file name 1614 I:1;C 883 1615 """ 884 1616 return self._get("FILENAME_RUN") 1617 885 1618 def stop(self, *args): 886 """ Stop all data logging, close all files. 887 1619 """ 1620 Dim Command 1621 Stop all data logging, close all files. 1622 888 1623 """ 889 1624 self._cmd("STOP", *args) 1625 890 1626 def message(self): 891 """ A general logging service providing a quality of service (severity)|Message[string]:The message 892 C 1627 """ 1628 Dim Service 1629 A general logging service providing a quality of service (severity) 1630 Message[string]:The message 1631 C 893 1632 """ 894 1633 return self._get("MESSAGE") 1634 895 1635 def enable_numsubs_service(self, *args): 896 """ Switch the service which distributes information about the number of subscriptions and open files on or off.|Enable[bool]:Enable of disable NUM_SUBS service (yes/no). 897 B:1 1636 """ 1637 Dim Command 1638 Switch the service which distributes information about the number of subscriptions and open files on or off. 1639 Enable[bool]:Enable of disable NUM_SUBS service (yes/no). 1640 B:1 898 1641 """ 899 1642 self._cmd("ENABLE_NUMSUBS_SERVICE", *args) 1643 900 1644 def enable_filename_services(self, *args): 901 """ Switch service which distributes information about the open files on or off.|Enable[bool]:Enable of disable filename services (yes/no). 902 B:1 1645 """ 1646 Dim Command 1647 Switch service which distributes information about the open files on or off. 1648 Enable[bool]:Enable of disable filename services (yes/no). 1649 B:1 903 1650 """ 904 1651 self._cmd("ENABLE_FILENAME_SERVICES", *args) 1652 905 1653 def exit(self, *args): 906 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 907 L:1 1654 """ 1655 Dim Command 1656 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1657 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1658 L:1 908 1659 """ 909 1660 self._cmd("EXIT", *args) 1661 910 1662 def set_run_timeout(self, *args): 911 """ Set the timeout delay for old run numbers.|timeout[min]:Time out in minutes after which files for expired runs are closed. 912 L:1 1663 """ 1664 Dim Command 1665 Set the timeout delay for old run numbers. 1666 timeout[min]:Time out in minutes after which files for expired runs are closed. 1667 L:1 913 1668 """ 914 1669 self._cmd("SET_RUN_TIMEOUT", *args) 1670 915 1671 def num_subs(self): 916 """ Num. open files + num. subscribed services|NSubAndOpenFiles[int]:Num. of subs and open files 917 I:2 1672 """ 1673 Dim Service 1674 Num. open files + num. subscribed services 1675 NSubAndOpenFiles[int]:Num. of subs and open files 1676 I:2 918 1677 """ 919 1678 return self._get("NUM_SUBS") 1679 920 1680 def service_desc(self): 921 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 922 C 1681 """ 1682 Dim Service 1683 Descriptions of services or commands and there arguments 1684 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1685 C 923 1686 """ 924 1687 return self._get("SERVICE_DESC") 1688 925 1689 def set_statistics_update_interval(self, *args): 926 """ Interval in which the data-logger statistics service (STATS) is updated.|Interval[ms]:Value in milliseconds (<=0: no update). 927 S:1 1690 """ 1691 Dim Command 1692 Interval in which the data-logger statistics service (STATS) is updated. 1693 Interval[ms]:Value in milliseconds (<=0: no update). 1694 S:1 928 1695 """ 929 1696 self._cmd("SET_STATISTICS_UPDATE_INTERVAL", *args) 1697 930 1698 def version_number(self): 931 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 932 L 1699 """ 1700 Dim Service 1701 Native Dim service: Version number of Dim in use 1702 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1703 L 933 1704 """ 934 1705 return self._get("VERSION_NUMBER") 1706 935 1707 def client_list(self): 936 """ Native Dim service: A list of all connected clients 937 C 1708 """ 1709 Dim Service 1710 Native Dim service: A list of all connected clients 1711 C 938 1712 """ 939 1713 return self._get("CLIENT_LIST") 1714 940 1715 def set_debug_mode(self, *args): 941 """ Switch debug mode on or off. Debug mode prints information about every service written to a file.|Enable[bool]:Enable of disable debug mode (yes/no). 942 B:1 1716 """ 1717 Dim Command 1718 Switch debug mode on or off. Debug mode prints information about every service written to a file. 1719 Enable[bool]:Enable of disable debug mode (yes/no). 1720 B:1 943 1721 """ 944 1722 self._cmd("SET_DEBUG_MODE", *args) 1723 945 1724 def print_info(self, *args): 946 """ Print information about the internal status of the data logger. 947 1725 """ 1726 Dim Command 1727 Print information about the internal status of the data logger. 1728 948 1729 """ 949 1730 self._cmd("PRINT_INFO", *args) 1731 950 1732 def start(self, *args): 951 """ Start the nightly logging. Nightly file location must be specified already 952 1733 """ 1734 Dim Command 1735 Start the nightly logging. Nightly file location must be specified already 1736 953 1737 """ 954 1738 self._cmd("START", *args) 1739 955 1740 def stop_run_logging(self, *args): 956 """ Go from the wait for run to nightly open state. 957 1741 """ 1742 Dim Command 1743 Go from the wait for run to nightly open state. 1744 958 1745 """ 959 1746 self._cmd("STOP_RUN_LOGGING", *args) 1747 960 1748 def service_list(self): 961 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 962 C 1749 """ 1750 Dim Service 1751 Native Dim service: List of services, commands and formats 1752 ServiceList[string]:For details see the Dim manual. 1753 C 963 1754 """ 964 1755 return self._get("SERVICE_LIST") 1756 965 1757 def stats(self): 966 """ Statistics about size written 967 X:4 1758 """ 1759 Dim Service 1760 Statistics about size written 1761 X:4 968 1762 """ 969 1763 return self._get("STATS") 1764 970 1765 def reset(self, *args): 971 """ Transition to exit error states. Closes the any open file. 972 1766 """ 1767 Dim Command 1768 Transition to exit error states. Closes the any open file. 1769 973 1770 """ 974 1771 self._cmd("RESET", *args) 1772 975 1773 def start_run_logging(self, *args): 976 """ Go to waiting for run number state. In this state with any received run-number a new file is opened. 977 1774 """ 1775 Dim Command 1776 Go to waiting for run number state. In this state with any received run-number a new file is opened. 1777 978 1778 """ 979 1779 self._cmd("START_RUN_LOGGING", *args) 1780 980 1781 def state_list(self): 981 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 982 C 1782 """ 1783 Dim Service 1784 Provides a list with descriptions for each service. 1785 StateList[string]:A \n separated list of the form id:name=description 1786 C 983 1787 """ 984 1788 return self._get("STATE_LIST") 1789 985 1790 def state(self): 986 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 987 C 1791 """ 1792 Dim Service 1793 Provides the state of the state machine as quality of service. 1794 Text[string]:A human readable string sent by the last state change. 1795 C 988 1796 """ 989 1797 return self._get("STATE") 1798 990 1799 def filename_nightly(self): 991 """ Path and base name used for the nightly files.|Type[int]:type of open files (1=log, 2=rep, 4=fits)|Name[string]:path and base file name 992 I:1;C 1800 """ 1801 Dim Service 1802 Path and base name used for the nightly files. 1803 Type[int]:type of open files (1=log, 2=rep, 4=fits) 1804 Name[string]:path and base file name 1805 I:1;C 993 1806 """ 994 1807 return self._get("FILENAME_NIGHTLY") 1808 995 1809 class TNG_WEATHER ( FactDimServer): 996 1810 def set_verbose(self, *args): 997 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 998 B 1811 """ 1812 Dim Command 1813 set verbosity state 1814 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1815 B 999 1816 """ 1000 1817 self._cmd("SET_VERBOSE", *args) 1818 1001 1819 def state(self): 1002 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1003 C 1820 """ 1821 Dim Service 1822 Provides the state of the state machine as quality of service. 1823 Text[string]:A human readable string sent by the last state change. 1824 C 1004 1825 """ 1005 1826 return self._get("STATE") 1827 1006 1828 def state_list(self): 1007 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1008 C 1829 """ 1830 Dim Service 1831 Provides a list with descriptions for each service. 1832 StateList[string]:A \n separated list of the form id:name=description 1833 C 1009 1834 """ 1010 1835 return self._get("STATE_LIST") 1836 1011 1837 def version_number(self): 1012 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1013 L 1838 """ 1839 Dim Service 1840 Native Dim service: Version number of Dim in use 1841 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1842 L 1014 1843 """ 1015 1844 return self._get("VERSION_NUMBER") 1845 1016 1846 def dust(self): 1017 """ |Dust[ug/m^3]:Dust (total) 1018 F:1 1847 """ 1848 Dim Service 1849 Dust[ug/m^3]:Dust (total) 1850 F:1 1019 1851 """ 1020 1852 return self._get("DUST") 1853 1021 1854 def service_desc(self): 1022 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1023 C 1855 """ 1856 Dim Service 1857 Descriptions of services or commands and there arguments 1858 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1859 C 1024 1860 """ 1025 1861 return self._get("SERVICE_DESC") 1862 1026 1863 def client_list(self): 1027 """ Native Dim service: A list of all connected clients 1028 C 1864 """ 1865 Dim Service 1866 Native Dim service: A list of all connected clients 1867 C 1029 1868 """ 1030 1869 return self._get("CLIENT_LIST") 1870 1031 1871 def message(self): 1032 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1033 C 1872 """ 1873 Dim Service 1874 A general logging service providing a quality of service (severity) 1875 Message[string]:The message 1876 C 1034 1877 """ 1035 1878 return self._get("MESSAGE") 1879 1036 1880 def data(self): 1037 """ |T_10M[deg C]:Temperature 10m above ground|T_5M[deg C]:Temperature 5m above ground|T_2M[deg C]:Temperature 2m above ground|T_0[deg C]:Temperature at ground|T_dew[deg C]:Dew point|H[%]:Humidity|P[mbar]:Air pressure|v[km/h]:Wind speed|d[deg]:Wind direction (N-E)|DeltaM1|Dust[ug/m^3]:Dust (total)|Seeing[W/m^2]:Seeing 1038 F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1 1881 """ 1882 Dim Service 1883 T_10M[deg C]:Temperature 10m above ground 1884 T_5M[deg C]:Temperature 5m above ground 1885 T_2M[deg C]:Temperature 2m above ground 1886 T_0[deg C]:Temperature at ground 1887 T_dew[deg C]:Dew point 1888 H[%]:Humidity 1889 P[mbar]:Air pressure 1890 v[km/h]:Wind speed 1891 d[deg]:Wind direction (N-E) 1892 DeltaM1 1893 Dust[ug/m^3]:Dust (total) 1894 Seeing[W/m^2]:Seeing 1895 F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1 1039 1896 """ 1040 1897 return self._get("DATA") 1898 1041 1899 def service_list(self): 1042 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1043 C 1900 """ 1901 Dim Service 1902 Native Dim service: List of services, commands and formats 1903 ServiceList[string]:For details see the Dim manual. 1904 C 1044 1905 """ 1045 1906 return self._get("SERVICE_LIST") 1907 1046 1908 def exit(self, *args): 1047 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1048 L:1 1909 """ 1910 Dim Command 1911 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1912 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1913 L:1 1049 1914 """ 1050 1915 self._cmd("EXIT", *args) 1916 1917 class MAGIC_LIDAR ( FactDimServer): 1918 def client_list(self): 1919 """ 1920 Dim Service 1921 Native Dim service: A list of all connected clients 1922 C 1923 """ 1924 return self._get("CLIENT_LIST") 1925 1926 def data(self): 1927 """ 1928 Dim Service 1929 Zd[deg]:Pointing direction zenith distance 1930 Az[deg]:Pointing direction azimuth 1931 CHE[km]:Cloud height 1932 COT[1]:Cloud optical transparency at 532nm 1933 PBL[100]:Planetary boundary layer normalized to 100 for clear nights 1934 F:1;F:1;F:1;F:1;F:1 1935 """ 1936 return self._get("DATA") 1937 1938 def service_list(self): 1939 """ 1940 Dim Service 1941 Native Dim service: List of services, commands and formats 1942 ServiceList[string]:For details see the Dim manual. 1943 C 1944 """ 1945 return self._get("SERVICE_LIST") 1946 1947 def state(self): 1948 """ 1949 Dim Service 1950 Provides the state of the state machine as quality of service. 1951 Text[string]:A human readable string sent by the last state change. 1952 C 1953 """ 1954 return self._get("STATE") 1955 1956 def set_verbose(self, *args): 1957 """ 1958 Dim Command 1959 set verbosity state 1960 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1961 B 1962 """ 1963 self._cmd("SET_VERBOSE", *args) 1964 1965 def exit(self, *args): 1966 """ 1967 Dim Command 1968 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 1969 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1970 L:1 1971 """ 1972 self._cmd("EXIT", *args) 1973 1974 def version_number(self): 1975 """ 1976 Dim Service 1977 Native Dim service: Version number of Dim in use 1978 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1979 L 1980 """ 1981 return self._get("VERSION_NUMBER") 1982 1983 def message(self): 1984 """ 1985 Dim Service 1986 A general logging service providing a quality of service (severity) 1987 Message[string]:The message 1988 C 1989 """ 1990 return self._get("MESSAGE") 1991 1992 def service_desc(self): 1993 """ 1994 Dim Service 1995 Descriptions of services or commands and there arguments 1996 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1997 C 1998 """ 1999 return self._get("SERVICE_DESC") 2000 2001 def state_list(self): 2002 """ 2003 Dim Service 2004 Provides a list with descriptions for each service. 2005 StateList[string]:A \n separated list of the form id:name=description 2006 C 2007 """ 2008 return self._get("STATE_LIST") 2009 1051 2010 class AGILENT_CONTROL ( FactDimServer): 1052 2011 def service_list(self): 1053 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1054 C 2012 """ 2013 Dim Service 2014 Native Dim service: List of services, commands and formats 2015 ServiceList[string]:For details see the Dim manual. 2016 C 1055 2017 """ 1056 2018 return self._get("SERVICE_LIST") 2019 1057 2020 def set_verbose(self, *args): 1058 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no) 1059 B:1 2021 """ 2022 Dim Command 2023 set verbosity state 2024 verbosity[bool]:disable or enable verbosity for received data (yes/no) 2025 B:1 1060 2026 """ 1061 2027 self._cmd("SET_VERBOSE", *args) 2028 1062 2029 def set_power(self, *args): 1063 """ Enable or disable power output|output[bool]:set power output to 'on' or 'off' 1064 B:1 2030 """ 2031 Dim Command 2032 Enable or disable power output 2033 output[bool]:set power output to 'on' or 'off' 2034 B:1 1065 2035 """ 1066 2036 self._cmd("SET_POWER", *args) 2037 1067 2038 def service_desc(self): 1068 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1069 C 2039 """ 2040 Dim Service 2041 Descriptions of services or commands and there arguments 2042 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 2043 C 1070 2044 """ 1071 2045 return self._get("SERVICE_DESC") 2046 1072 2047 def power_cycle(self, *args): 1073 """ Power cycle the power output|delay[short]:Defines the delay between switching off and on. 1074 S:1 2048 """ 2049 Dim Command 2050 Power cycle the power output 2051 delay[short]:Defines the delay between switching off and on. 2052 S:1 1075 2053 """ 1076 2054 self._cmd("POWER_CYCLE", *args) 2055 1077 2056 def version_number(self): 1078 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1079 L 2057 """ 2058 Dim Service 2059 Native Dim service: Version number of Dim in use 2060 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 2061 L 1080 2062 """ 1081 2063 return self._get("VERSION_NUMBER") 2064 1082 2065 def reconnect(self, *args): 1083 """ (Re)connect ethernet connection to Agilent, a new address can be given|[host][string]:new ethernet address in the form <host:port> 1084 O 2066 """ 2067 Dim Command 2068 (Re)connect ethernet connection to Agilent, a new address can be given 2069 [host][string]:new ethernet address in the form <host:port> 2070 O 1085 2071 """ 1086 2072 self._cmd("RECONNECT", *args) 2073 1087 2074 def set_debug_rx(self, *args): 1088 """ set debug state|debug[bool]:disable or enable verbosity for received raw data (yes/no) 1089 B:1 2075 """ 2076 Dim Command 2077 set debug state 2078 debug[bool]:disable or enable verbosity for received raw data (yes/no) 2079 B:1 1090 2080 """ 1091 2081 self._cmd("SET_DEBUG_RX", *args) 2082 1092 2083 def message(self): 1093 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1094 C 2084 """ 2085 Dim Service 2086 A general logging service providing a quality of service (severity) 2087 Message[string]:The message 2088 C 1095 2089 """ 1096 2090 return self._get("MESSAGE") 2091 1097 2092 def state(self): 1098 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1099 C 2093 """ 2094 Dim Service 2095 Provides the state of the state machine as quality of service. 2096 Text[string]:A human readable string sent by the last state change. 2097 C 1100 2098 """ 1101 2099 return self._get("STATE") 2100 1102 2101 def client_list(self): 1103 """ Native Dim service: A list of all connected clients 1104 C 2102 """ 2103 Dim Service 2104 Native Dim service: A list of all connected clients 2105 C 1105 2106 """ 1106 2107 return self._get("CLIENT_LIST") 2108 1107 2109 def disconnect(self, *args): 1108 """ disconnect from ethernet 1109 2110 """ 2111 Dim Command 2112 disconnect from ethernet 2113 1110 2114 """ 1111 2115 self._cmd("DISCONNECT", *args) 2116 1112 2117 def data(self): 1113 """ |U_nom[V]: Nominal output voltage|U_mes[V]: Measured output voltage|I_mes[A]: Measured current|I_max[A]: Current limit 1114 F:1;F:1;F:1;F:1 2118 """ 2119 Dim Service 2120 U_nom[V]: Nominal output voltage 2121 U_mes[V]: Measured output voltage 2122 I_mes[A]: Measured current 2123 I_max[A]: Current limit 2124 F:1;F:1;F:1;F:1 1115 2125 """ 1116 2126 return self._get("DATA") 2127 1117 2128 def state_list(self): 1118 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1119 C 2129 """ 2130 Dim Service 2131 Provides a list with descriptions for each service. 2132 StateList[string]:A \n separated list of the form id:name=description 2133 C 1120 2134 """ 1121 2135 return self._get("STATE_LIST") 2136 1122 2137 def exit(self, *args): 1123 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1124 L:1 2138 """ 2139 Dim Command 2140 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 2141 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2142 L:1 1125 2143 """ 1126 2144 self._cmd("EXIT", *args) 2145 1127 2146 class FAD_CONTROL ( FactDimServer): 1128 2147 def version_number(self): 1129 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1130 L 2148 """ 2149 Dim Service 2150 Native Dim service: Version number of Dim in use 2151 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 2152 L 1131 2153 """ 1132 2154 return self._get("VERSION_NUMBER") 2155 1133 2156 def state_list(self): 1134 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1135 C 2157 """ 2158 Dim Service 2159 Provides a list with descriptions for each service. 2160 StateList[string]:A \n separated list of the form id:name=description 2161 C 1136 2162 """ 1137 2163 return self._get("STATE_LIST") 2164 1138 2165 def enable_continous_trigger(self, *args): 1139 """ Enable continous (internal) trigger. 1140 B:1 2166 """ 2167 Dim Command 2168 Enable continous (internal) trigger. 2169 B:1 1141 2170 """ 1142 2171 self._cmd("ENABLE_CONTINOUS_TRIGGER", *args) 2172 1143 2173 def event_data(self): 1144 """ DESC in SERVICE_DESC is empty ?! 1145 F:1440;F:1440;F:1440;F:1440 2174 """ 2175 Dim Service 2176 DESC in SERVICE_DESC is empty ?! 2177 F:1440;F:1440;F:1440;F:1440 1146 2178 """ 1147 2179 return self._get("EVENT_DATA") 2180 1148 2181 def print_event(self, *args): 1149 """ Print (last) event|board[short]:slot from which the event should be printed (-1 for all) 1150 S:1 2182 """ 2183 Dim Command 2184 Print (last) event 2185 board[short]:slot from which the event should be printed (-1 for all) 2186 S:1 1151 2187 """ 1152 2188 self._cmd("PRINT_EVENT", *args) 2189 1153 2190 def block_transmission(self, *args): 1154 """ Blocks the transmission of commands to the given slot. Use with care! For debugging pupose only!|slot[short]:Slot to which the command transmission should be blocked (0-39)|enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no) 1155 S:1;B:1 2191 """ 2192 Dim Command 2193 Blocks the transmission of commands to the given slot. Use with care! For debugging pupose only! 2194 slot[short]:Slot to which the command transmission should be blocked (0-39) 2195 enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no) 2196 S:1;B:1 1156 2197 """ 1157 2198 self._cmd("BLOCK_TRANSMISSION", *args) 2199 1158 2200 def set_debug_tx(self, *args): 1159 """ Enable or disable the output of messages in case of successfull data transmission to the boards.|debug[bool]:disable or enable debug output for transmitted data (yes/no) 1160 B:1 2201 """ 2202 Dim Command 2203 Enable or disable the output of messages in case of successfull data transmission to the boards. 2204 debug[bool]:disable or enable debug output for transmitted data (yes/no) 2205 B:1 1161 2206 """ 1162 2207 self._cmd("SET_DEBUG_TX", *args) 2208 1163 2209 def dac(self): 1164 """ DAC settings of each FAD board|DAC[int]:DAC counts, sequentially DAC 0 board 0, 0/1, 0/2... (plus min max) 1165 S:336 2210 """ 2211 Dim Service 2212 DAC settings of each FAD board 2213 DAC[int]:DAC counts, sequentially DAC 0 board 0, 0/1, 0/2... (plus min max) 2214 S:336 1166 2215 """ 1167 2216 return self._get("DAC") 2217 1168 2218 def status(self): 1169 """ Status of FAD boards|status[bitpattern]:Status of each FAD board. Maybe buggy 1170 S:42 2219 """ 2220 Dim Service 2221 Status of FAD boards 2222 status[bitpattern]:Status of each FAD board. Maybe buggy 2223 S:42 1171 2224 """ 1172 2225 return self._get("STATUS") 2226 1173 2227 def disconnect(self, *args): 1174 """ Disconnect a connected slot. 1175 S:1 2228 """ 2229 Dim Command 2230 Disconnect a connected slot. 2231 S:1 1176 2232 """ 1177 2233 self._cmd("DISCONNECT", *args) 2234 1178 2235 def set_max_memory(self, *args): 1179 """ Set maximum memory buffer size allowed to be consumed by the EventBuilder to buffer events.|memory[short]:Buffer size in Mega-bytes. 1180 S:1 2236 """ 2237 Dim Command 2238 Set maximum memory buffer size allowed to be consumed by the EventBuilder to buffer events. 2239 memory[short]:Buffer size in Mega-bytes. 2240 S:1 1181 2241 """ 1182 2242 self._cmd("SET_MAX_MEMORY", *args) 2243 1183 2244 def firmware_version(self): 1184 """ Firmware version number of fad boards|firmware[float]:Version number of firmware, for each board. 40=min, 41=max 1185 F:42 2245 """ 2246 Dim Service 2247 Firmware version number of fad boards 2248 firmware[float]:Version number of firmware, for each board. 40=min, 41=max 2249 F:42 1186 2250 """ 1187 2251 return self._get("FIRMWARE_VERSION") 2252 1188 2253 def load_drs_calibration(self, *args): 1189 """ Load a DRS calibration file|absolute path 1190 C 2254 """ 2255 Dim Command 2256 Load a DRS calibration file 2257 absolute path 2258 C 1191 2259 """ 1192 2260 self._cmd("LOAD_DRS_CALIBRATION", *args) 2261 1193 2262 def add_address(self, *args): 1194 """ Add the address of a DRS4 board to the first free slot|IP[string]:address in the format <address:port> 1195 C 2263 """ 2264 Dim Command 2265 Add the address of a DRS4 board to the first free slot 2266 IP[string]:address in the format <address:port> 2267 C 1196 2268 """ 1197 2269 self._cmd("ADD_ADDRESS", *args) 2270 1198 2271 def drs_runs(self): 1199 """ DESC in SERVICE_DESC is empty ?! 1200 I:1;I:3 2272 """ 2273 Dim Service 2274 DESC in SERVICE_DESC is empty ?! 2275 I:1;I:3 1201 2276 """ 1202 2277 return self._get("DRS_RUNS") 2278 1203 2279 def enable_trigger_line(self, *args): 1204 """ Incoming triggers can be accepted/will not be accepted 1205 B:1 2280 """ 2281 Dim Command 2282 Incoming triggers can be accepted/will not be accepted 2283 B:1 1206 2284 """ 1207 2285 self._cmd("ENABLE_TRIGGER_LINE", *args) 2286 1208 2287 def enable_dwrite(self, *args): 1209 """ Set Dwrite (possibly high / always low) 1210 B:1 2288 """ 2289 Dim Command 2290 Set Dwrite (possibly high / always low) 2291 B:1 1211 2292 """ 1212 2293 self._cmd("ENABLE_DWRITE", *args) 2294 1213 2295 def feedback_data(self): 1214 """ DESC in SERVICE_DESC is empty ?! 1215 F:1440 2296 """ 2297 Dim Service 2298 DESC in SERVICE_DESC is empty ?! 2299 F:1440 1216 2300 """ 1217 2301 return self._get("FEEDBACK_DATA") 2302 1218 2303 def set_file_format(self, *args): 1219 """ DESC in SERVICE_DESC is empty ?! 1220 S:1 2304 """ 2305 Dim Command 2306 DESC in SERVICE_DESC is empty ?! 2307 S:1 1221 2308 """ 1222 2309 self._cmd("SET_FILE_FORMAT", *args) 2310 1223 2311 def reference_clock(self): 1224 """ Reference clock of FAD boards|refClocks[t]:ref clocks of FAD boards. 40=min, 41=max 1225 I:42 2312 """ 2313 Dim Service 2314 Reference clock of FAD boards 2315 refClocks[t]:ref clocks of FAD boards. 40=min, 41=max 2316 I:42 1226 2317 """ 1227 2318 return self._get("REFERENCE_CLOCK") 2319 1228 2320 def phase_shift(self, *args): 1229 """ Adjust ADC phase (in 'steps')|phase[short] 1230 S:1 2321 """ 2322 Dim Command 2323 Adjust ADC phase (in 'steps') 2324 phase[short] 2325 S:1 1231 2326 """ 1232 2327 self._cmd("PHASE_SHIFT", *args) 2328 1233 2329 def enable_busy_off(self, *args): 1234 """ Set BUSY continously low 1235 B:1 2330 """ 2331 Dim Command 2332 Set BUSY continously low 2333 B:1 1236 2334 """ 1237 2335 self._cmd("ENABLE_BUSY_OFF", *args) 2336 1238 2337 def set_data_output(self, *args): 1239 """ Enable or disable printing of the received adc data to the console|dataout[bool]:disable or enable data output for received data (yes/no) 1240 B:1 2338 """ 2339 Dim Command 2340 Enable or disable printing of the received adc data to the console 2341 dataout[bool]:disable or enable data output for received data (yes/no) 2342 B:1 1241 2343 """ 1242 2344 self._cmd("SET_DATA_OUTPUT", *args) 2345 1243 2346 def block_transmission_range(self, *args): 1244 """ Blocks the transmission of commands to the given range of slots. Use with care! For debugging pupose only!|first[short]:First slot to which the command transmission should be blocked (0-39)|last[short]:Last slot to which the command transmission should be blocked (0-39)|enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no) 1245 S:2;B:1 2347 """ 2348 Dim Command 2349 Blocks the transmission of commands to the given range of slots. Use with care! For debugging pupose only! 2350 first[short]:First slot to which the command transmission should be blocked (0-39) 2351 last[short]:Last slot to which the command transmission should be blocked (0-39) 2352 enable[bool]:Whether the command transmission should be blockes (yes) or allowed (no) 2353 S:2;B:1 1246 2354 """ 1247 2355 self._cmd("BLOCK_TRANSMISSION_RANGE", *args) 2356 1248 2357 def events(self): 1249 """ Event counts|evtsCount[int]:Num evts cur. run, total (all run), evt ID, trig. Num 1250 I:4 2358 """ 2359 Dim Service 2360 Event counts 2361 evtsCount[int]:Num evts cur. run, total (all run), evt ID, trig. Num 2362 I:4 1251 2363 """ 1252 2364 return self._get("EVENTS") 2365 1253 2366 def ignore_events_range(self, *args): 1254 """ Instructs the event-builder to ignore events from the given slot but still read the data from the socket.|first[short]:First slot from which the data should be ignored when building events|last[short]:Last slot from which the data should be ignored when building events|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no) 1255 S:2;B:1 2367 """ 2368 Dim Command 2369 Instructs the event-builder to ignore events from the given slot but still read the data from the socket. 2370 first[short]:First slot from which the data should be ignored when building events 2371 last[short]:Last slot from which the data should be ignored when building events 2372 enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no) 2373 S:2;B:1 1256 2374 """ 1257 2375 self._cmd("IGNORE_EVENTS_RANGE", *args) 2376 1258 2377 def send_data(self, *args): 1259 """ Send a command with data to the FADs. Values between 0 and 0xffff are allowed.|command[uint16]:Command to be transmittted.|data[uint16]:Data to be sent with the command. 1260 I:2 2378 """ 2379 Dim Command 2380 Send a command with data to the FADs. Values between 0 and 0xffff are allowed. 2381 command[uint16]:Command to be transmittted. 2382 data[uint16]:Data to be sent with the command. 2383 I:2 1261 2384 """ 1262 2385 self._cmd("SEND_DATA", *args) 2386 1263 2387 def abort(self, *args): 1264 """ Immediately abort EventBuilder thread and disconnect all slots. 1265 2388 """ 2389 Dim Command 2390 Immediately abort EventBuilder thread and disconnect all slots. 2391 1266 2392 """ 1267 2393 self._cmd("ABORT", *args) 2394 1268 2395 def reset_event_counter(self, *args): 1269 """ Reset the FAD boards' event counter to 0. 1270 2396 """ 2397 Dim Command 2398 Reset the FAD boards' event counter to 0. 2399 1271 2400 """ 1272 2401 self._cmd("RESET_EVENT_COUNTER", *args) 2402 1273 2403 def set_hex_output(self, *args): 1274 """ Enable or disable hex output for received data|hexout[bool]:disable or enable hex output for received data (yes/no) 1275 B:1 2404 """ 2405 Dim Command 2406 Enable or disable hex output for received data 2407 hexout[bool]:disable or enable hex output for received data (yes/no) 2408 B:1 1276 2409 """ 1277 2410 self._cmd("SET_HEX_OUTPUT", *args) 2411 1278 2412 def statistics1(self): 1279 """ Event Builder status for GUI display|threadInfo[int]:Number of read, proc and writes|bufferInfo[int]:Events in buffer, incomp., comp., tot., max past cycle, total|memInfo[int]:total buf. mem, used mem, max used, max past cycle|EvtCnt[int]:Number of events skipped, written, with errors|badRoi[int]:Num boards with wrong ROI in event, run or board|badRoiBoard[int]:Num boards with wrong ROI|deltaT[ms]:Time in ms for rates|rateNew[int]:Number of new start events received|numConn[int]:Number of connections per board|errConn[int]:IO errors per board|rateBytes[int]:Bytes read this cycle|totBytes[int]:Bytes read (counter) 1280 I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40;I:40;X:40 2413 """ 2414 Dim Service 2415 Event Builder status for GUI display 2416 threadInfo[int]:Number of read, proc and writes 2417 bufferInfo[int]:Events in buffer, incomp., comp., tot., max past cycle, total 2418 memInfo[int]:total buf. mem, used mem, max used, max past cycle 2419 EvtCnt[int]:Number of events skipped, written, with errors 2420 badRoi[int]:Num boards with wrong ROI in event, run or board 2421 badRoiBoard[int]:Num boards with wrong ROI 2422 deltaT[ms]:Time in ms for rates 2423 rateNew[int]:Number of new start events received 2424 numConn[int]:Number of connections per board 2425 errConn[int]:IO errors per board 2426 rateBytes[int]:Bytes read this cycle 2427 totBytes[int]:Bytes read (counter) 2428 I:3;I:5;X:4;I:3;I:3;I:40;I:1;I:2;C:40;I:40;I:40;X:40 1281 2429 """ 1282 2430 return self._get("STATISTICS1") 2431 1283 2432 def enable_sclk(self, *args): 1284 """ Set SCLK 1285 B:1 2433 """ 2434 Dim Command 2435 Set SCLK 2436 B:1 1286 2437 """ 1287 2438 self._cmd("ENABLE_SCLK", *args) 2439 1288 2440 def enable_busy_on(self, *args): 1289 """ Set BUSY constantly high (has priority over BUSY_OFF) 1290 B:1 2441 """ 2442 Dim Command 2443 Set BUSY constantly high (has priority over BUSY_OFF) 2444 B:1 1291 2445 """ 1292 2446 self._cmd("ENABLE_BUSY_ON", *args) 2447 1293 2448 def set_region_of_interest(self, *args): 1294 """ Set region-of-interest to value|channel[short]:Channel on each chip for which the ROI is set (0-8), -1 for all|val[short]:Value to be set 1295 I:2 2449 """ 2450 Dim Command 2451 Set region-of-interest to value 2452 channel[short]:Channel on each chip for which the ROI is set (0-8), -1 for all 2453 val[short]:Value to be set 2454 I:2 1296 2455 """ 1297 2456 self._cmd("SET_REGION_OF_INTEREST", *args) 2457 1298 2458 def set_trigger_rate(self, *args): 1299 """ Enable continous trigger 1300 I:1 2459 """ 2460 Dim Command 2461 Enable continous trigger 2462 I:1 1301 2463 """ 1302 2464 self._cmd("SET_TRIGGER_RATE", *args) 2465 1303 2466 def statistics2(self): 1304 """ Event Builder status, events oriented|reset[int]:If increased, reset all counters|numRead[int]:How often sucessful read from N sockets per loop|gotByte[int]:number of bytes read per board|gotErr[int]:number of com. errors per board|evtStat[int]:number of evts read, completed, with errors, incomplete|procStat[int]:num. of evts proc., w probs, acc. or rej. by SW trigger|feedStat[int]:number of evts used or rejected by feedback system|wrtStat[int]:number of evts written to disk, with errors|runStat[int]:number of run opened, closed, with open or close errors|numConn[int]:number of sockets successfully opened per board 1305 I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40 2467 """ 2468 Dim Service 2469 Event Builder status, events oriented 2470 reset[int]:If increased, reset all counters 2471 numRead[int]:How often sucessful read from N sockets per loop 2472 gotByte[int]:number of bytes read per board 2473 gotErr[int]:number of com. errors per board 2474 evtStat[int]:number of evts read, completed, with errors, incomplete 2475 procStat[int]:num. of evts proc., w probs, acc. or rej. by SW trigger 2476 feedStat[int]:number of evts used or rejected by feedback system 2477 wrtStat[int]:number of evts written to disk, with errors 2478 runStat[int]:number of run opened, closed, with open or close errors 2479 numConn[int]:number of sockets successfully opened per board 2480 I:1;I:280;X:40;I:40;I:4;I:4;I:2;I:2;I:3;C:40 1306 2481 """ 1307 2482 return self._get("STATISTICS2") 2483 1308 2484 def service_desc(self): 1309 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1310 C 2485 """ 2486 Dim Service 2487 Descriptions of services or commands and there arguments 2488 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 2489 C 1311 2490 """ 1312 2491 return self._get("SERVICE_DESC") 2492 1313 2493 def send_cmd(self, *args): 1314 """ Send a command to the FADs. Values between 0 and 0xffff are allowed.|command[uint16]:Command to be transmittted. 1315 I:1 2494 """ 2495 Dim Command 2496 Send a command to the FADs. Values between 0 and 0xffff are allowed. 2497 command[uint16]:Command to be transmittted. 2498 I:1 1316 2499 """ 1317 2500 self._cmd("SEND_CMD", *args) 2501 1318 2502 def stop(self, *args): 1319 """ Stop EventBuilder thread (still write buffered events) and disconnect all slots. 1320 2503 """ 2504 Dim Command 2505 Stop EventBuilder thread (still write buffered events) and disconnect all slots. 2506 1321 2507 """ 1322 2508 self._cmd("STOP", *args) 2509 1323 2510 def connect(self, *args): 1324 """ Connect a disconnected slot. 1325 S:1 2511 """ 2512 Dim Command 2513 Connect a disconnected slot. 2514 S:1 1326 2515 """ 1327 2516 self._cmd("CONNECT", *args) 2517 1328 2518 def send_single_trigger(self, *args): 1329 """ Issue software triggers 1330 2519 """ 2520 Dim Command 2521 Issue software triggers 2522 1331 2523 """ 1332 2524 self._cmd("SEND_SINGLE_TRIGGER", *args) 2525 1333 2526 def dump_recv(self, *args): 1334 """ For debugging purpose: the times when data has been receives are dumped to a file.|switch[bool]:Enable (yes) or disable (no) 1335 B:1 2527 """ 2528 Dim Command 2529 For debugging purpose: the times when data has been receives are dumped to a file. 2530 switch[bool]:Enable (yes) or disable (no) 2531 B:1 1336 2532 """ 1337 2533 self._cmd("DUMP_RECV", *args) 2534 1338 2535 def enable_drs(self, *args): 1339 """ Switch Domino wave 1340 B:1 2536 """ 2537 Dim Command 2538 Switch Domino wave 2539 B:1 1341 2540 """ 1342 2541 self._cmd("ENABLE_DRS", *args) 2542 1343 2543 def start_drs_calibration(self, *args): 1344 """ DESC in SERVICE_DESC is empty ?! 1345 2544 """ 2545 Dim Command 2546 DESC in SERVICE_DESC is empty ?! 2547 1346 2548 """ 1347 2549 self._cmd("START_DRS_CALIBRATION", *args) 2550 1348 2551 def start(self, *args): 1349 """ Start EventBuilder thread and connect all valid slots. 1350 2552 """ 2553 Dim Command 2554 Start EventBuilder thread and connect all valid slots. 2555 1351 2556 """ 1352 2557 self._cmd("START", *args) 2558 1353 2559 def set_dac_value(self, *args): 1354 """ Set DAC numbers in range to value|addr[short]:Address of register (-1 for all)|val[short]:Value to be set 1355 I:2 2560 """ 2561 Dim Command 2562 Set DAC numbers in range to value 2563 addr[short]:Address of register (-1 for all) 2564 val[short]:Value to be set 2565 I:2 1356 2566 """ 1357 2567 self._cmd("SET_DAC_VALUE", *args) 2568 1358 2569 def drs_calibration(self): 1359 """ DESC in SERVICE_DESC is empty ?! 1360 I:1;I:3;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:163840;F:163840 2570 """ 2571 Dim Service 2572 DESC in SERVICE_DESC is empty ?! 2573 I:1;I:3;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:1474560;F:163840;F:163840 1361 2574 """ 1362 2575 return self._get("DRS_CALIBRATION") 2576 1363 2577 def dna(self): 1364 """ DNA of FAD boards|DNA[hex]:Hex identifier of each FAD board 1365 X:40 2578 """ 2579 Dim Service 2580 DNA of FAD boards 2581 DNA[hex]:Hex identifier of each FAD board 2582 X:40 1366 2583 """ 1367 2584 return self._get("DNA") 2585 1368 2586 def configure(self, *args): 1369 """ Configure a new run. If the internla trigger is enabled this might even start a new run.|time_max[s]:Maximum time before the run is closed in seconds (0: unlimited)|num_max[int]:Maximum number of events before the run is closed in seconds (0: unlimited)|run_type[string]:Run type which describes the runs 1370 X:2;C 2587 """ 2588 Dim Command 2589 Configure a new run. If the internla trigger is enabled this might even start a new run. 2590 time_max[s]:Maximum time before the run is closed in seconds (0: unlimited) 2591 num_max[int]:Maximum number of events before the run is closed in seconds (0: unlimited) 2592 run_type[string]:Run type which describes the runs 2593 X:2;C 1371 2594 """ 1372 2595 self._cmd("CONFIGURE", *args) 2596 1373 2597 def set_register(self, *args): 1374 """ set register to value|addr[short]:Address of register|val[short]:Value to be set 1375 I:2 2598 """ 2599 Dim Command 2600 set register to value 2601 addr[short]:Address of register 2602 val[short]:Value to be set 2603 I:2 1376 2604 """ 1377 2605 self._cmd("SET_REGISTER", *args) 2606 1378 2607 def enable_srclk(self, *args): 1379 """ Set SRCLK 1380 B:1 2608 """ 2609 Dim Command 2610 Set SRCLK 2611 B:1 1381 2612 """ 1382 2613 self._cmd("ENABLE_SRCLK", *args) 2614 1383 2615 def send_n_triggers(self, *args): 1384 """ Issue N software triggers (note that these are the triggers sent, not the triggers executed)|N[int]: Number of triggers to be sent to the board. 1385 I 2616 """ 2617 Dim Command 2618 Issue N software triggers (note that these are the triggers sent, not the triggers executed) 2619 N[int]: Number of triggers to be sent to the board. 2620 I 1386 2621 """ 1387 2622 self._cmd("SEND_N_TRIGGERS", *args) 2623 1388 2624 def remove_slot(self, *args): 1389 """ Remove the Iaddress in slot n. For a list see LIST|slot[short]:Remove the address in slot n from the list 1390 S:1 2625 """ 2626 Dim Command 2627 Remove the Iaddress in slot n. For a list see LIST 2628 slot[short]:Remove the address in slot n from the list 2629 S:1 1391 2630 """ 1392 2631 self._cmd("REMOVE_SLOT", *args) 2632 1393 2633 def set_verbose(self, *args): 1394 """ Set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1395 B:1 2634 """ 2635 Dim Command 2636 Set verbosity state 2637 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 2638 B:1 1396 2639 """ 1397 2640 self._cmd("SET_VERBOSE", *args) 2641 1398 2642 def set_run_number(self, *args): 1399 """ Sent a new run-number to the boards|num[int]:Run number 1400 X:1 2643 """ 2644 Dim Command 2645 Sent a new run-number to the boards 2646 num[int]:Run number 2647 X:1 1401 2648 """ 1402 2649 self._cmd("SET_RUN_NUMBER", *args) 2650 1403 2651 def client_list(self): 1404 """ Native Dim service: A list of all connected clients 1405 C 2652 """ 2653 Dim Service 2654 Native Dim service: A list of all connected clients 2655 C 1406 2656 """ 1407 2657 return self._get("CLIENT_LIST") 2658 1408 2659 def enable_command_socket_mode(self, *args): 1409 """ Set debug mode (yes: dump events through command socket, no=dump events through other sockets) 1410 B:1 2660 """ 2661 Dim Command 2662 Set debug mode (yes: dump events through command socket, no=dump events through other sockets) 2663 B:1 1411 2664 """ 1412 2665 self._cmd("ENABLE_COMMAND_SOCKET_MODE", *args) 2666 1413 2667 def state(self): 1414 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1415 C 2668 """ 2669 Dim Service 2670 Provides the state of the state machine as quality of service. 2671 Text[string]:A human readable string sent by the last state change. 2672 C 1416 2673 """ 1417 2674 return self._get("STATE") 2675 1418 2676 def exit(self, *args): 1419 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1420 L:1 2677 """ 2678 Dim Command 2679 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 2680 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2681 L:1 1421 2682 """ 1422 2683 self._cmd("EXIT", *args) 2684 1423 2685 def raw_data(self): 1424 """ DESC in SERVICE_DESC is empty ?! 1425 S:1;I:1;S:1;I:1;I:2;I:40;S:1440;S:160;F 2686 """ 2687 Dim Service 2688 DESC in SERVICE_DESC is empty ?! 2689 S:1;I:1;S:1;I:1;I:2;I:40;S:1440;S:160;F 1426 2690 """ 1427 2691 return self._get("RAW_DATA") 2692 1428 2693 def list_slots(self, *args): 1429 """ Print a list of all available board addressesa and whether they are enabled 1430 2694 """ 2695 Dim Command 2696 Print a list of all available board addressesa and whether they are enabled 2697 1431 2698 """ 1432 2699 self._cmd("LIST_SLOTS", *args) 2700 1433 2701 def set_debug_event_builder_out(self, *args): 1434 """ Enable or disable the debug output from the event builder|enable[bool]:Enable/Disable (yes/no) 1435 B:1 2702 """ 2703 Dim Command 2704 Enable or disable the debug output from the event builder 2705 enable[bool]:Enable/Disable (yes/no) 2706 B:1 1436 2707 """ 1437 2708 self._cmd("SET_DEBUG_EVENT_BUILDER_OUT", *args) 2709 1438 2710 def temperature(self): 1439 """ FADs temperatures|temp[deg. C]:0 global min, 1-40 min, 41 global max, 42-81 max 1440 F:82 2711 """ 2712 Dim Service 2713 FADs temperatures 2714 temp[deg. C]:0 global min, 1-40 min, 41 global max, 42-81 max 2715 F:82 1441 2716 """ 1442 2717 return self._get("TEMPERATURE") 2718 1443 2719 def dump_stream(self, *args): 1444 """ For debugging purpose: the binary data stream read from the sockets 0-7 can be dumped to files.|switch[bool]:Enable (yes) or disable (no) 1445 B:1 2720 """ 2721 Dim Command 2722 For debugging purpose: the binary data stream read from the sockets 0-7 can be dumped to files. 2723 switch[bool]:Enable (yes) or disable (no) 2724 B:1 1446 2725 """ 1447 2726 self._cmd("DUMP_STREAM", *args) 2727 1448 2728 def region_of_interest(self): 1449 """ DESC in SERVICE_DESC is empty ?! 1450 S:2 2729 """ 2730 Dim Service 2731 DESC in SERVICE_DESC is empty ?! 2732 S:2 1451 2733 """ 1452 2734 return self._get("REGION_OF_INTEREST") 2735 1453 2736 def ignore_events(self, *args): 1454 """ Instructs the event-builder to ignore events from the given slot but still read the data from the socket.|slot[short]:Slot from which the data should be ignored when building events|enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no) 1455 S:1;B:1 2737 """ 2738 Dim Command 2739 Instructs the event-builder to ignore events from the given slot but still read the data from the socket. 2740 slot[short]:Slot from which the data should be ignored when building events 2741 enable[bool]:Whether the event builder should ignore data from this slot (yes) or allowed (no) 2742 S:1;B:1 1456 2743 """ 1457 2744 self._cmd("IGNORE_EVENTS", *args) 2745 1458 2746 def start_run(self): 1459 """ Run numbers|run[idx]:Run no of last conf'd run (-1 if reset or none config'd yet)|next[idx]:Run number which will be assigned to next configuration 1460 X:1;X:1 2747 """ 2748 Dim Service 2749 Run numbers 2750 run[idx]:Run no of last conf'd run (-1 if reset or none config'd yet) 2751 next[idx]:Run number which will be assigned to next configuration 2752 X:1;X:1 1461 2753 """ 1462 2754 return self._get("START_RUN") 2755 1463 2756 def prescaler(self): 1464 """ Trigger generator prescaler of fad boards|prescaler[int]:Trigger generator prescaler value, for each board 1465 S:42 2757 """ 2758 Dim Service 2759 Trigger generator prescaler of fad boards 2760 prescaler[int]:Trigger generator prescaler value, for each board 2761 S:42 1466 2762 """ 1467 2763 return self._get("PRESCALER") 2764 1468 2765 def file_format(self): 1469 """ DESC in SERVICE_DESC is empty ?! 1470 S:1 2766 """ 2767 Dim Service 2768 DESC in SERVICE_DESC is empty ?! 2769 S:1 1471 2770 """ 1472 2771 return self._get("FILE_FORMAT") 2772 1473 2773 def runs(self): 1474 """ Run files statistics|stats[int]:num of open files, min/max run no, last opened or closed run|file[string]:filename of last opened file 1475 I:5;C 2774 """ 2775 Dim Service 2776 Run files statistics 2777 stats[int]:num of open files, min/max run no, last opened or closed run 2778 file[string]:filename of last opened file 2779 I:5;C 1476 2780 """ 1477 2781 return self._get("RUNS") 2782 1478 2783 def run_number(self): 1479 """ Run numbers coming from FAD boards|runNumbers[int]:current run number of each FAD board. 40=min, 41=max 1480 I:42 2784 """ 2785 Dim Service 2786 Run numbers coming from FAD boards 2787 runNumbers[int]:current run number of each FAD board. 40=min, 41=max 2788 I:42 1481 2789 """ 1482 2790 return self._get("RUN_NUMBER") 2791 1483 2792 def service_list(self): 1484 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1485 C 2793 """ 2794 Dim Service 2795 Native Dim service: List of services, commands and formats 2796 ServiceList[string]:For details see the Dim manual. 2797 C 1486 2798 """ 1487 2799 return self._get("SERVICE_LIST") 2800 1488 2801 def toggle(self, *args): 1489 """ DESC in SERVICE_DESC is empty ?! 1490 S:1 2802 """ 2803 Dim Command 2804 DESC in SERVICE_DESC is empty ?! 2805 S:1 1491 2806 """ 1492 2807 self._cmd("TOGGLE", *args) 2808 1493 2809 def reset_secondary_drs_baseline(self, *args): 1494 """ DESC in SERVICE_DESC is empty ?! 1495 2810 """ 2811 Dim Command 2812 DESC in SERVICE_DESC is empty ?! 2813 1496 2814 """ 1497 2815 self._cmd("RESET_SECONDARY_DRS_BASELINE", *args) 2816 1498 2817 def message(self): 1499 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1500 C 2818 """ 2819 Dim Service 2820 A general logging service providing a quality of service (severity) 2821 Message[string]:The message 2822 C 1501 2823 """ 1502 2824 return self._get("MESSAGE") 2825 1503 2826 def close_open_files(self, *args): 1504 """ Close all run files opened by the EventBuilder. 1505 2827 """ 2828 Dim Command 2829 Close all run files opened by the EventBuilder. 2830 1506 2831 """ 1507 2832 self._cmd("CLOSE_OPEN_FILES", *args) 2833 1508 2834 def stats(self): 1509 """ Statistics about size written 1510 X:4 2835 """ 2836 Dim Service 2837 Statistics about size written 2838 X:4 1511 2839 """ 1512 2840 return self._get("STATS") 2841 1513 2842 def soft_reset(self, *args): 1514 """ Wait for buffers to drain, close all files and reinitialize event builder thread. 1515 2843 """ 2844 Dim Command 2845 Wait for buffers to drain, close all files and reinitialize event builder thread. 2846 1516 2847 """ 1517 2848 self._cmd("SOFT_RESET", *args) 2849 1518 2850 def hard_reset(self, *args): 1519 """ Free all buffers, close all files and reinitialize event builder thread. 1520 2851 """ 2852 Dim Command 2853 Free all buffers, close all files and reinitialize event builder thread. 2854 1521 2855 """ 1522 2856 self._cmd("HARD_RESET", *args) 2857 1523 2858 def connections(self): 1524 """ Connection status of FAD boards|status[bitpattern]:lower bits stat1, upper bits stat2, for every board. 40=thread|char[unknown]:to be completed 1525 C:40;C:1 2859 """ 2860 Dim Service 2861 Connection status of FAD boards 2862 status[bitpattern]:lower bits stat1, upper bits stat2, for every board. 40=thread 2863 char[unknown]:to be completed 2864 C:40;C:1 1526 2865 """ 1527 2866 return self._get("CONNECTIONS") 2867 1528 2868 def reset_configure(self, *args): 1529 """ If configuration failed and the fadctrl is waiting for something, use this to reset the state. 1530 2869 """ 2870 Dim Command 2871 If configuration failed and the fadctrl is waiting for something, use this to reset the state. 2872 1531 2873 """ 1532 2874 self._cmd("RESET_CONFIGURE", *args) 2875 1533 2876 class MAGIC_WEATHER ( FactDimServer): 1534 2877 def version_number(self): 1535 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1536 L 2878 """ 2879 Dim Service 2880 Native Dim service: Version number of Dim in use 2881 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 2882 L 1537 2883 """ 1538 2884 return self._get("VERSION_NUMBER") 2885 1539 2886 def service_list(self): 1540 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1541 C 2887 """ 2888 Dim Service 2889 Native Dim service: List of services, commands and formats 2890 ServiceList[string]:For details see the Dim manual. 2891 C 1542 2892 """ 1543 2893 return self._get("SERVICE_LIST") 2894 1544 2895 def client_list(self): 1545 """ Native Dim service: A list of all connected clients 1546 C 2896 """ 2897 Dim Service 2898 Native Dim service: A list of all connected clients 2899 C 1547 2900 """ 1548 2901 return self._get("CLIENT_LIST") 2902 1549 2903 def state(self): 1550 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1551 C 2904 """ 2905 Dim Service 2906 Provides the state of the state machine as quality of service. 2907 Text[string]:A human readable string sent by the last state change. 2908 C 1552 2909 """ 1553 2910 return self._get("STATE") 2911 1554 2912 def data(self): 1555 """ |stat:Status|T[deg C]:Temperature|T_dew[deg C]:Dew point|H[%]:Humidity|P[hPa]:Air pressure|v[km/h]:Wind speed|v_max[km/h]:Wind gusts|d[deg]:Wind direction (N-E) 1556 S:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1 2913 """ 2914 Dim Service 2915 stat:Status 2916 T[deg C]:Temperature 2917 T_dew[deg C]:Dew point 2918 H[%]:Humidity 2919 P[hPa]:Air pressure 2920 v[km/h]:Wind speed 2921 v_max[km/h]:Wind gusts 2922 d[deg]:Wind direction (N-E) 2923 S:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1 1557 2924 """ 1558 2925 return self._get("DATA") 2926 1559 2927 def message(self): 1560 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1561 C 2928 """ 2929 Dim Service 2930 A general logging service providing a quality of service (severity) 2931 Message[string]:The message 2932 C 1562 2933 """ 1563 2934 return self._get("MESSAGE") 2935 1564 2936 def state_list(self): 1565 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1566 C 2937 """ 2938 Dim Service 2939 Provides a list with descriptions for each service. 2940 StateList[string]:A \n separated list of the form id:name=description 2941 C 1567 2942 """ 1568 2943 return self._get("STATE_LIST") 2944 1569 2945 def set_verbose(self, *args): 1570 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1571 B 2946 """ 2947 Dim Command 2948 set verbosity state 2949 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 2950 B 1572 2951 """ 1573 2952 self._cmd("SET_VERBOSE", *args) 2953 1574 2954 def service_desc(self): 1575 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1576 C 2955 """ 2956 Dim Service 2957 Descriptions of services or commands and there arguments 2958 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 2959 C 1577 2960 """ 1578 2961 return self._get("SERVICE_DESC") 2962 1579 2963 def exit(self, *args): 1580 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1581 L:1 2964 """ 2965 Dim Command 2966 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 2967 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2968 L:1 1582 2969 """ 1583 2970 self._cmd("EXIT", *args) 2971 1584 2972 class CHAT ( FactDimServer): 1585 2973 def exit(self, *args): 1586 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1587 L:1 2974 """ 2975 Dim Command 2976 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 2977 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2978 L:1 1588 2979 """ 1589 2980 self._cmd("EXIT", *args) 2981 1590 2982 def client_list(self): 1591 """ Native Dim service: A list of all connected clients 1592 C 2983 """ 2984 Dim Service 2985 Native Dim service: A list of all connected clients 2986 C 1593 2987 """ 1594 2988 return self._get("CLIENT_LIST") 2989 1595 2990 def state_list(self): 1596 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1597 C 2991 """ 2992 Dim Service 2993 Provides a list with descriptions for each service. 2994 StateList[string]:A \n separated list of the form id:name=description 2995 C 1598 2996 """ 1599 2997 return self._get("STATE_LIST") 2998 1600 2999 def version_number(self): 1601 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1602 L 3000 """ 3001 Dim Service 3002 Native Dim service: Version number of Dim in use 3003 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 3004 L 1603 3005 """ 1604 3006 return self._get("VERSION_NUMBER") 3007 1605 3008 def service_desc(self): 1606 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1607 C 3009 """ 3010 Dim Service 3011 Descriptions of services or commands and there arguments 3012 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3013 C 1608 3014 """ 1609 3015 return self._get("SERVICE_DESC") 3016 1610 3017 def msg(self, *args): 1611 """ |msg[string]:message to be distributed 1612 C 3018 """ 3019 Dim Command 3020 msg[string]:message to be distributed 3021 C 1613 3022 """ 1614 3023 self._cmd("MSG", *args) 3024 1615 3025 def state(self): 1616 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1617 C 3026 """ 3027 Dim Service 3028 Provides the state of the state machine as quality of service. 3029 Text[string]:A human readable string sent by the last state change. 3030 C 1618 3031 """ 1619 3032 return self._get("STATE") 3033 1620 3034 def service_list(self): 1621 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1622 C 3035 """ 3036 Dim Service 3037 Native Dim service: List of services, commands and formats 3038 ServiceList[string]:For details see the Dim manual. 3039 C 1623 3040 """ 1624 3041 return self._get("SERVICE_LIST") 3042 1625 3043 def message(self): 1626 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1627 C 3044 """ 3045 Dim Service 3046 A general logging service providing a quality of service (severity) 3047 Message[string]:The message 3048 C 1628 3049 """ 1629 3050 return self._get("MESSAGE") 3051 1630 3052 class DRIVE_CONTROL ( FactDimServer): 1631 3053 def track_on(self, *args): 1632 """ Move the telescope to the given position and start tracking|Name[string]:Source name 1633 C 3054 """ 3055 Dim Command 3056 Move the telescope to the given position and start tracking 3057 Name[string]:Source name 3058 C 1634 3059 """ 1635 3060 self._cmd("TRACK_ON", *args) 3061 1636 3062 def status(self): 1637 """ DESC in SERVICE_DESC is empty ?! 1638 C:2;C:1 3063 """ 3064 Dim Service 3065 DESC in SERVICE_DESC is empty ?! 3066 C:2;C:1 1639 3067 """ 1640 3068 return self._get("STATUS") 3069 1641 3070 def state_list(self): 1642 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1643 C 3071 """ 3072 Dim Service 3073 Provides a list with descriptions for each service. 3074 StateList[string]:A \n separated list of the form id:name=description 3075 C 1644 3076 """ 1645 3077 return self._get("STATE_LIST") 3078 1646 3079 def set_led_brightness(self, *args): 1647 """ Set the LED brightness of the top and bottom leds|top[au]:Allowed range 0-32767 for top LEDs|bot[au]:Allowed range 0-32767 for bottom LEDs 1648 I:2 3080 """ 3081 Dim Command 3082 Set the LED brightness of the top and bottom leds 3083 top[au]:Allowed range 0-32767 for top LEDs 3084 bot[au]:Allowed range 0-32767 for bottom LEDs 3085 I:2 1649 3086 """ 1650 3087 self._cmd("SET_LED_BRIGHTNESS", *args) 3088 1651 3089 def track_wobble(self, *args): 1652 """ Move the telescope to the given wobble position around the given source and start tracking|id:Wobble angle id (1 or 2)|Name[string]:Source name 1653 S:1;C 3090 """ 3091 Dim Command 3092 Move the telescope to the given wobble position around the given source and start tracking 3093 id:Wobble angle id (1 or 2) 3094 Name[string]:Source name 3095 S:1;C 1654 3096 """ 1655 3097 self._cmd("TRACK_WOBBLE", *args) 3098 1656 3099 def wobble(self, *args): 1657 """ Move the telescope to the given wobble position around the given sky coordinates and start tracking them|Ra[h]:Right ascension|Dec[deg]:Declination|Offset[deg]:Wobble offset|Angle[deg]:Wobble angle 1658 D:4 3100 """ 3101 Dim Command 3102 Move the telescope to the given wobble position around the given sky coordinates and start tracking them 3103 Ra[h]:Right ascension 3104 Dec[deg]:Declination 3105 Offset[deg]:Wobble offset 3106 Angle[deg]:Wobble angle 3107 D:4 1659 3108 """ 1660 3109 self._cmd("WOBBLE", *args) 3110 1661 3111 def source_position(self): 1662 """ |Ra_src[h]:Source right ascension|Dec_src[deg]:Source declination|Ra_cmd[h]:Command right ascension|Dec_cmd[deg]:Command declination|Offset[deg]:Wobble offset|Angle[deg]:Wobble angle|Name[string]:Source name if available 1663 D:1;D:1;D:1;D:1;D:1;D:1;C:31 3112 """ 3113 Dim Service 3114 Ra_src[h]:Source right ascension 3115 Dec_src[deg]:Source declination 3116 Ra_cmd[h]:Command right ascension 3117 Dec_cmd[deg]:Command declination 3118 Offset[deg]:Wobble offset 3119 Angle[deg]:Wobble angle 3120 Name[string]:Source name if available 3121 D:1;D:1;D:1;D:1;D:1;D:1;C:31 1664 3122 """ 1665 3123 return self._get("SOURCE_POSITION") 3124 1666 3125 def move_to(self, *args): 1667 """ Move the telescope to the given local coordinates|Zd[deg]:Zenith distance|Az[deg]:Azimuth 1668 D:2 3126 """ 3127 Dim Command 3128 Move the telescope to the given local coordinates 3129 Zd[deg]:Zenith distance 3130 Az[deg]:Azimuth 3131 D:2 1669 3132 """ 1670 3133 self._cmd("MOVE_TO", *args) 3134 1671 3135 def stop(self, *args): 1672 """ Stop any kind of movement. 1673 3136 """ 3137 Dim Command 3138 Stop any kind of movement. 3139 1674 3140 """ 1675 3141 self._cmd("STOP", *args) 3142 1676 3143 def leds_off(self, *args): 1677 """ Switch off TPoint LEDs 1678 3144 """ 3145 Dim Command 3146 Switch off TPoint LEDs 3147 1679 3148 """ 1680 3149 self._cmd("LEDS_OFF", *args) 3150 1681 3151 def jupiter(self, *args): 1682 """ Start tracking Jupiter 1683 3152 """ 3153 Dim Command 3154 Start tracking Jupiter 3155 1684 3156 """ 1685 3157 self._cmd("JUPITER", *args) 3158 1686 3159 def park(self, *args): 1687 """ Park the telescope 1688 3160 """ 3161 Dim Command 3162 Park the telescope 3163 1689 3164 """ 1690 3165 self._cmd("PARK", *args) 3166 1691 3167 def service_desc(self): 1692 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1693 C 3168 """ 3169 Dim Service 3170 Descriptions of services or commands and there arguments 3171 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3172 C 1694 3173 """ 1695 3174 return self._get("SERVICE_DESC") 3175 1696 3176 def service_list(self): 1697 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1698 C 3177 """ 3178 Dim Service 3179 Native Dim service: List of services, commands and formats 3180 ServiceList[string]:For details see the Dim manual. 3181 C 1699 3182 """ 1700 3183 return self._get("SERVICE_LIST") 3184 1701 3185 def moon(self, *args): 1702 """ Start tracking the moon 1703 3186 """ 3187 Dim Command 3188 Start tracking the moon 3189 1704 3190 """ 1705 3191 self._cmd("MOON", *args) 3192 1706 3193 def reload_sources(self, *args): 1707 """ Reload sources from database after database has changed.. 1708 3194 """ 3195 Dim Command 3196 Reload sources from database after database has changed.. 3197 1709 3198 """ 1710 3199 self._cmd("RELOAD_SOURCES", *args) 3200 1711 3201 def exit(self, *args): 1712 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1713 L:1 3202 """ 3203 Dim Command 3204 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 3205 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 3206 L:1 1714 3207 """ 1715 3208 self._cmd("EXIT", *args) 3209 1716 3210 def print_cmd(self, *args): 1717 """ Print source list. 1718 3211 """ 3212 Dim Command 3213 Print source list. 3214 1719 3215 """ 1720 3216 self._cmd("PRINT_CMD", *args) 3217 1721 3218 def set_verbose(self, *args): 1722 """ Set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 1723 B 3219 """ 3220 Dim Command 3221 Set verbosity state 3222 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 3223 B 1724 3224 """ 1725 3225 self._cmd("SET_VERBOSE", *args) 3226 1726 3227 def message(self): 1727 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1728 C 3228 """ 3229 Dim Service 3230 A general logging service providing a quality of service (severity) 3231 Message[string]:The message 3232 C 1729 3233 """ 1730 3234 return self._get("MESSAGE") 3235 1731 3236 def resume(self, *args): 1732 """ If drive is in Error state, this can b used to resume the last tracking command, if the last command sent to cosy was a tracking command. 1733 3237 """ 3238 Dim Command 3239 If drive is in Error state, this can b used to resume the last tracking command, if the last command sent to cosy was a tracking command. 3240 1734 3241 """ 1735 3242 self._cmd("RESUME", *args) 3243 1736 3244 def tpoint(self): 1737 """ Take a TPoint (given values will be written to the TPoint files)|mag[float]:Magnitude of the star|name[string]:Name of the star 1738 D:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1;S:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1;C 3245 """ 3246 Dim Service 3247 Take a TPoint (given values will be written to the TPoint files) 3248 mag[float]:Magnitude of the star 3249 name[string]:Name of the star 3250 D:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1;S:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1;C 1739 3251 """ 1740 3252 return self._get("TPOINT") 3253 1741 3254 def set_autoresume(self, *args): 1742 """ Enable/disable auto resume|resume[bool]:if enabled, drive is tracking and goes to error state, the last tracking command is repeated automatically. 1743 B 3255 """ 3256 Dim Command 3257 Enable/disable auto resume 3258 resume[bool]:if enabled, drive is tracking and goes to error state, the last tracking command is repeated automatically. 3259 B 1744 3260 """ 1745 3261 self._cmd("SET_AUTORESUME", *args) 3262 1746 3263 def reconnect(self, *args): 1747 """ (Re)connect ethernet connection to FTM, a new address can be given|[host][string]:new ethernet address in the form <host:port> 1748 O 3264 """ 3265 Dim Command 3266 (Re)connect ethernet connection to FTM, a new address can be given 3267 [host][string]:new ethernet address in the form <host:port> 3268 O 1749 3269 """ 1750 3270 self._cmd("RECONNECT", *args) 3271 1751 3272 def tracking_position(self): 1752 """ |Ra[h]:Command right ascension|Dec[deg]:Command declination|Ha[h]:Corresponding hour angle|Zd[deg]:Nominal zenith distance|Az[deg]:Nominal azimuth angle|dZd[deg]:Control deviation Zd|dAz[deg]:Control deviation Az|dev[arcsec]:Absolute control deviation 1753 D:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1 3273 """ 3274 Dim Service 3275 Ra[h]:Command right ascension 3276 Dec[deg]:Command declination 3277 Ha[h]:Corresponding hour angle 3278 Zd[deg]:Nominal zenith distance 3279 Az[deg]:Nominal azimuth angle 3280 dZd[deg]:Control deviation Zd 3281 dAz[deg]:Control deviation Az 3282 dev[arcsec]:Absolute control deviation 3283 D:1;D:1;D:1;D:1;D:1;D:1;D:1;D:1 1754 3284 """ 1755 3285 return self._get("TRACKING_POSITION") 3286 1756 3287 def venus(self, *args): 1757 """ Start tracking Venus 1758 3288 """ 3289 Dim Command 3290 Start tracking Venus 3291 1759 3292 """ 1760 3293 self._cmd("VENUS", *args) 3294 1761 3295 def take_tpoint(self, *args): 1762 """ Take a TPoint 1763 3296 """ 3297 Dim Command 3298 Take a TPoint 3299 1764 3300 """ 1765 3301 self._cmd("TAKE_TPOINT", *args) 3302 1766 3303 def disconnect(self, *args): 1767 """ disconnect from ethernet 1768 3304 """ 3305 Dim Command 3306 disconnect from ethernet 3307 1769 3308 """ 1770 3309 self._cmd("DISCONNECT", *args) 3310 1771 3311 def saturn(self, *args): 1772 """ Start tracking Saturn 1773 3312 """ 3313 Dim Command 3314 Start tracking Saturn 3315 1774 3316 """ 1775 3317 self._cmd("SATURN", *args) 3318 1776 3319 def unlock(self, *args): 1777 """ Unlock locked state. 1778 3320 """ 3321 Dim Command 3322 Unlock locked state. 3323 1779 3324 """ 1780 3325 self._cmd("UNLOCK", *args) 3326 1781 3327 def state(self): 1782 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1783 C 3328 """ 3329 Dim Service 3330 Provides the state of the state machine as quality of service. 3331 Text[string]:A human readable string sent by the last state change. 3332 C 1784 3333 """ 1785 3334 return self._get("STATE") 3335 1786 3336 def pointing_position(self): 1787 """ |Zd[deg]:Zenith distance (encoder readout)|Az[deg]:Azimuth angle (encoder readout) 1788 D:1;D:1 3337 """ 3338 Dim Service 3339 Zd[deg]:Zenith distance (encoder readout) 3340 Az[deg]:Azimuth angle (encoder readout) 3341 D:1;D:1 1789 3342 """ 1790 3343 return self._get("POINTING_POSITION") 3344 1791 3345 def track(self, *args): 1792 """ Move the telescope to the given sky coordinates and start tracking them|Ra[h]:Right ascension|Dec[deg]:Declination 1793 D:2 3346 """ 3347 Dim Command 3348 Move the telescope to the given sky coordinates and start tracking them 3349 Ra[h]:Right ascension 3350 Dec[deg]:Declination 3351 D:2 1794 3352 """ 1795 3353 self._cmd("TRACK", *args) 3354 1796 3355 def client_list(self): 1797 """ Native Dim service: A list of all connected clients 1798 C 3356 """ 3357 Dim Service 3358 Native Dim service: A list of all connected clients 3359 C 1799 3360 """ 1800 3361 return self._get("CLIENT_LIST") 3362 1801 3363 def mars(self, *args): 1802 """ Start tracking Mars 1803 3364 """ 3365 Dim Command 3366 Start tracking Mars 3367 1804 3368 """ 1805 3369 self._cmd("MARS", *args) 3370 1806 3371 def track_source(self, *args): 1807 """ Move the telescope to the given wobble position around the given source and start tracking|Offset[deg]:Wobble offset|Angle[deg]:Wobble angle|Name[string]:Source name 1808 D:2;C 3372 """ 3373 Dim Command 3374 Move the telescope to the given wobble position around the given source and start tracking 3375 Offset[deg]:Wobble offset 3376 Angle[deg]:Wobble angle 3377 Name[string]:Source name 3378 D:2;C 1809 3379 """ 1810 3380 self._cmd("TRACK_SOURCE", *args) 3381 1811 3382 def version_number(self): 1812 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1813 L 3383 """ 3384 Dim Service 3385 Native Dim service: Version number of Dim in use 3386 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 3387 L 1814 3388 """ 1815 3389 return self._get("VERSION_NUMBER") 3390 1816 3391 class SMART_FACT ( FactDimServer): 1817 3392 def print_cmd(self, *args): 1818 """ Print a list of the states of all connected servers. 1819 3393 """ 3394 Dim Command 3395 Print a list of the states of all connected servers. 3396 1820 3397 """ 1821 3398 self._cmd("PRINT_CMD", *args) 3399 1822 3400 def service_list(self): 1823 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1824 C 3401 """ 3402 Dim Service 3403 Native Dim service: List of services, commands and formats 3404 ServiceList[string]:For details see the Dim manual. 3405 C 1825 3406 """ 1826 3407 return self._get("SERVICE_LIST") 3408 1827 3409 def version_number(self): 1828 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1829 L 3410 """ 3411 Dim Service 3412 Native Dim service: Version number of Dim in use 3413 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 3414 L 1830 3415 """ 1831 3416 return self._get("VERSION_NUMBER") 3417 1832 3418 def client_list(self): 1833 """ Native Dim service: A list of all connected clients 1834 C 3419 """ 3420 Dim Service 3421 Native Dim service: A list of all connected clients 3422 C 1835 3423 """ 1836 3424 return self._get("CLIENT_LIST") 3425 1837 3426 def service_desc(self): 1838 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1839 C 3427 """ 3428 Dim Service 3429 Descriptions of services or commands and there arguments 3430 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3431 C 1840 3432 """ 1841 3433 return self._get("SERVICE_DESC") 3434 1842 3435 def exit(self, *args): 1843 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1844 L:1 3436 """ 3437 Dim Command 3438 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 3439 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 3440 L:1 1845 3441 """ 1846 3442 self._cmd("EXIT", *args) 3443 1847 3444 def message(self): 1848 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1849 C 3445 """ 3446 Dim Service 3447 A general logging service providing a quality of service (severity) 3448 Message[string]:The message 3449 C 1850 3450 """ 1851 3451 return self._get("MESSAGE") 3452 1852 3453 def state(self): 1853 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1854 C 3454 """ 3455 Dim Service 3456 Provides the state of the state machine as quality of service. 3457 Text[string]:A human readable string sent by the last state change. 3458 C 1855 3459 """ 1856 3460 return self._get("STATE") 3461 1857 3462 def state_list(self): 1858 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1859 C 3463 """ 3464 Dim Service 3465 Provides a list with descriptions for each service. 3466 StateList[string]:A \n separated list of the form id:name=description 3467 C 1860 3468 """ 1861 3469 return self._get("STATE_LIST") 3470 1862 3471 class MCP ( FactDimServer): 1863 3472 def message(self): 1864 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1865 C 3473 """ 3474 Dim Service 3475 A general logging service providing a quality of service (severity) 3476 Message[string]:The message 3477 C 1866 3478 """ 1867 3479 return self._get("MESSAGE") 3480 1868 3481 def state_list(self): 1869 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1870 C 3482 """ 3483 Dim Service 3484 Provides a list with descriptions for each service. 3485 StateList[string]:A \n separated list of the form id:name=description 3486 C 1871 3487 """ 1872 3488 return self._get("STATE_LIST") 3489 1873 3490 def version_number(self): 1874 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1875 L 3491 """ 3492 Dim Service 3493 Native Dim service: Version number of Dim in use 3494 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 3495 L 1876 3496 """ 1877 3497 return self._get("VERSION_NUMBER") 3498 1878 3499 def print_cmd(self, *args): 1879 """ Print the states and connection status of all systems connected to the MCP. 1880 3500 """ 3501 Dim Command 3502 Print the states and connection status of all systems connected to the MCP. 3503 1881 3504 """ 1882 3505 self._cmd("PRINT_CMD", *args) 3506 1883 3507 def exit(self, *args): 1884 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1885 L:1 3508 """ 3509 Dim Command 3510 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 3511 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 3512 L:1 1886 3513 """ 1887 3514 self._cmd("EXIT", *args) 3515 1888 3516 def client_list(self): 1889 """ Native Dim service: A list of all connected clients 1890 C 3517 """ 3518 Dim Service 3519 Native Dim service: A list of all connected clients 3520 C 1891 3521 """ 1892 3522 return self._get("CLIENT_LIST") 3523 1893 3524 def stop(self, *args): 1894 """ Stops the trigger (either disables the FTM trigger or the internal DRS trigger) 1895 3525 """ 3526 Dim Command 3527 Stops the trigger (either disables the FTM trigger or the internal DRS trigger) 3528 1896 3529 """ 1897 3530 self._cmd("STOP", *args) 3531 1898 3532 def service_list(self): 1899 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1900 C 3533 """ 3534 Dim Service 3535 Native Dim service: List of services, commands and formats 3536 ServiceList[string]:For details see the Dim manual. 3537 C 1901 3538 """ 1902 3539 return self._get("SERVICE_LIST") 3540 1903 3541 def service_desc(self): 1904 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1905 C 3542 """ 3543 Dim Service 3544 Descriptions of services or commands and there arguments 3545 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3546 C 1906 3547 """ 1907 3548 return self._get("SERVICE_DESC") 3549 1908 3550 def start(self, *args): 1909 """ Start the configuration and data taking for a run-type of a pre-defined setup|TimeMax[s]:Maximum number of seconds before the run will be closed automatically|NumMax[count]:Maximum number events before the run will be closed automatically|Name[text]:Name of the configuration to be used for taking data 1910 X:2;C 3551 """ 3552 Dim Command 3553 Start the configuration and data taking for a run-type of a pre-defined setup 3554 TimeMax[s]:Maximum number of seconds before the run will be closed automatically 3555 NumMax[count]:Maximum number events before the run will be closed automatically 3556 Name[text]:Name of the configuration to be used for taking data 3557 X:2;C 1911 3558 """ 1912 3559 self._cmd("START", *args) 3560 1913 3561 def reset(self, *args): 1914 """ If a configuration blockes because a system cannot configure itself properly, this command can be called to leave the configuration procedure. The command is also propagated to FTM and FAD 1915 3562 """ 3563 Dim Command 3564 If a configuration blockes because a system cannot configure itself properly, this command can be called to leave the configuration procedure. The command is also propagated to FTM and FAD 3565 1916 3566 """ 1917 3567 self._cmd("RESET", *args) 3568 1918 3569 def configuration(self): 1919 """ Run configuration information|MaxTime[s]:Maximum time before the run gets stopped|MaxEvents[num]:Maximum number of events before the run gets stopped|Name[text]:Name of the chosen configuration 1920 X:1;X:1;C 3570 """ 3571 Dim Service 3572 Run configuration information 3573 MaxTime[s]:Maximum time before the run gets stopped 3574 MaxEvents[num]:Maximum number of events before the run gets stopped 3575 Name[text]:Name of the chosen configuration 3576 X:1;X:1;C 1921 3577 """ 1922 3578 return self._get("CONFIGURATION") 3579 1923 3580 def state(self): 1924 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1925 C 3581 """ 3582 Dim Service 3583 Provides the state of the state machine as quality of service. 3584 Text[string]:A human readable string sent by the last state change. 3585 C 1926 3586 """ 1927 3587 return self._get("STATE") 3588 1928 3589 class TIME_CHECK ( FactDimServer): 1929 3590 def message(self): 1930 """ A general logging service providing a quality of service (severity)|Message[string]:The message 1931 C 3591 """ 3592 Dim Service 3593 A general logging service providing a quality of service (severity) 3594 Message[string]:The message 3595 C 1932 3596 """ 1933 3597 return self._get("MESSAGE") 3598 1934 3599 def exit(self, *args): 1935 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 1936 L:1 3600 """ 3601 Dim Command 3602 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 3603 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 3604 L:1 1937 3605 """ 1938 3606 self._cmd("EXIT", *args) 3607 1939 3608 def state(self): 1940 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 1941 C 3609 """ 3610 Dim Service 3611 Provides the state of the state machine as quality of service. 3612 Text[string]:A human readable string sent by the last state change. 3613 C 1942 3614 """ 1943 3615 return self._get("STATE") 3616 1944 3617 def service_list(self): 1945 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 1946 C 3618 """ 3619 Dim Service 3620 Native Dim service: List of services, commands and formats 3621 ServiceList[string]:For details see the Dim manual. 3622 C 1947 3623 """ 1948 3624 return self._get("SERVICE_LIST") 3625 1949 3626 def version_number(self): 1950 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 1951 L 3627 """ 3628 Dim Service 3629 Native Dim service: Version number of Dim in use 3630 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 3631 L 1952 3632 """ 1953 3633 return self._get("VERSION_NUMBER") 3634 1954 3635 def state_list(self): 1955 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 1956 C 3636 """ 3637 Dim Service 3638 Provides a list with descriptions for each service. 3639 StateList[string]:A \n separated list of the form id:name=description 3640 C 1957 3641 """ 1958 3642 return self._get("STATE_LIST") 3643 1959 3644 def service_desc(self): 1960 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 1961 C 3645 """ 3646 Dim Service 3647 Descriptions of services or commands and there arguments 3648 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3649 C 1962 3650 """ 1963 3651 return self._get("SERVICE_DESC") 3652 1964 3653 def client_list(self): 1965 """ Native Dim service: A list of all connected clients 1966 C 3654 """ 3655 Dim Service 3656 Native Dim service: A list of all connected clients 3657 C 1967 3658 """ 1968 3659 return self._get("CLIENT_LIST") 3660 1969 3661 class BIAS_CONTROL ( FactDimServer): 1970 3662 def dac(self): 1971 """ |U[dac]:Current dac setting|Uref[dac]:Reference dac setting 1972 S:416;S:416 3663 """ 3664 Dim Service 3665 U[dac]:Current dac setting 3666 Uref[dac]:Reference dac setting 3667 S:416;S:416 1973 3668 """ 1974 3669 return self._get("DAC") 3670 1975 3671 def set_channel_dac(self, *args): 1976 """ Set a new target value in DAC counts for a single channel. Starts ramping if necessary.|channel[short]:Channel for which to set the target voltage [0-415]|voltage[dac]:Target voltage in DAC units for the given channel 1977 S:1;S:1 3672 """ 3673 Dim Command 3674 Set a new target value in DAC counts for a single channel. Starts ramping if necessary. 3675 channel[short]:Channel for which to set the target voltage [0-415] 3676 voltage[dac]:Target voltage in DAC units for the given channel 3677 S:1;S:1 1978 3678 """ 1979 3679 self._cmd("SET_CHANNEL_DAC", *args) 3680 1980 3681 def request_status(self, *args): 1981 """ Asynchronously request the status (current) of all channels. 1982 3682 """ 3683 Dim Command 3684 Asynchronously request the status (current) of all channels. 3685 1983 3686 """ 1984 3687 self._cmd("REQUEST_STATUS", *args) 3688 1985 3689 def expert_reset(self, *args): 1986 """ Send the RESET command (note that this is possibly harmfull command) 1987 3690 """ 3691 Dim Command 3692 Send the RESET command (note that this is possibly harmfull command) 3693 1988 3694 """ 1989 3695 self._cmd("EXPERT_RESET", *args) 3696 1990 3697 def increase_all_channels_voltage(self, *args): 1991 """ Add the given voltages to the current reference voltages. Starts ramping if necessary.offset[V]:Offsets to be added to the reference voltage of all channels in volts 1992 F:416 3698 """ 3699 Dim Command 3700 Add the given voltages to the current reference voltages. Starts ramping if necessary.offset[V]:Offsets to be added to the reference voltage of all channels in volts 3701 F:416 1993 3702 """ 1994 3703 self._cmd("INCREASE_ALL_CHANNELS_VOLTAGE", *args) 3704 1995 3705 def reset_over_current_status(self, *args): 1996 """ Set all channels in over current state to 0V and send a system reset to reset the over current flags. 1997 3706 """ 3707 Dim Command 3708 Set all channels in over current state to 0V and send a system reset to reset the over current flags. 3709 1998 3710 """ 1999 3711 self._cmd("RESET_OVER_CURRENT_STATUS", *args) 3712 2000 3713 def print_currents(self, *args): 2001 """ Print a table with all current read back with the last request operation 2002 3714 """ 3715 Dim Command 3716 Print a table with all current read back with the last request operation 3717 2003 3718 """ 2004 3719 self._cmd("PRINT_CURRENTS", *args) 3720 2005 3721 def print_info(self, *args): 2006 """ Print a table with all current read back with the last request operation 2007 3722 """ 3723 Dim Command 3724 Print a table with all current read back with the last request operation 3725 2008 3726 """ 2009 3727 self._cmd("PRINT_INFO", *args) 3728 2010 3729 def reconnect(self, *args): 2011 """ (Re)connect USB connection to Bias power supply, a new address can be given|tty[string]:new USB address 2012 O 3730 """ 3731 Dim Command 3732 (Re)connect USB connection to Bias power supply, a new address can be given 3733 tty[string]:new USB address 3734 O 2013 3735 """ 2014 3736 self._cmd("RECONNECT", *args) 3737 2015 3738 def enable_dummy_mode(self, *args): 2016 """ Enable dummy mode. In this mode SetAllChannels prints informations instead of sending anything to the bias crate.|enable[bool]:disable or enable dummy mode 2017 B:1 3739 """ 3740 Dim Command 3741 Enable dummy mode. In this mode SetAllChannels prints informations instead of sending anything to the bias crate. 3742 enable[bool]:disable or enable dummy mode 3743 B:1 2018 3744 """ 2019 3745 self._cmd("ENABLE_DUMMY_MODE", *args) 3746 2020 3747 def set_channel_offset_to_zero(self, *args): 2021 """ Set a single channel channels to its G-APD reference voltage. Starts ramping if necessary.|channel[short]:Channel for which to set the target voltage [0-416] 2022 S:1 3748 """ 3749 Dim Command 3750 Set a single channel channels to its G-APD reference voltage. Starts ramping if necessary. 3751 channel[short]:Channel for which to set the target voltage [0-416] 3752 S:1 2023 3753 """ 2024 3754 self._cmd("SET_CHANNEL_OFFSET_TO_ZERO", *args) 3755 2025 3756 def exit(self, *args): 2026 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2027 L:1 3757 """ 3758 Dim Command 3759 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 3760 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 3761 L:1 2028 3762 """ 2029 3763 self._cmd("EXIT", *args) 3764 2030 3765 def set_channel_voltage(self, *args): 2031 """ Set a new target voltage for a single channel. Starts ramping if necessary.|channel[short]:Channel for which to set the target voltage [0-415]|voltage[V]:Target voltage in volts for the given channel (will be converted to DAC units) 2032 S:1;F:1 3766 """ 3767 Dim Command 3768 Set a new target voltage for a single channel. Starts ramping if necessary. 3769 channel[short]:Channel for which to set the target voltage [0-415] 3770 voltage[V]:Target voltage in volts for the given channel (will be converted to DAC units) 3771 S:1;F:1 2033 3772 """ 2034 3773 self._cmd("SET_CHANNEL_VOLTAGE", *args) 3774 2035 3775 def set_global_dac(self, *args): 2036 """ Set a new target value for all channels in DAC counts. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.)|voltage[dac]:Global target voltage in DAC counts. 2037 S:1 3776 """ 3777 Dim Command 3778 Set a new target value for all channels in DAC counts. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.) 3779 voltage[dac]:Global target voltage in DAC counts. 3780 S:1 2038 3781 """ 2039 3782 self._cmd("SET_GLOBAL_DAC", *args) 3783 2040 3784 def set_all_channels_voltage(self, *args): 2041 """ Set all channels to the given new reference voltage. Starts ramping if necessary.voltage[V]:New reference voltage for all channels 2042 F:416 3785 """ 3786 Dim Command 3787 Set all channels to the given new reference voltage. Starts ramping if necessary.voltage[V]:New reference voltage for all channels 3788 F:416 2043 3789 """ 2044 3790 self._cmd("SET_ALL_CHANNELS_VOLTAGE", *args) 3791 2045 3792 def voltage(self): 2046 """ |Uout[V]:Output voltage 2047 F:416 3793 """ 3794 Dim Service 3795 Uout[V]:Output voltage 3796 F:416 2048 3797 """ 2049 3798 return self._get("VOLTAGE") 3799 2050 3800 def stop(self, *args): 2051 """ Stop an on-going ramping 2052 3801 """ 3802 Dim Command 3803 Stop an on-going ramping 3804 2053 3805 """ 2054 3806 self._cmd("STOP", *args) 3807 2055 3808 def expert_set_channel_voltage(self, *args): 2056 """ Send a single channel set command. The given voltage is converted to DAC commands. 2057 S:1;F:1 3809 """ 3810 Dim Command 3811 Send a single channel set command. The given voltage is converted to DAC commands. 3812 S:1;F:1 2058 3813 """ 2059 3814 self._cmd("EXPERT_SET_CHANNEL_VOLTAGE", *args) 3815 2060 3816 def set_zero_voltage(self, *args): 2061 """ Set all channels to a zero reference voltage. Starts ramping if necessary. 2062 3817 """ 3818 Dim Command 3819 Set all channels to a zero reference voltage. Starts ramping if necessary. 3820 2063 3821 """ 2064 3822 self._cmd("SET_ZERO_VOLTAGE", *args) 3823 2065 3824 def client_list(self): 2066 """ Native Dim service: A list of all connected clients 2067 C 3825 """ 3826 Dim Service 3827 Native Dim service: A list of all connected clients 3828 C 2068 3829 """ 2069 3830 return self._get("CLIENT_LIST") 3831 2070 3832 def print_voltages(self, *args): 2071 """ Print a table with all voltages (current and reference voltages as currently in memory) 2072 3833 """ 3834 Dim Command 3835 Print a table with all voltages (current and reference voltages as currently in memory) 3836 2073 3837 """ 2074 3838 self._cmd("PRINT_VOLTAGES", *args) 3839 2075 3840 def increase_global_voltage(self, *args): 2076 """ Increases the voltage of all channels by the given offset. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.)|offset[V]:Offset to be added to all channels (will be converted to DAC counts) 2077 F:1 3841 """ 3842 Dim Command 3843 Increases the voltage of all channels by the given offset. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.) 3844 offset[V]:Offset to be added to all channels (will be converted to DAC counts) 3845 F:1 2078 3846 """ 2079 3847 self._cmd("INCREASE_GLOBAL_VOLTAGE", *args) 3848 2080 3849 def set_global_voltage(self, *args): 2081 """ Set a new target voltage for all channels. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.)|voltage[V]:Global target voltage in volts (will be converted to DAC units) 2082 F:1 3850 """ 3851 Dim Command 3852 Set a new target voltage for all channels. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.) 3853 voltage[V]:Global target voltage in volts (will be converted to DAC units) 3854 F:1 2083 3855 """ 2084 3856 self._cmd("SET_GLOBAL_VOLTAGE", *args) 3857 2085 3858 def state_list(self): 2086 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 2087 C 3859 """ 3860 Dim Service 3861 Provides a list with descriptions for each service. 3862 StateList[string]:A \n separated list of the form id:name=description 3863 C 2088 3864 """ 2089 3865 return self._get("STATE_LIST") 3866 2090 3867 def expert_set_global_dac(self, *args): 2091 """ Send the global set command. 2092 S:1 3868 """ 3869 Dim Command 3870 Send the global set command. 3871 S:1 2093 3872 """ 2094 3873 self._cmd("EXPERT_SET_GLOBAL_DAC", *args) 3874 2095 3875 def nominal(self): 2096 """ |Ubr[V]:Nominal breakdown voltage at 25deg C|Uov[V]:Nominal overvoltage|Uoff[V]:Bias crate channel offsets 2097 F:416;F:416;F:416 3876 """ 3877 Dim Service 3878 Ubr[V]:Nominal breakdown voltage at 25deg C 3879 Uov[V]:Nominal overvoltage 3880 Uoff[V]:Bias crate channel offsets 3881 F:416;F:416;F:416 2098 3882 """ 2099 3883 return self._get("NOMINAL") 3884 2100 3885 def set_update_interval(self, *args): 2101 """ Set the updat einterval how often the currents are requested|interval[ms]:Update interval in milliseconds 2102 I:1 3886 """ 3887 Dim Command 3888 Set the updat einterval how often the currents are requested 3889 interval[ms]:Update interval in milliseconds 3890 I:1 2103 3891 """ 2104 3892 self._cmd("SET_UPDATE_INTERVAL", *args) 3893 2105 3894 def expert_set_channel_dac(self, *args): 2106 """ Send a single channel set command. 2107 S:1;S:1 3895 """ 3896 Dim Command 3897 Send a single channel set command. 3898 S:1;S:1 2108 3899 """ 2109 3900 self._cmd("EXPERT_SET_CHANNEL_DAC", *args) 3901 2110 3902 def increase_channel_voltage(self, *args): 2111 """ Increases the voltage of all channels by the given offset. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.)|channel[short]:Channel for which to adapt the voltage [0-415]|offset[V]:Offset to be added to all channels (will be converted to DAC counts) 2112 S:1;F:1 3903 """ 3904 Dim Command 3905 Increases the voltage of all channels by the given offset. Starts ramping if necessary. (This command is not realized with the GLOBAL SET command.) 3906 channel[short]:Channel for which to adapt the voltage [0-415] 3907 offset[V]:Offset to be added to all channels (will be converted to DAC counts) 3908 S:1;F:1 2113 3909 """ 2114 3910 self._cmd("INCREASE_CHANNEL_VOLTAGE", *args) 3911 2115 3912 def set_all_channels_offset(self, *args): 2116 """ Set all channels to their G-APD reference voltage plus the given offset. Starts ramping if necessary.|offset[V]:Offset to be added to teh G-APD reference voltage globally 2117 F:416 3913 """ 3914 Dim Command 3915 Set all channels to their G-APD reference voltage plus the given offset. Starts ramping if necessary. 3916 offset[V]:Offset to be added to teh G-APD reference voltage globally 3917 F:416 2118 3918 """ 2119 3919 self._cmd("SET_ALL_CHANNELS_OFFSET", *args) 3920 2120 3921 def set_global_offset_to_zero(self, *args): 2121 """ Set all channels to their G-APD reference voltage. Starts ramping if necessary. 2122 3922 """ 3923 Dim Command 3924 Set all channels to their G-APD reference voltage. Starts ramping if necessary. 3925 2123 3926 """ 2124 3927 self._cmd("SET_GLOBAL_OFFSET_TO_ZERO", *args) 3928 2125 3929 def set_global_offset(self, *args): 2126 """ Set all channels to their G-APD breakdown voltage plus overvoltage plus the given offset. Starts ramping if necessary.|offset[V]:Offset to be added to the G-APD reference voltage globally 2127 F:1 3930 """ 3931 Dim Command 3932 Set all channels to their G-APD breakdown voltage plus overvoltage plus the given offset. Starts ramping if necessary. 3933 offset[V]:Offset to be added to the G-APD reference voltage globally 3934 F:1 2128 3935 """ 2129 3936 self._cmd("SET_GLOBAL_OFFSET", *args) 3937 2130 3938 def current(self): 2131 """ |I[dac]:Bias current (conversion: 5000uA/4096dac) 2132 S:416 3939 """ 3940 Dim Service 3941 I[dac]:Bias current (conversion: 5000uA/4096dac) 3942 S:416 2133 3943 """ 2134 3944 return self._get("CURRENT") 3945 2135 3946 def service_desc(self): 2136 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 2137 C 3947 """ 3948 Dim Service 3949 Descriptions of services or commands and there arguments 3950 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 3951 C 2138 3952 """ 2139 3953 return self._get("SERVICE_DESC") 3954 2140 3955 def message(self): 2141 """ A general logging service providing a quality of service (severity)|Message[string]:The message 2142 C 3956 """ 3957 Dim Service 3958 A general logging service providing a quality of service (severity) 3959 Message[string]:The message 3960 C 2143 3961 """ 2144 3962 return self._get("MESSAGE") 3963 2145 3964 def state(self): 2146 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 2147 C 3965 """ 3966 Dim Service 3967 Provides the state of the state machine as quality of service. 3968 Text[string]:A human readable string sent by the last state change. 3969 C 2148 3970 """ 2149 3971 return self._get("STATE") 3972 2150 3973 def print_gapd_reference_voltages(self, *args): 2151 """ Print the G-APD reference values (breakdown voltage + overvoltage) obtained from file 2152 3974 """ 3975 Dim Command 3976 Print the G-APD reference values (breakdown voltage + overvoltage) obtained from file 3977 2153 3978 """ 2154 3979 self._cmd("PRINT_GAPD_REFERENCE_VOLTAGES", *args) 3980 2155 3981 def set_verbose(self, *args): 2156 """ set verbosity state|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 2157 B:1 3982 """ 3983 Dim Command 3984 set verbosity state 3985 verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data 3986 B:1 2158 3987 """ 2159 3988 self._cmd("SET_VERBOSE", *args) 3989 2160 3990 def service_list(self): 2161 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 2162 C 3991 """ 3992 Dim Service 3993 Native Dim service: List of services, commands and formats 3994 ServiceList[string]:For details see the Dim manual. 3995 C 2163 3996 """ 2164 3997 return self._get("SERVICE_LIST") 3998 2165 3999 def expert_mode(self, *args): 2166 """ Enable usage of expert commands (note that for safty reasons the are exclusive with the standard commands) 2167 B:1 4000 """ 4001 Dim Command 4002 Enable usage of expert commands (note that for safty reasons the are exclusive with the standard commands) 4003 B:1 2168 4004 """ 2169 4005 self._cmd("EXPERT_MODE", *args) 4006 2170 4007 def expert_set_global_voltage(self, *args): 2171 """ Send the global set command. The given voltage is converted to DAC counts. 2172 F:1 4008 """ 4009 Dim Command 4010 Send the global set command. The given voltage is converted to DAC counts. 4011 F:1 2173 4012 """ 2174 4013 self._cmd("EXPERT_SET_GLOBAL_VOLTAGE", *args) 4014 2175 4015 def set_channel_offset(self, *args): 2176 """ Set single channels to its G-APD breakdown voltage plus overvoltage plus the given offset. Starts ramping if necessary.|channel[short]:Channel for which to set the target voltage [0-415]|offset[V]:Offset to be added to the G-APD reference voltage of the given channel 2177 S:1;F:1 4016 """ 4017 Dim Command 4018 Set single channels to its G-APD breakdown voltage plus overvoltage plus the given offset. Starts ramping if necessary. 4019 channel[short]:Channel for which to set the target voltage [0-415] 4020 offset[V]:Offset to be added to the G-APD reference voltage of the given channel 4021 S:1;F:1 2178 4022 """ 2179 4023 self._cmd("SET_CHANNEL_OFFSET", *args) 4024 2180 4025 def start(self, *args): 2181 """ Start a ramping if no ramping is in progress and if reference values differ from current voltages 2182 4026 """ 4027 Dim Command 4028 Start a ramping if no ramping is in progress and if reference values differ from current voltages 4029 2183 4030 """ 2184 4031 self._cmd("START", *args) 4032 2185 4033 def version_number(self): 2186 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 2187 L 4034 """ 4035 Dim Service 4036 Native Dim service: Version number of Dim in use 4037 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 4038 L 2188 4039 """ 2189 4040 return self._get("VERSION_NUMBER") 4041 2190 4042 def disconnect(self, *args): 2191 """ disconnect from USB 2192 4043 """ 4044 Dim Command 4045 disconnect from USB 4046 2193 4047 """ 2194 4048 self._cmd("DISCONNECT", *args) 4049 2195 4050 class DIM_CONTROL ( FactDimServer): 2196 4051 def service_list(self): 2197 """ Native Dim service: List of services, commands and formats|ServiceList[string]:For details see the Dim manual. 2198 C 4052 """ 4053 Dim Service 4054 Native Dim service: List of services, commands and formats 4055 ServiceList[string]:For details see the Dim manual. 4056 C 2199 4057 """ 2200 4058 return self._get("SERVICE_LIST") 4059 2201 4060 def message(self): 2202 """ A general logging service providing a quality of service (severity)|Message[string]:The message 2203 C 4061 """ 4062 Dim Service 4063 A general logging service providing a quality of service (severity) 4064 Message[string]:The message 4065 C 2204 4066 """ 2205 4067 return self._get("MESSAGE") 4068 2206 4069 def start(self, *args): 2207 """ Start a JavaScript 2208 C 4070 """ 4071 Dim Command 4072 Start a JavaScript 4073 C 2209 4074 """ 2210 4075 self._cmd("START", *args) 4076 2211 4077 def stop(self, *args): 2212 """ Stop a runnning batch script or JavaScript 2213 C 4078 """ 4079 Dim Command 4080 Stop a runnning batch script or JavaScript 4081 C 2214 4082 """ 2215 4083 self._cmd("STOP", *args) 4084 2216 4085 def state(self): 2217 """ Provides the state of the state machine as quality of service.|Text[string]:A human readable string sent by the last state change. 2218 C 4086 """ 4087 Dim Service 4088 Provides the state of the state machine as quality of service. 4089 Text[string]:A human readable string sent by the last state change. 4090 C 2219 4091 """ 2220 4092 return self._get("STATE") 4093 2221 4094 def client_list(self): 2222 """ Native Dim service: A list of all connected clients 2223 C 4095 """ 4096 Dim Service 4097 Native Dim service: A list of all connected clients 4098 C 2224 4099 """ 2225 4100 return self._get("CLIENT_LIST") 4101 2226 4102 def exit(self, *args): 2227 """ This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code.|Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 2228 L:1 4103 """ 4104 Dim Command 4105 This is a native Dim command: Exit programremotely. FACT++ programs use the given number as return code. 4106 Rc[int]:Return code, under normal circumstances this should be 0 or 1 (42 will call exit() directly, 0x42 will call abort() directly. 4107 L:1 2229 4108 """ 2230 4109 self._cmd("EXIT", *args) 4110 2231 4111 def execute(self, *args): 2232 """ Execute a batch script 2233 C 4112 """ 4113 Dim Command 4114 Execute a batch script 4115 C 2234 4116 """ 2235 4117 self._cmd("EXECUTE", *args) 4118 2236 4119 def service_desc(self): 2237 """ Descriptions of services or commands and there arguments|Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 2238 C 4120 """ 4121 Dim Service 4122 Descriptions of services or commands and there arguments 4123 Description[string]:For a detailed explanation of the descriptive string see the class reference of DimDescriptionService. 4124 C 2239 4125 """ 2240 4126 return self._get("SERVICE_DESC") 4127 2241 4128 def state_list(self): 2242 """ Provides a list with descriptions for each service.|StateList[string]:A \n separated list of the form id:name=description 2243 C 4129 """ 4130 Dim Service 4131 Provides a list with descriptions for each service. 4132 StateList[string]:A \n separated list of the form id:name=description 4133 C 2244 4134 """ 2245 4135 return self._get("STATE_LIST") 4136 2246 4137 def version_number(self): 2247 """ Native Dim service: Version number of Dim in use|DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 2248 L 4138 """ 4139 Dim Service 4140 Native Dim service: Version number of Dim in use 4141 DimVer[int]:Version*100+Release (e.g. V19r17 = 1917) 4142 L 2249 4143 """ 2250 4144 return self._get("VERSION_NUMBER") 4145 -
fact/tools/PyDimCtrl/make_fix_dimservers.py
r14788 r14884 24 24 meth_name += '_cmd' 25 25 26 doc_string = "" 27 doc_string += "Dim Command \n" 26 28 if name in dd: 27 29 if not dd[name]: 28 doc_string = "DESC in SERVICE_DESC is empty ?!"29 else: 30 doc_string = dd[name]30 doc_string += "DESC in SERVICE_DESC is empty ?!" 31 else: 32 doc_string += dd[name] 31 33 else: 32 doc_string = "-- no DESC found in SERVICE_DESC --"34 doc_string += "-- no DESC found in SERVICE_DESC --" 33 35 doc_string += '\n' 34 36 doc_string += services[name.split('/')[0]][name][0] … … 37 39 # this is the new command, it simply calls the _cmd() method 38 40 f.write(" def " + meth_name + "(self, *args):\n" ) 39 f.write(' """ ' + doc_string +'\n' )40 41 f.write(' """ \n') 41 f.write(' self._cmd("' + meth_name.upper() + '", *args)\n' ) 42 for line in doc_string.split('\n'): 43 if '|' in line: 44 for subline in line.split('|'): 45 if subline: 46 f.write(' ' + subline + '\n' ) 47 else: 48 f.write(' ' + line + '\n' ) 49 50 f.write(' """ \n') 51 f.write(' self._cmd("' + meth_name.upper() + '", *args)\n\n' ) 42 52 43 53 def print_getter( name, f ): … … 46 56 meth_name += '_get' 47 57 58 doc_string = "" 59 doc_string += "Dim Service \n" 48 60 if name in dd: 49 61 if not dd[name]: 50 doc_string = "DESC in SERVICE_DESC is empty ?!"51 else: 52 doc_string = dd[name]62 doc_string += "DESC in SERVICE_DESC is empty ?!" 63 else: 64 doc_string += dd[name] 53 65 else: 54 doc_string = "-- no DESC found in SERVICE_DESC --"66 doc_string += "-- no DESC found in SERVICE_DESC --" 55 67 doc_string += '\n' 56 68 doc_string += services[name.split('/')[0]][name][0] … … 59 71 # this is the new command, it simply calls the _cmd() method 60 72 f.write(" def " + meth_name + "(self):\n" ) 61 f.write(' """ ' + doc_string+ '\n')62 73 f.write(' """ \n') 63 f.write(' return self._get("' + meth_name.upper() + '")\n' ) 74 for line in doc_string.split('\n'): 75 if '|' in line: 76 for subline in line.split('|'): 77 if subline: 78 f.write(' ' + subline + '\n' ) 79 else: 80 f.write(' ' + line + '\n' ) 81 f.write(' """ \n') 82 f.write(' return self._get("' + meth_name.upper() + '")\n\n' ) 64 83 65 84 … … 67 86 68 87 class FactDimServer( object ): 69 def __init__(self, name ):88 def __init__(self, name, services): 70 89 """ sets name of instance to name of server, all uppercase 71 90 """ … … 81 100 self.__last_cmd_send = -1*float('inf') 82 101 self.__last_service_got = -1*float('inf') 102 self.services = services 83 103 84 104 def _cmd(self, cmdstr, *args): … … 86 106 """ 87 107 cmdstr=self.name+'/'+cmdstr.upper() 88 desc = se rvices[self.name][cmdstr.upper()][0]108 desc = self.services[self.name][cmdstr.upper()][0] 89 109 90 110 # there is a work around for a bug in pydim … … 107 127 """ 108 128 full_srv_name = self.name+'/'+service.upper() 109 desc = se rvices[self.name][full_srv_name][0]129 desc = self.services[self.name][full_srv_name][0] 110 130 111 131 while not time.time() - self.__last_service_got > self.__delay_between_services:
Note:
See TracChangeset
for help on using the changeset viewer.