Check for existence of config dict fields before using them in generated drivers
This commit is contained in:
@ -569,12 +569,21 @@ proc ::scobj::astrium_chopper::read_config {} {
|
|||||||
set ns "::scobj::astrium_chopper"
|
set ns "::scobj::astrium_chopper"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "astrium_chopper" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "astrium_chopper"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [chopper_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [chopper_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[chopper_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[chopper_simulation] => using null asyncqueue"
|
||||||
|
@ -307,12 +307,21 @@ proc ::scobj::shutters::read_config {} {
|
|||||||
set ns "::scobj::shutters"
|
set ns "::scobj::shutters"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "shutters" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "shutters"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
|
||||||
|
@ -342,12 +342,21 @@ proc ::scobj::tank::read_config {} {
|
|||||||
set ns "::scobj::tank"
|
set ns "::scobj::tank"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "tank" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "tank"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [motor_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue"
|
||||||
|
@ -1156,12 +1156,21 @@ proc ::scobj::hiden_xcs::read_config {} {
|
|||||||
set ns "::scobj::hiden_xcs"
|
set ns "::scobj::hiden_xcs"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "hiden_xcs" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "hiden_xcs"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -460,12 +460,21 @@ proc ::scobj::huber_pilot::read_config {} {
|
|||||||
set ns "::scobj::huber_pilot"
|
set ns "::scobj::huber_pilot"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "huber_pilot" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "huber_pilot"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -347,12 +347,21 @@ proc ::scobj::isotech_ps::read_config {} {
|
|||||||
set ns "::scobj::isotech_ps"
|
set ns "::scobj::isotech_ps"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "isotech_ps" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "isotech_ps"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -707,12 +707,21 @@ proc ::scobj::nhq_200::read_config {} {
|
|||||||
set ns "::scobj::nhq_200"
|
set ns "::scobj::nhq_200"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "nhq_200" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "nhq_200"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -274,12 +274,21 @@ proc ::scobj::omron_hldc::read_config {} {
|
|||||||
set ns "::scobj::omron_hldc"
|
set ns "::scobj::omron_hldc"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "omron_hldc" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "omron_hldc"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -340,12 +340,21 @@ proc ::scobj::lakeshore_218::read_config {} {
|
|||||||
set ns "::scobj::lakeshore_218"
|
set ns "::scobj::lakeshore_218"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "lakeshore_218" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "lakeshore_218"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -550,12 +550,21 @@ proc ::scobj::mercury_base::read_config {} {
|
|||||||
set ns "::scobj::mercury_base"
|
set ns "::scobj::mercury_base"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_base" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_base"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -227,12 +227,21 @@ proc ::scobj::mercury_level::read_config {} {
|
|||||||
set ns "::scobj::mercury_level"
|
set ns "::scobj::mercury_level"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_level" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_level"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -391,12 +391,21 @@ proc ::scobj::mercury_pres::read_config {} {
|
|||||||
set ns "::scobj::mercury_pres"
|
set ns "::scobj::mercury_pres"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_pres" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_pres"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -746,12 +746,21 @@ proc ::scobj::mercury_scpi::read_config {} {
|
|||||||
set ns "::scobj::mercury_scpi"
|
set ns "::scobj::mercury_scpi"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_scpi" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_scpi"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -396,12 +396,21 @@ proc ::scobj::mercury_temp::read_config {} {
|
|||||||
set ns "::scobj::mercury_temp"
|
set ns "::scobj::mercury_temp"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_temp" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_temp"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -345,12 +345,21 @@ proc ::scobj::mercury_valve::read_config {} {
|
|||||||
set ns "::scobj::mercury_valve"
|
set ns "::scobj::mercury_valve"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "mercury_valve" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "mercury_valve"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -495,12 +495,21 @@ proc ::scobj::pfeiffer_hg::read_config {} {
|
|||||||
set ns "::scobj::pfeiffer_hg"
|
set ns "::scobj::pfeiffer_hg"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "pfeiffer_hg" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "pfeiffer_hg"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [environment_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue"
|
||||||
|
@ -346,12 +346,21 @@ proc ::scobj::reactor_status::read_config {} {
|
|||||||
set ns "::scobj::reactor_status"
|
set ns "::scobj::reactor_status"
|
||||||
dict for {k v} $::config_dict {
|
dict for {k v} $::config_dict {
|
||||||
if { [dict exists $v "implementation"] } {
|
if { [dict exists $v "implementation"] } {
|
||||||
|
if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set name [dict get $v name]
|
set name [dict get $v name]
|
||||||
set enabled [string tolower [dict get $v "enabled"]]
|
set enabled [string tolower [dict get $v "enabled"]]
|
||||||
set implementation [dict get $v "implementation"]
|
set implementation [dict get $v "implementation"]
|
||||||
|
if { !([dict exists $::config_dict $implementation]) } {
|
||||||
|
continue
|
||||||
|
}
|
||||||
set v [dict get $::config_dict $implementation]
|
set v [dict get $::config_dict $implementation]
|
||||||
if { [dict get $v "driver"] == "reactor_status" } {
|
if { !([dict exists $v "driver"]) } {
|
||||||
if { [dict get $v enabled] } {
|
continue
|
||||||
|
}
|
||||||
|
if { [string equal -nocase [dict get $v "driver"] "reactor_status"] } {
|
||||||
|
if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {
|
||||||
if { ![string equal -nocase [SplitReply [opal_simulation]] "false"] } {
|
if { ![string equal -nocase [SplitReply [opal_simulation]] "false"] } {
|
||||||
set asyncqueue "null"
|
set asyncqueue "null"
|
||||||
${ns}::sics_log 9 "[opal_simulation] => using null asyncqueue"
|
${ns}::sics_log 9 "[opal_simulation] => using null asyncqueue"
|
||||||
|
@ -1400,12 +1400,21 @@ def put_read_config(MyDriver):
|
|||||||
txt += [' set ns "%s"' % MyDriver['namespace']]
|
txt += [' set ns "%s"' % MyDriver['namespace']]
|
||||||
txt += [' dict for {k v} $::config_dict {']
|
txt += [' dict for {k v} $::config_dict {']
|
||||||
txt += [' if { [dict exists $v "implementation"] } {']
|
txt += [' if { [dict exists $v "implementation"] } {']
|
||||||
|
txt += [' if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } {']
|
||||||
|
txt += [' continue']
|
||||||
|
txt += [' }']
|
||||||
txt += [' set name [dict get $v name]']
|
txt += [' set name [dict get $v name]']
|
||||||
txt += [' set enabled [string tolower [dict get $v "enabled"]]']
|
txt += [' set enabled [string tolower [dict get $v "enabled"]]']
|
||||||
txt += [' set implementation [dict get $v "implementation"]']
|
txt += [' set implementation [dict get $v "implementation"]']
|
||||||
|
txt += [' if { !([dict exists $::config_dict $implementation]) } {']
|
||||||
|
txt += [' continue']
|
||||||
|
txt += [' }']
|
||||||
txt += [' set v [dict get $::config_dict $implementation]']
|
txt += [' set v [dict get $::config_dict $implementation]']
|
||||||
txt += [' if { [dict get $v "driver"] == "%s" } {' % MyDriver['name']]
|
txt += [' if { !([dict exists $v "driver"]) } {']
|
||||||
txt += [' if { [dict get $v enabled] } {']
|
txt += [' continue']
|
||||||
|
txt += [' }']
|
||||||
|
txt += [' if { [string equal -nocase [dict get $v "driver"] "%s"] } {' % MyDriver['name']]
|
||||||
|
txt += [' if { [string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"] } {']
|
||||||
txt += [' if { ![string equal -nocase [SplitReply [%s]] "false"] } {' % MyDriver['simulation_group']]
|
txt += [' if { ![string equal -nocase [SplitReply [%s]] "false"] } {' % MyDriver['simulation_group']]
|
||||||
txt += [' set asyncqueue "null"']
|
txt += [' set asyncqueue "null"']
|
||||||
txt += [' ${ns}::sics_log 9 "[%s] => using null asyncqueue"' % MyDriver['simulation_group']]
|
txt += [' ${ns}::sics_log 9 "[%s] => using null asyncqueue"' % MyDriver['simulation_group']]
|
||||||
|
Reference in New Issue
Block a user