allow legacy sct controllers in generated drivers
This commit is contained in:
@ -1426,6 +1426,10 @@ def put_read_config(MyDriver):
|
||||
txt += [' ${ns}::sics_log 9 "[%s] => using null asyncqueue"' % MyDriver['simulation_group']]
|
||||
txt += [' } elseif { [dict exists $v "asyncqueue"] } {']
|
||||
txt += [' set asyncqueue [dict get $v "asyncqueue"]']
|
||||
txt += [' if { [string equal -nocase ${asyncqueue} "sct"] } {']
|
||||
txt += [' set IP [dict get $v ip]']
|
||||
txt += [' set PORT [dict get $v port]']
|
||||
txt += [' }']
|
||||
txt += [' } else {']
|
||||
txt += [' if { [dict exists $v "asyncprotocol"] } {']
|
||||
txt += [' set asyncprotocol [dict get $v "asyncprotocol"]']
|
||||
@ -1455,9 +1459,17 @@ def put_read_config(MyDriver):
|
||||
txt += [' error "Missing configuration value $arg"']
|
||||
txt += [' }']
|
||||
txt += [' }']
|
||||
txt += [' add_%s ${name} "aqadapter" ${asyncqueue} {*}$arg_list' % MyDriver['name']]
|
||||
txt += [' if { [string equal -nocase ${asyncqueue} "sct"] } {']
|
||||
txt += [' add_%s ${name} ${IP} ${PORT} {*}$arg_list' % MyDriver['name']]
|
||||
txt += [' } else {']
|
||||
txt += [' add_%s ${name} "aqadapter" ${asyncqueue} {*}$arg_list' % MyDriver['name']]
|
||||
txt += [' }']
|
||||
else:
|
||||
txt += [' add_%s ${name} "aqadapter" ${asyncqueue}' % MyDriver['name']]
|
||||
txt += [' if { [string equal -nocase ${asyncqueue} "sct"] } {']
|
||||
txt += [' add_%s ${name} ${IP} ${PORT}' % MyDriver['name']]
|
||||
txt += [' } else {']
|
||||
txt += [' add_%s ${name} "aqadapter" ${asyncqueue}' % MyDriver['name']]
|
||||
txt += [' }']
|
||||
txt += [' }']
|
||||
txt += [' }']
|
||||
txt += [' }']
|
||||
|
Reference in New Issue
Block a user