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

@@ -149,9 +149,10 @@ proc ::scobj::mercury_level::mkDriver { sct_controller name device_class simulat
set scobj_hpath /sics/${name}
# Start of named group: Level
hfactory ${scobj_hpath}/Level plain spy none
# Start of var: Helium
hfactory ${scobj_hpath}/Level/Helium plain user float
hsetprop ${scobj_hpath}/Level/Helium read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:HEL:LEV}
hsetprop ${scobj_hpath}/Level/Helium rdValue ${ns}::rdValue ${scobj_hpath}
@@ -169,11 +170,13 @@ proc ::scobj::mercury_level::mkDriver { sct_controller name device_class simulat
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/Level/Helium 15
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::mercury_level::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for mercury_level"
hsetprop ${scobj_hpath}/%s simulated true
}
# Start of var: Nitrogen
hfactory ${scobj_hpath}/Level/Nitrogen plain user float
hsetprop ${scobj_hpath}/Level/Nitrogen read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:NIT:LEV}
hsetprop ${scobj_hpath}/Level/Nitrogen rdValue ${ns}::rdValue ${scobj_hpath}
@@ -191,12 +194,15 @@ proc ::scobj::mercury_level::mkDriver { sct_controller name device_class simulat
if {[string equal -nocase "${simulation_flag}" "false"]} {
${sct_controller} poll ${scobj_hpath}/Level/Nitrogen 15
hsetprop ${scobj_hpath}/%s simulated false
} else {
::scobj::mercury_level::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for mercury_level"
hsetprop ${scobj_hpath}/%s simulated true
}
hsetprop ${scobj_hpath}/Level data "true"
hsetprop ${scobj_hpath}/Level klass "@none"
hsetprop ${scobj_hpath}/Level type "part"
# End of named group: Level
hsetprop ${scobj_hpath} klass ${device_class}
hsetprop ${scobj_hpath} data true
hsetprop ${scobj_hpath} debug_threshold 5