29 lines
901 B
Tcl
29 lines
901 B
Tcl
|
|
namespace eval chopper {
|
|
variable sim_mode [SplitReply [chopper_simulation]]
|
|
set master_chopper_id_simvar 1
|
|
}
|
|
|
|
::utility::macro::getset int master_chopper_id {args} {
|
|
variable sim_mode [SplitReply [chopper_simulation]]
|
|
|
|
if {$sim_mode == "false"} {
|
|
if {$args == ""} {
|
|
return "master_chopper_id = [sct_chopper_t0 transact {get master chopper}]"
|
|
} else {
|
|
sct_chopper_t0 transact "enable chopper selection"
|
|
sct_chopper_t0 transact "set master chopper=$args"
|
|
sct_chopper_t0 transact "disable chopper selection"
|
|
}
|
|
} else {
|
|
if {$args == ""} {
|
|
return master_chopper_id = $::chopper::master_chopper_id_simvar
|
|
} else {
|
|
set ::chopper::master_chopper_id_simvar $args
|
|
}
|
|
}
|
|
}
|
|
sicslist setatt master_chopper_id klass NXdisk_chopper
|
|
sicslist setatt master_chopper_id long_name master_chopper_id
|
|
sicslist setatt master_chopper_id mutable false
|