diff --git a/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl b/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl index 9750f7ee..9ccd49a5 100644 --- a/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl +++ b/site_ansto/instrument/bilby/config/chopper/sct_astrium_chopper.tcl @@ -569,12 +569,21 @@ proc ::scobj::astrium_chopper::read_config {} { set ns "::scobj::astrium_chopper" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "astrium_chopper" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[chopper_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/bilby/config/motors/sct_shutters.tcl b/site_ansto/instrument/bilby/config/motors/sct_shutters.tcl index 49acee34..6dd435fa 100644 --- a/site_ansto/instrument/bilby/config/motors/sct_shutters.tcl +++ b/site_ansto/instrument/bilby/config/motors/sct_shutters.tcl @@ -307,12 +307,21 @@ proc ::scobj::shutters::read_config {} { set ns "::scobj::shutters" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "shutters" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/bilby/config/motors/sct_tank.tcl b/site_ansto/instrument/bilby/config/motors/sct_tank.tcl index fe44dece..5ae2c9b9 100644 --- a/site_ansto/instrument/bilby/config/motors/sct_tank.tcl +++ b/site_ansto/instrument/bilby/config/motors/sct_tank.tcl @@ -342,12 +342,21 @@ proc ::scobj::tank::read_config {} { set ns "::scobj::tank" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "tank" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[motor_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/sct_hiden_xcs.tcl b/site_ansto/instrument/config/environment/sct_hiden_xcs.tcl index 8b33af39..32f05421 100644 --- a/site_ansto/instrument/config/environment/sct_hiden_xcs.tcl +++ b/site_ansto/instrument/config/environment/sct_hiden_xcs.tcl @@ -1156,12 +1156,21 @@ proc ::scobj::hiden_xcs::read_config {} { set ns "::scobj::hiden_xcs" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "hiden_xcs" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/sct_huber_pilot.tcl b/site_ansto/instrument/config/environment/sct_huber_pilot.tcl index 1acc23c4..4b91c45a 100644 --- a/site_ansto/instrument/config/environment/sct_huber_pilot.tcl +++ b/site_ansto/instrument/config/environment/sct_huber_pilot.tcl @@ -460,12 +460,21 @@ proc ::scobj::huber_pilot::read_config {} { set ns "::scobj::huber_pilot" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "huber_pilot" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/sct_isotech_ps.tcl b/site_ansto/instrument/config/environment/sct_isotech_ps.tcl index afc21544..9df15015 100644 --- a/site_ansto/instrument/config/environment/sct_isotech_ps.tcl +++ b/site_ansto/instrument/config/environment/sct_isotech_ps.tcl @@ -347,12 +347,21 @@ proc ::scobj::isotech_ps::read_config {} { set ns "::scobj::isotech_ps" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "isotech_ps" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/sct_nhq_200.tcl b/site_ansto/instrument/config/environment/sct_nhq_200.tcl index 21d90e09..46e3c84b 100644 --- a/site_ansto/instrument/config/environment/sct_nhq_200.tcl +++ b/site_ansto/instrument/config/environment/sct_nhq_200.tcl @@ -707,12 +707,21 @@ proc ::scobj::nhq_200::read_config {} { set ns "::scobj::nhq_200" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "nhq_200" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/sct_omron_hldc.tcl b/site_ansto/instrument/config/environment/sct_omron_hldc.tcl index 49b18cc3..b04e62cb 100644 --- a/site_ansto/instrument/config/environment/sct_omron_hldc.tcl +++ b/site_ansto/instrument/config/environment/sct_omron_hldc.tcl @@ -274,12 +274,21 @@ proc ::scobj::omron_hldc::read_config {} { set ns "::scobj::omron_hldc" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "omron_hldc" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_218.tcl b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_218.tcl index 1f0d48dd..a5dfd21c 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_lakeshore_218.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_lakeshore_218.tcl @@ -340,12 +340,21 @@ proc ::scobj::lakeshore_218::read_config {} { set ns "::scobj::lakeshore_218" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "lakeshore_218" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_base.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_base.tcl index b88ddb36..ff9dacb7 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_base.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_base.tcl @@ -550,12 +550,21 @@ proc ::scobj::mercury_base::read_config {} { set ns "::scobj::mercury_base" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_base" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_level.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_level.tcl index 8630ba24..ed0c4d4a 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_level.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_level.tcl @@ -227,12 +227,21 @@ proc ::scobj::mercury_level::read_config {} { set ns "::scobj::mercury_level" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_level" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_pres.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_pres.tcl index 08a87c73..36f16976 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_pres.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_pres.tcl @@ -391,12 +391,21 @@ proc ::scobj::mercury_pres::read_config {} { set ns "::scobj::mercury_pres" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_pres" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_scpi.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_scpi.tcl index e6e76cd7..d9b33c18 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_scpi.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_scpi.tcl @@ -746,12 +746,21 @@ proc ::scobj::mercury_scpi::read_config {} { set ns "::scobj::mercury_scpi" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_scpi" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_temp.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_temp.tcl index d5d981ff..c2bacdd5 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_temp.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_temp.tcl @@ -396,12 +396,21 @@ proc ::scobj::mercury_temp::read_config {} { set ns "::scobj::mercury_temp" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_temp" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_mercury_valve.tcl b/site_ansto/instrument/config/environment/temperature/sct_mercury_valve.tcl index f894889c..bd4280b3 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_mercury_valve.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_mercury_valve.tcl @@ -345,12 +345,21 @@ proc ::scobj::mercury_valve::read_config {} { set ns "::scobj::mercury_valve" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "mercury_valve" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/environment/temperature/sct_pfeiffer_hg.tcl b/site_ansto/instrument/config/environment/temperature/sct_pfeiffer_hg.tcl index 69567def..ea5b211d 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_pfeiffer_hg.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_pfeiffer_hg.tcl @@ -495,12 +495,21 @@ proc ::scobj::pfeiffer_hg::read_config {} { set ns "::scobj::pfeiffer_hg" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "pfeiffer_hg" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[environment_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/config/source/sct_reactor_status.tcl b/site_ansto/instrument/config/source/sct_reactor_status.tcl index 3379acba..aa1558bb 100644 --- a/site_ansto/instrument/config/source/sct_reactor_status.tcl +++ b/site_ansto/instrument/config/source/sct_reactor_status.tcl @@ -346,12 +346,21 @@ proc ::scobj::reactor_status::read_config {} { set ns "::scobj::reactor_status" dict for {k v} $::config_dict { if { [dict exists $v "implementation"] } { + if { !([dict exists $v "name"] && [dict exists $v "enabled"]) } { + continue + } set name [dict get $v name] set enabled [string tolower [dict get $v "enabled"]] set implementation [dict get $v "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } set v [dict get $::config_dict $implementation] - if { [dict get $v "driver"] == "reactor_status" } { - if { [dict get $v enabled] } { + if { !([dict exists $v "driver"]) } { + 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"] } { set asyncqueue "null" ${ns}::sics_log 9 "[opal_simulation] => using null asyncqueue" diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index dcae9424..85ecb308 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -1400,12 +1400,21 @@ def put_read_config(MyDriver): txt += [' set ns "%s"' % MyDriver['namespace']] txt += [' dict for {k v} $::config_dict {'] 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 enabled [string tolower [dict get $v "enabled"]]'] 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 += [' if { [dict get $v "driver"] == "%s" } {' % MyDriver['name']] - txt += [' if { [dict get $v enabled] } {'] + txt += [' if { !([dict exists $v "driver"]) } {'] + 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 += [' set asyncqueue "null"'] txt += [' ${ns}::sics_log 9 "[%s] => using null asyncqueue"' % MyDriver['simulation_group']]