Don't register poll/write when simulating in LS-3xx drivers

This commit is contained in:
Douglas Clowes
2014-08-04 15:45:59 +10:00
parent 5112af83fd
commit 39519d8c1c
3 changed files with 20 additions and 8 deletions

View File

@@ -1536,7 +1536,9 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
}
if {$pollEnabled == 1} {
# clientput "enabling polling for $nodeName"
$sct_controller poll $nodeName
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
$sct_controller poll $nodeName
}
}
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $scobj_hpath $rdCmd $idx
if {$writable == 1} {
@@ -1544,7 +1546,9 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
hsetprop $nodeName writestatus UNKNOWN
hsetprop $nodeName noResponse ${ns}::noResponse
if {$pollEnabled == 1} {
$sct_controller write $nodeName
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
$sct_controller write $nodeName
}
}
}
switch -exact $dataType {

View File

@@ -1712,7 +1712,9 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
}
if {$pollEnabled == 1} {
# clientput "enabling polling for $nodeName"
$sct_controller poll $nodeName
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
$sct_controller poll $nodeName
}
}
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $idx
if {$writable == 1} {
@@ -1720,7 +1722,9 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
hsetprop $nodeName writestatus UNKNOWN
hsetprop $nodeName noResponse ${ns}::noResponse
if {$pollEnabled == 1} {
$sct_controller write $nodeName
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
$sct_controller write $nodeName
}
}
}
switch -exact $dataType {

View File

@@ -734,8 +734,10 @@ namespace eval ::scobj::[set vendor]_[set device] {
if { $readable >= 0 && $readable <= 300 } {
set poll_period [expr {int($readable)}]
}
debug_log 1 "Registering node $nodeName for poll at $poll_period seconds"
$sct_controller poll $nodeName $poll_period
if {[SplitReply [environment_simulation]]=="false"} {
debug_log 1 "Registering node $nodeName for poll at $poll_period seconds"
$sct_controller poll $nodeName $poll_period
}
}
if {$writable == 1} {
# the node is writable so set it up to invoke a callback when written
@@ -752,8 +754,10 @@ namespace eval ::scobj::[set vendor]_[set device] {
hsetprop $nodeName write ${ns}::$func_name $scobj_hpath $next_state $wrCmd
hsetprop $nodeName $next_state ${ns}::$next_state $scobj_hpath
hsetprop $nodeName writestatus UNKNOWN
debug_log 1 "Registering node $nodeName for write callback"
$sct_controller write $nodeName
if {[SplitReply [environment_simulation]]=="false"} {
debug_log 1 "Registering node $nodeName for write callback"
$sct_controller write $nodeName
}
}
# Initialise the previous value to test against
switch -exact $dataType {