Allow sics_config and device simulation flags in another file
This commit is contained in:
@ -15,7 +15,10 @@ set quieckport 60004
|
|||||||
# false: The real driver will be used.
|
# false: The real driver will be used.
|
||||||
# icsval column = settings when running on the Instrument Control Server (ie SICS_SIMULATION not defined)
|
# icsval column = settings when running on the Instrument Control Server (ie SICS_SIMULATION not defined)
|
||||||
# fakedev column = settings for test platforms (ie SICS_SIMULATION=fakedev)
|
# fakedev column = settings for test platforms (ie SICS_SIMULATION=fakedev)
|
||||||
foreach {simflag icsval fakedev} {
|
if [file exists ./sics_simulation.tcl] {
|
||||||
|
source ./sics_simulation.tcl
|
||||||
|
} else {
|
||||||
|
foreach {simflag icsval fakedev} {
|
||||||
opal_simulation false true
|
opal_simulation false true
|
||||||
detector_simulation false true
|
detector_simulation false true
|
||||||
hmm_simulation false true
|
hmm_simulation false true
|
||||||
@ -28,10 +31,11 @@ foreach {simflag icsval fakedev} {
|
|||||||
rfgen_simulation false true
|
rfgen_simulation false true
|
||||||
goniometer_simulation false true
|
goniometer_simulation false true
|
||||||
magnetic_simulation false true
|
magnetic_simulation false true
|
||||||
} {
|
} {
|
||||||
dict set SIMFLAG_VAL $simflag ICSVAL $icsval
|
dict set SIMFLAG_VAL $simflag ICSVAL $icsval
|
||||||
dict set SIMFLAG_VAL $simflag FAKEDEV $fakedev
|
dict set SIMFLAG_VAL $simflag FAKEDEV $fakedev
|
||||||
VarMake $simflag Text internal
|
VarMake $simflag Text internal
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VarMake sics_simulation Text internal
|
VarMake sics_simulation Text internal
|
||||||
@ -120,7 +124,9 @@ if {[info exists env(SICS_SIMULATION)] != 1} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fileeval util/config_reader.tcl
|
fileeval util/config_reader.tcl
|
||||||
if [file exists ../sics_config.ini] {
|
if [file exists ./sics_config.ini] {
|
||||||
|
set config_dict [config_reader::parse_file ./sics_config.ini]
|
||||||
|
} elseif [file exists ../sics_config.ini] {
|
||||||
set config_dict [config_reader::parse_file ../sics_config.ini]
|
set config_dict [config_reader::parse_file ../sics_config.ini]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user