Allow sics_config and device simulation flags in another file
This commit is contained in:
@ -15,23 +15,27 @@ set quieckport 60004
|
||||
# false: The real driver will be used.
|
||||
# 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)
|
||||
foreach {simflag icsval fakedev} {
|
||||
opal_simulation false true
|
||||
detector_simulation false true
|
||||
hmm_simulation false true
|
||||
environment_simulation false false
|
||||
counter_simulation false true
|
||||
motor_simulation false false
|
||||
chopper_simulation false true
|
||||
velsel_simulation false true
|
||||
plc_simulation false true
|
||||
rfgen_simulation false true
|
||||
goniometer_simulation false true
|
||||
magnetic_simulation false true
|
||||
} {
|
||||
dict set SIMFLAG_VAL $simflag ICSVAL $icsval
|
||||
dict set SIMFLAG_VAL $simflag FAKEDEV $fakedev
|
||||
VarMake $simflag Text internal
|
||||
if [file exists ./sics_simulation.tcl] {
|
||||
source ./sics_simulation.tcl
|
||||
} else {
|
||||
foreach {simflag icsval fakedev} {
|
||||
opal_simulation false true
|
||||
detector_simulation false true
|
||||
hmm_simulation false true
|
||||
environment_simulation false false
|
||||
counter_simulation false true
|
||||
motor_simulation false false
|
||||
chopper_simulation false true
|
||||
velsel_simulation false true
|
||||
plc_simulation false true
|
||||
rfgen_simulation false true
|
||||
goniometer_simulation false true
|
||||
magnetic_simulation false true
|
||||
} {
|
||||
dict set SIMFLAG_VAL $simflag ICSVAL $icsval
|
||||
dict set SIMFLAG_VAL $simflag FAKEDEV $fakedev
|
||||
VarMake $simflag Text internal
|
||||
}
|
||||
}
|
||||
|
||||
VarMake sics_simulation Text internal
|
||||
@ -120,7 +124,9 @@ if {[info exists env(SICS_SIMULATION)] != 1} {
|
||||
}
|
||||
|
||||
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]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user