Don't register poll/write when simulating in LS-3xx drivers
This commit is contained in:
@@ -1536,17 +1536,21 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
|||||||
}
|
}
|
||||||
if {$pollEnabled == 1} {
|
if {$pollEnabled == 1} {
|
||||||
# clientput "enabling polling for $nodeName"
|
# clientput "enabling polling for $nodeName"
|
||||||
|
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||||
$sct_controller poll $nodeName
|
$sct_controller poll $nodeName
|
||||||
}
|
}
|
||||||
|
}
|
||||||
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $scobj_hpath $rdCmd $idx
|
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $scobj_hpath $rdCmd $idx
|
||||||
if {$writable == 1} {
|
if {$writable == 1} {
|
||||||
hsetprop $nodeName write ${ns}::$wrFunc $scobj_hpath noResponse $wrCmd $idx
|
hsetprop $nodeName write ${ns}::$wrFunc $scobj_hpath noResponse $wrCmd $idx
|
||||||
hsetprop $nodeName writestatus UNKNOWN
|
hsetprop $nodeName writestatus UNKNOWN
|
||||||
hsetprop $nodeName noResponse ${ns}::noResponse
|
hsetprop $nodeName noResponse ${ns}::noResponse
|
||||||
if {$pollEnabled == 1} {
|
if {$pollEnabled == 1} {
|
||||||
|
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||||
$sct_controller write $nodeName
|
$sct_controller write $nodeName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
switch -exact $dataType {
|
switch -exact $dataType {
|
||||||
"none" { }
|
"none" { }
|
||||||
"int" { hsetprop $nodeName oldval -1 }
|
"int" { hsetprop $nodeName oldval -1 }
|
||||||
|
|||||||
@@ -1712,17 +1712,21 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
|||||||
}
|
}
|
||||||
if {$pollEnabled == 1} {
|
if {$pollEnabled == 1} {
|
||||||
# clientput "enabling polling for $nodeName"
|
# clientput "enabling polling for $nodeName"
|
||||||
|
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||||
$sct_controller poll $nodeName
|
$sct_controller poll $nodeName
|
||||||
}
|
}
|
||||||
|
}
|
||||||
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $idx
|
hsetprop $nodeName $rdFunc ${ns}::$rdFunc $idx
|
||||||
if {$writable == 1} {
|
if {$writable == 1} {
|
||||||
hsetprop $nodeName write ${ns}::$wrFunc $scobj_hpath noResponse $wrCmd $idx
|
hsetprop $nodeName write ${ns}::$wrFunc $scobj_hpath noResponse $wrCmd $idx
|
||||||
hsetprop $nodeName writestatus UNKNOWN
|
hsetprop $nodeName writestatus UNKNOWN
|
||||||
hsetprop $nodeName noResponse ${ns}::noResponse
|
hsetprop $nodeName noResponse ${ns}::noResponse
|
||||||
if {$pollEnabled == 1} {
|
if {$pollEnabled == 1} {
|
||||||
|
if {[string equal -nocase [SplitReply [environment_simulation]] "false"]} {
|
||||||
$sct_controller write $nodeName
|
$sct_controller write $nodeName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
switch -exact $dataType {
|
switch -exact $dataType {
|
||||||
"none" { }
|
"none" { }
|
||||||
"int" { hsetprop $nodeName oldval -1 }
|
"int" { hsetprop $nodeName oldval -1 }
|
||||||
|
|||||||
@@ -734,9 +734,11 @@ namespace eval ::scobj::[set vendor]_[set device] {
|
|||||||
if { $readable >= 0 && $readable <= 300 } {
|
if { $readable >= 0 && $readable <= 300 } {
|
||||||
set poll_period [expr {int($readable)}]
|
set poll_period [expr {int($readable)}]
|
||||||
}
|
}
|
||||||
|
if {[SplitReply [environment_simulation]]=="false"} {
|
||||||
debug_log 1 "Registering node $nodeName for poll at $poll_period seconds"
|
debug_log 1 "Registering node $nodeName for poll at $poll_period seconds"
|
||||||
$sct_controller poll $nodeName $poll_period
|
$sct_controller poll $nodeName $poll_period
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if {$writable == 1} {
|
if {$writable == 1} {
|
||||||
# the node is writable so set it up to invoke a callback when written
|
# the node is writable so set it up to invoke a callback when written
|
||||||
# rdFunc is putValueFunc.chkWriteFunc with both explicit functions
|
# rdFunc is putValueFunc.chkWriteFunc with both explicit functions
|
||||||
@@ -752,9 +754,11 @@ namespace eval ::scobj::[set vendor]_[set device] {
|
|||||||
hsetprop $nodeName write ${ns}::$func_name $scobj_hpath $next_state $wrCmd
|
hsetprop $nodeName write ${ns}::$func_name $scobj_hpath $next_state $wrCmd
|
||||||
hsetprop $nodeName $next_state ${ns}::$next_state $scobj_hpath
|
hsetprop $nodeName $next_state ${ns}::$next_state $scobj_hpath
|
||||||
hsetprop $nodeName writestatus UNKNOWN
|
hsetprop $nodeName writestatus UNKNOWN
|
||||||
|
if {[SplitReply [environment_simulation]]=="false"} {
|
||||||
debug_log 1 "Registering node $nodeName for write callback"
|
debug_log 1 "Registering node $nodeName for write callback"
|
||||||
$sct_controller write $nodeName
|
$sct_controller write $nodeName
|
||||||
}
|
}
|
||||||
|
}
|
||||||
# Initialise the previous value to test against
|
# Initialise the previous value to test against
|
||||||
switch -exact $dataType {
|
switch -exact $dataType {
|
||||||
"none" { }
|
"none" { }
|
||||||
|
|||||||
Reference in New Issue
Block a user