Regen sct drivers after refactoring

This commit is contained in:
Douglas Clowes
2014-09-29 15:38:32 +10:00
parent 814c8741c3
commit 29650b420c
20 changed files with 1014 additions and 322 deletions

View File

@@ -274,6 +274,7 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
set scobj_hpath /sics/${name}
hfactory ${scobj_hpath}/alarm1 plain user float
hsetprop ${scobj_hpath}/alarm1 read ${ns}::getDecimal ${scobj_hpath} rdDecimal {13}
hsetprop ${scobj_hpath}/alarm1 rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -290,6 +291,14 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/alarm1 type "part"
hsetprop ${scobj_hpath}/alarm1 nxalias "${name}_alarm1"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/alarm1 1
${sct_controller} write ${scobj_hpath}/alarm1
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/alarm2 plain user float
hsetprop ${scobj_hpath}/alarm2 read ${ns}::getDecimal ${scobj_hpath} rdDecimal {14}
hsetprop ${scobj_hpath}/alarm2 rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -306,6 +315,14 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/alarm2 type "part"
hsetprop ${scobj_hpath}/alarm2 nxalias "${name}_alarm2"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/alarm2 1
${sct_controller} write ${scobj_hpath}/alarm2
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/power plain user int
hsetprop ${scobj_hpath}/power read ${ns}::getInteger ${scobj_hpath} rdInteger {3}
hsetprop ${scobj_hpath}/power rdInteger ${ns}::rdInteger ${scobj_hpath}
@@ -319,6 +336,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/power type "part"
hsetprop ${scobj_hpath}/power nxalias "${name}_power"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/power 1
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/powermax plain user int
hsetprop ${scobj_hpath}/powermax read ${ns}::getInteger ${scobj_hpath} rdInteger {20}
hsetprop ${scobj_hpath}/powermax rdInteger ${ns}::rdInteger ${scobj_hpath}
@@ -335,6 +359,14 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/powermax type "part"
hsetprop ${scobj_hpath}/powermax nxalias "${name}_powermax"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/powermax 1
${sct_controller} write ${scobj_hpath}/powermax
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/ramprate plain user float
hsetprop ${scobj_hpath}/ramprate read ${ns}::getDecimal ${scobj_hpath} rdDecimal {24}
hsetprop ${scobj_hpath}/ramprate rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -351,6 +383,14 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/ramprate type "part"
hsetprop ${scobj_hpath}/ramprate nxalias "${name}_ramprate"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/ramprate 1
${sct_controller} write ${scobj_hpath}/ramprate
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/sensor plain user float
hsetprop ${scobj_hpath}/sensor read ${ns}::getDecimal ${scobj_hpath} rdDecimal {1}
hsetprop ${scobj_hpath}/sensor rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -364,6 +404,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/sensor type "part"
hsetprop ${scobj_hpath}/sensor nxalias "${name}_sensor"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/sensor 1
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/setpoint plain user float
hsetprop ${scobj_hpath}/setpoint read ${ns}::getDecimal ${scobj_hpath} rdDecimal {2}
hsetprop ${scobj_hpath}/setpoint rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -380,6 +427,14 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/setpoint type "part"
hsetprop ${scobj_hpath}/setpoint nxalias "${name}_setpoint"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/setpoint 1
${sct_controller} write ${scobj_hpath}/setpoint
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/w_sp plain user float
hsetprop ${scobj_hpath}/w_sp read ${ns}::getDecimal ${scobj_hpath} rdDecimal {21}
hsetprop ${scobj_hpath}/w_sp rdDecimal ${ns}::rdDecimal ${scobj_hpath}
@@ -396,33 +451,19 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/w_sp type "part"
hsetprop ${scobj_hpath}/w_sp nxalias "${name}_w_sp"
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}/alarm1 1
${sct_controller} poll ${scobj_hpath}/alarm2 1
${sct_controller} poll ${scobj_hpath}/power 1
${sct_controller} poll ${scobj_hpath}/powermax 1
${sct_controller} poll ${scobj_hpath}/ramprate 1
${sct_controller} poll ${scobj_hpath}/sensor 1
${sct_controller} poll ${scobj_hpath}/setpoint 1
${sct_controller} poll ${scobj_hpath}/w_sp 1
${sct_controller} write ${scobj_hpath}/alarm1
${sct_controller} write ${scobj_hpath}/alarm2
${sct_controller} write ${scobj_hpath}/powermax
${sct_controller} write ${scobj_hpath}/ramprate
${sct_controller} write ${scobj_hpath}/setpoint
${sct_controller} write ${scobj_hpath}/w_sp
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hsetprop ${scobj_hpath} data "true"
hsetprop ${scobj_hpath} klass "@none"
hsetprop ${scobj_hpath} type "part"
hfactory ${scobj_hpath}/aux plain spy none
hsetprop ${scobj_hpath}/aux data "false"
hsetprop ${scobj_hpath}/aux klass "@none"
hsetprop ${scobj_hpath}/aux type "part"
hfactory ${scobj_hpath}/aux/decimal plain user int
hsetprop ${scobj_hpath}/aux/decimal read ${ns}::getInteger ${scobj_hpath} rdInteger {18}
@@ -437,6 +478,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/aux/decimal type "part"
hsetprop ${scobj_hpath}/aux/decimal nxalias "${name}_aux_decimal"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/decimal 2
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/aux/instatus plain user int
hsetprop ${scobj_hpath}/aux/instatus read ${ns}::getInteger ${scobj_hpath} rdInteger {133}
hsetprop ${scobj_hpath}/aux/instatus rdInteger ${ns}::rdInteger ${scobj_hpath}
@@ -449,6 +497,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/aux/instatus type "part"
hsetprop ${scobj_hpath}/aux/instatus nxalias "${name}_aux_instatus"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/instatus 2
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hfactory ${scobj_hpath}/aux/model plain user int
hsetprop ${scobj_hpath}/aux/model read ${ns}::getInteger ${scobj_hpath} rdInteger {122}
hsetprop ${scobj_hpath}/aux/model rdInteger ${ns}::rdInteger ${scobj_hpath}
@@ -462,12 +517,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
hsetprop ${scobj_hpath}/aux/model nxalias "${name}_aux_model"
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/decimal 2
${sct_controller} poll ${scobj_hpath}/aux/instatus 2
${sct_controller} poll ${scobj_hpath}/aux/model 2
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
}
hsetprop ${scobj_hpath}/aux data "false"
hsetprop ${scobj_hpath}/aux klass "@none"
hsetprop ${scobj_hpath}/aux type "part"
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5