Regen SCT drivers
This commit is contained in:
@@ -204,8 +204,9 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
# Start of unnamed group
|
||||
|
||||
|
||||
# Start of var: fast_shutter
|
||||
hfactory ${scobj_hpath}/fast_shutter plain user text
|
||||
hsetprop ${scobj_hpath}/fast_shutter read ${ns}::getValue ${scobj_hpath} read_switch_pair {MG @IN[5], @IN[6]}
|
||||
hsetprop ${scobj_hpath}/fast_shutter read_switch_pair ${ns}::read_switch_pair ${scobj_hpath}
|
||||
@@ -221,11 +222,13 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/fast_shutter 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
|
||||
# Start of var: rough_100
|
||||
hfactory ${scobj_hpath}/rough_100 plain user text
|
||||
hsetprop ${scobj_hpath}/rough_100 read ${ns}::getValue ${scobj_hpath} read_switch_pair {MG @IN[15], @IN[16]}
|
||||
hsetprop ${scobj_hpath}/rough_100 read_switch_pair ${ns}::read_switch_pair ${scobj_hpath}
|
||||
@@ -246,11 +249,13 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/rough_100 1
|
||||
${sct_controller} write ${scobj_hpath}/rough_100
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
|
||||
# Start of var: rough_40
|
||||
hfactory ${scobj_hpath}/rough_40 plain user text
|
||||
hsetprop ${scobj_hpath}/rough_40 read ${ns}::getValue ${scobj_hpath} read_switch_pair {MG @IN[13], @IN[14]}
|
||||
hsetprop ${scobj_hpath}/rough_40 read_switch_pair ${ns}::read_switch_pair ${scobj_hpath}
|
||||
@@ -271,14 +276,17 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/rough_40 1
|
||||
${sct_controller} write ${scobj_hpath}/rough_40
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} nxsave "true"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
# End of unnamed group
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
@@ -212,8 +212,9 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
sicslist setatt ${name} long_name ${name}
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
# Start of unnamed group
|
||||
|
||||
|
||||
# Start of var: pos
|
||||
hfactory ${scobj_hpath}/pos plain spy float
|
||||
hsetprop ${scobj_hpath}/pos read ${ns}::getValue ${scobj_hpath} read_pos {MG _TPH}
|
||||
hsetprop ${scobj_hpath}/pos read_pos ${ns}::read_pos ${scobj_hpath}
|
||||
@@ -229,17 +230,21 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/pos 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
# End of unnamed group
|
||||
|
||||
# Start of named group: limits
|
||||
hfactory ${scobj_hpath}/limits plain spy none
|
||||
|
||||
|
||||
# Start of var: forward
|
||||
hfactory ${scobj_hpath}/limits/forward plain user text
|
||||
hsetprop ${scobj_hpath}/limits/forward read ${ns}::getValue ${scobj_hpath} read_switch {MG _LFH}
|
||||
hsetprop ${scobj_hpath}/limits/forward read_switch ${ns}::read_switch ${scobj_hpath}
|
||||
@@ -255,11 +260,13 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/limits/forward 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
|
||||
# Start of var: reverse
|
||||
hfactory ${scobj_hpath}/limits/reverse plain user text
|
||||
hsetprop ${scobj_hpath}/limits/reverse read ${ns}::getValue ${scobj_hpath} read_switch {MG _LRH}
|
||||
hsetprop ${scobj_hpath}/limits/reverse read_switch ${ns}::read_switch ${scobj_hpath}
|
||||
@@ -275,16 +282,20 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/limits/reverse 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/limits data "true"
|
||||
hsetprop ${scobj_hpath}/limits klass "@none"
|
||||
hsetprop ${scobj_hpath}/limits type "part"
|
||||
# End of named group: limits
|
||||
|
||||
# Start of named group: switches
|
||||
hfactory ${scobj_hpath}/switches plain spy none
|
||||
|
||||
|
||||
# Start of var: forward
|
||||
hfactory ${scobj_hpath}/switches/forward plain user text
|
||||
hsetprop ${scobj_hpath}/switches/forward read ${ns}::getValue ${scobj_hpath} read_switch {MG @IN[5]}
|
||||
hsetprop ${scobj_hpath}/switches/forward read_switch ${ns}::read_switch ${scobj_hpath}
|
||||
@@ -300,11 +311,13 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/switches/forward 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
|
||||
|
||||
# Start of var: reverse
|
||||
hfactory ${scobj_hpath}/switches/reverse plain user text
|
||||
hsetprop ${scobj_hpath}/switches/reverse read ${ns}::getValue ${scobj_hpath} read_switch {MG @IN[6]}
|
||||
hsetprop ${scobj_hpath}/switches/reverse read_switch ${ns}::read_switch ${scobj_hpath}
|
||||
@@ -320,12 +333,15 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/switches/reverse 1
|
||||
hsetprop ${scobj_hpath}/%s simulated false
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
hsetprop ${scobj_hpath}/%s simulated true
|
||||
}
|
||||
hsetprop ${scobj_hpath}/switches data "true"
|
||||
hsetprop ${scobj_hpath}/switches klass "@none"
|
||||
hsetprop ${scobj_hpath}/switches type "part"
|
||||
# End of named group: switches
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
Reference in New Issue
Block a user