Allow setting driver debug_threshold in SCT file
This commit is contained in:
@ -82,6 +82,7 @@ reserved = {
|
|||||||
'DRIVER_PROPERTY' : 'DRIVER_PROPERTY',
|
'DRIVER_PROPERTY' : 'DRIVER_PROPERTY',
|
||||||
'CLASS' : 'CLASS',
|
'CLASS' : 'CLASS',
|
||||||
'SIMULATION_GROUP' : 'SIMULATION_GROUP',
|
'SIMULATION_GROUP' : 'SIMULATION_GROUP',
|
||||||
|
'DEBUG_THRESHOLD' : 'DEBUG_THRESHOLD',
|
||||||
'CODE' : 'CODE',
|
'CODE' : 'CODE',
|
||||||
'ADD_ARGS' : 'ADD_ARGS',
|
'ADD_ARGS' : 'ADD_ARGS',
|
||||||
'MAKE_ARGS' : 'MAKE_ARGS',
|
'MAKE_ARGS' : 'MAKE_ARGS',
|
||||||
@ -314,6 +315,7 @@ def p_driver_assignment(p):
|
|||||||
| ADD_ARGS EQUALS text_string
|
| ADD_ARGS EQUALS text_string
|
||||||
| MAKE_ARGS EQUALS text_string
|
| MAKE_ARGS EQUALS text_string
|
||||||
| PROTOCOL_ARGS EQUALS text_string
|
| PROTOCOL_ARGS EQUALS text_string
|
||||||
|
| DEBUG_THRESHOLD EQUALS value
|
||||||
'''
|
'''
|
||||||
p[0] = { p[1] : p[3] }
|
p[0] = { p[1] : p[3] }
|
||||||
|
|
||||||
@ -822,7 +824,7 @@ def put_preamble(MyDriver):
|
|||||||
txt += ['#']
|
txt += ['#']
|
||||||
txt += ['']
|
txt += ['']
|
||||||
txt += ['namespace eval %s {' % MyDriver['namespace']]
|
txt += ['namespace eval %s {' % MyDriver['namespace']]
|
||||||
txt += [' set debug_threshold 5']
|
txt += [' set debug_threshold %s' % str( MyDriver['debug_threshold'])]
|
||||||
if len(MyDriver['Permlink']) > 0:
|
if len(MyDriver['Permlink']) > 0:
|
||||||
if 'make_args' in MyDriver and 'id' in MyDriver['make_args'].split():
|
if 'make_args' in MyDriver and 'id' in MyDriver['make_args'].split():
|
||||||
pass
|
pass
|
||||||
@ -1322,7 +1324,7 @@ def put_mkDriver(MyDriver):
|
|||||||
txt += put_group(MyDriver, MyDriver['Groups'][group])
|
txt += put_group(MyDriver, MyDriver['Groups'][group])
|
||||||
|
|
||||||
txt += [' hsetprop ${scobj_hpath} klass %s' % MyDriver['class']]
|
txt += [' hsetprop ${scobj_hpath} klass %s' % MyDriver['class']]
|
||||||
txt += [' hsetprop ${scobj_hpath} debug_threshold 5']
|
txt += [' hsetprop ${scobj_hpath} debug_threshold %s' % str(MyDriver['debug_threshold'])]
|
||||||
func = 'mkDriver'
|
func = 'mkDriver'
|
||||||
if func in MyDriver['Funcs']:
|
if func in MyDriver['Funcs']:
|
||||||
txt += ['# %s hook code starts' % func]
|
txt += ['# %s hook code starts' % func]
|
||||||
@ -1504,6 +1506,7 @@ def process_drivers(TheDrivers):
|
|||||||
for driver in TheDrivers:
|
for driver in TheDrivers:
|
||||||
MyDriver = {'name':driver}
|
MyDriver = {'name':driver}
|
||||||
MyDriver['namespace'] = '::scobj::%s' % driver
|
MyDriver['namespace'] = '::scobj::%s' % driver
|
||||||
|
MyDriver['debug_threshold'] = '5'
|
||||||
MyDriver['Groups'] = {}
|
MyDriver['Groups'] = {}
|
||||||
MyDriver['Funcs'] = {}
|
MyDriver['Funcs'] = {}
|
||||||
MyDriver['Permlink'] = {}
|
MyDriver['Permlink'] = {}
|
||||||
|
Reference in New Issue
Block a user