Regen SCT drivers

This commit is contained in:
Douglas Clowes
2014-09-29 16:48:19 +10:00
parent f86dc33081
commit 3ad3bf3524
20 changed files with 639 additions and 200 deletions

View File

@@ -273,8 +273,9 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
sicslist setatt ${name} long_name ${name}
set scobj_hpath /sics/${name}
# Start of unnamed group
# Start of var: alarm1
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}
@@ -294,11 +295,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/alarm1 1
${sct_controller} write ${scobj_hpath}/alarm1
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: alarm2
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}
@@ -318,11 +321,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/alarm2 1
${sct_controller} write ${scobj_hpath}/alarm2
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: power
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}
@@ -338,11 +343,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/power 1
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: powermax
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}
@@ -362,11 +369,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/powermax 1
${sct_controller} write ${scobj_hpath}/powermax
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: ramprate
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}
@@ -386,11 +395,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/ramprate 1
${sct_controller} write ${scobj_hpath}/ramprate
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: sensor
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}
@@ -406,11 +417,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/sensor 1
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: setpoint
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}
@@ -430,11 +443,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/setpoint 1
${sct_controller} write ${scobj_hpath}/setpoint
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: w_sp
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}
@@ -454,17 +469,21 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/w_sp 1
${sct_controller} write ${scobj_hpath}/w_sp
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
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: aux
hfactory ${scobj_hpath}/aux plain spy none
# Start of var: decimal
hfactory ${scobj_hpath}/aux/decimal plain user int
hsetprop ${scobj_hpath}/aux/decimal read ${ns}::getInteger ${scobj_hpath} rdInteger {18}
hsetprop ${scobj_hpath}/aux/decimal rdInteger ${ns}::rdInteger ${scobj_hpath}
@@ -480,11 +499,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/decimal 2
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: instatus
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}
@@ -499,11 +520,13 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/instatus 2
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: model
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}
@@ -518,12 +541,15 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/aux/model 2
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::west_6100::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for west_6100"
hsetprop ${scobj_hpath}/%s simulated true
}
hsetprop ${scobj_hpath}/aux data "false"
hsetprop ${scobj_hpath}/aux klass "@none"
hsetprop ${scobj_hpath}/aux type "part"
# End of named group: aux
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5