Regen sct drivers after refactoring
This commit is contained in:
@@ -205,6 +205,7 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
|
||||
|
||||
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}
|
||||
@@ -218,6 +219,13 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
hsetprop ${scobj_hpath}/fast_shutter sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/fast_shutter type "part"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/fast_shutter 1
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
}
|
||||
|
||||
|
||||
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}
|
||||
@@ -235,6 +243,14 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
hsetprop ${scobj_hpath}/rough_100 sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/rough_100 type "part"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/rough_100 1
|
||||
${sct_controller} write ${scobj_hpath}/rough_100
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
}
|
||||
|
||||
|
||||
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}
|
||||
@@ -252,20 +268,17 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f
|
||||
hsetprop ${scobj_hpath}/rough_40 sdsinfo "::nexus::scobj::sdsinfo"
|
||||
hsetprop ${scobj_hpath}/rough_40 type "part"
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} nxsave "true"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/fast_shutter 1
|
||||
${sct_controller} poll ${scobj_hpath}/rough_100 1
|
||||
${sct_controller} poll ${scobj_hpath}/rough_40 1
|
||||
${sct_controller} write ${scobj_hpath}/rough_100
|
||||
${sct_controller} write ${scobj_hpath}/rough_40
|
||||
} else {
|
||||
::scobj::shutters::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for shutters"
|
||||
}
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} nxsave "true"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
@@ -213,6 +213,7 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
|
||||
set scobj_hpath /sics/${name}
|
||||
|
||||
|
||||
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}
|
||||
@@ -226,20 +227,18 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
hsetprop ${scobj_hpath}/pos type "part"
|
||||
hsetprop ${scobj_hpath}/pos nxalias "${name}_pos"
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/pos 1
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
}
|
||||
|
||||
hsetprop ${scobj_hpath} data "true"
|
||||
hsetprop ${scobj_hpath} klass "@none"
|
||||
hsetprop ${scobj_hpath} type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/limits plain spy none
|
||||
hsetprop ${scobj_hpath}/limits data "true"
|
||||
hsetprop ${scobj_hpath}/limits klass "@none"
|
||||
hsetprop ${scobj_hpath}/limits type "part"
|
||||
|
||||
|
||||
hfactory ${scobj_hpath}/limits/forward plain user text
|
||||
hsetprop ${scobj_hpath}/limits/forward read ${ns}::getValue ${scobj_hpath} read_switch {MG _LFH}
|
||||
@@ -254,6 +253,13 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
hsetprop ${scobj_hpath}/limits/forward type "part"
|
||||
hsetprop ${scobj_hpath}/limits/forward nxalias "${name}_limits_forward"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/limits/forward 1
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
}
|
||||
|
||||
|
||||
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}
|
||||
@@ -268,16 +274,16 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
hsetprop ${scobj_hpath}/limits/reverse nxalias "${name}_limits_reverse"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/limits/forward 1
|
||||
${sct_controller} poll ${scobj_hpath}/limits/reverse 1
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
}
|
||||
hsetprop ${scobj_hpath}/limits data "true"
|
||||
hsetprop ${scobj_hpath}/limits klass "@none"
|
||||
hsetprop ${scobj_hpath}/limits type "part"
|
||||
|
||||
hfactory ${scobj_hpath}/switches plain spy none
|
||||
hsetprop ${scobj_hpath}/switches data "true"
|
||||
hsetprop ${scobj_hpath}/switches klass "@none"
|
||||
hsetprop ${scobj_hpath}/switches type "part"
|
||||
|
||||
|
||||
hfactory ${scobj_hpath}/switches/forward plain user text
|
||||
hsetprop ${scobj_hpath}/switches/forward read ${ns}::getValue ${scobj_hpath} read_switch {MG @IN[5]}
|
||||
@@ -292,6 +298,13 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
hsetprop ${scobj_hpath}/switches/forward type "part"
|
||||
hsetprop ${scobj_hpath}/switches/forward nxalias "${name}_switches_forward"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/switches/forward 1
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
}
|
||||
|
||||
|
||||
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}
|
||||
@@ -306,11 +319,13 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag
|
||||
hsetprop ${scobj_hpath}/switches/reverse nxalias "${name}_switches_reverse"
|
||||
|
||||
if {[string equal -nocase "${simulation_flag}" "false"]} {
|
||||
${sct_controller} poll ${scobj_hpath}/switches/forward 1
|
||||
${sct_controller} poll ${scobj_hpath}/switches/reverse 1
|
||||
} else {
|
||||
::scobj::tank::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for tank"
|
||||
}
|
||||
hsetprop ${scobj_hpath}/switches data "true"
|
||||
hsetprop ${scobj_hpath}/switches klass "@none"
|
||||
hsetprop ${scobj_hpath}/switches type "part"
|
||||
hsetprop ${scobj_hpath} klass ${device_class}
|
||||
hsetprop ${scobj_hpath} data true
|
||||
hsetprop ${scobj_hpath} debug_threshold 5
|
||||
|
||||
Reference in New Issue
Block a user