Handle terminator and timeout attributes in sics_config.ini files

This commit is contained in:
Douglas Clowes
2014-04-16 09:44:20 +10:00
parent 8f3b6aaabe
commit 6f0e0b80f8

View File

@ -1351,7 +1351,14 @@ def put_config(MyDriver):
txt += [' set PORT [dict get $v port]'] txt += [' set PORT [dict get $v port]']
txt += [' set name [dict get $v name]'] txt += [' set name [dict get $v name]']
txt += [' MakeAsyncProtocol ${name}_protocol'] txt += [' MakeAsyncProtocol ${name}_protocol']
txt += [' if { [dict exists $v "terminator"] } {']
txt += [' ${name}_protocol sendterminator "[dict get $v "terminator"]"']
txt += [' ${name}_protocol replyterminator "[dict get $v "terminator"]"']
txt += [' }']
txt += [' MakeAsyncQueue ${name}_queue ${name}_protocol ${IP} ${PORT}'] txt += [' MakeAsyncQueue ${name}_queue ${name}_protocol ${IP} ${PORT}']
txt += [' if { [dict exists $v "timeout"] } {']
txt += [' ${name}_queue timeout "[dict get $v "timeout"]"']
txt += [' }']
if 'make_args' in MyDriver: if 'make_args' in MyDriver:
txt += [' set arg_list [list]'] txt += [' set arg_list [list]']
txt += [' foreach arg {' + MyDriver['make_args'] + '} {'] txt += [' foreach arg {' + MyDriver['make_args'] + '} {']