-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
The DTD file for a PRF file specifies that the <simple> tag has an optional <kind> child:
<!ELEMENT simple
( description?
, value?
, units?
, range?
, enumerations?
, kind*
, action?
)>
<!ELEMENT kind EMPTY>
<!ATTLIST kind
kindtype (allocation | property | configure | test | execparam | factoryparam | event | message)
"configure">
However, the loadSADFile function assumes that the <kind> tag is always present
| for prop_check in _prf.get_simple(): |
_prf = parsers.prf.parse(prfFilename)
execprops = []
configurable[instanceName] = []
for prop_check in _prf.get_simple():
if prop_check.get_kind()[0].get_kindtype() == 'execparam':
execprops.append(str(prop_check.get_id()))
if prop_check.get_kind()[0].get_kindtype() == 'configure':
if prop_check.get_mode() == 'readwrite' or prop_check.get_mode() == 'writeonly':
configurable[instanceName].append(str(prop_check.get_id()))
if prop_check.get_kind()[0].get_kindtype() == 'property':
if prop_check.get_mode() == 'readwrite' or prop_check.get_mode() == 'writeonly':
configurable[instanceName].append(str(prop_check.get_id()))Calling loadSADFile with a waveform with a component that has a simple property without a <kind> tag will result in an error message:
DEBUG:ossie.utils.sb.domainless:COMPONENT PLACEMENT component spd file id 'PSD_a9532f88-cd71-4e79-938e-fb84c67b0722'
DEBUG:ossie.utils.sb.domainless:COMPONENT PLACEMENT component instantiation id 'PSD_1'
DEBUG:ossie.utils.sb.domainless:COMPONENT PLACEMENT component startorder '1'
DEBUG:ossie.utils.sb.domainless:COMPONENT PLACEMENT component name 'PSD_1'
DEBUG:ossie.utils.sb.domainless:launching component 'PSD_1'
DEBUG:ossie.utils.sandbox.launcher:Killing process group 74527 with signal 2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/redhawk/core/lib/python/ossie/utils/sb/domainless.py", line 1097, in loadSADFile
raise RuntimeError(msg)
RuntimeError: ERROR - Failed to load sad file: /var/redhawk/sdr/dom/waveforms/MockDetectorWaveform/MockDetectorWaveform.sad.xml REASON: list index out of rangeThe list index out of range exception is coming from the line:
if prop_check.get_kind()[0].get_kindtype() == 'execparam': I believe the code should check for a missing tag and use the default configure value in this case.
Metadata
Metadata
Assignees
Labels
No labels