Ticket #1180 (closed: fixed)
Exclude sub-parts of a type defined in IDF
Reported by: | Anders Markvardsen | Owned by: | Anders Markvardsen |
---|---|---|---|
Priority: | major | Milestone: | Iteration 24 |
Component: | Keywords: | ||
Cc: | nick.draper@… | Blocked By: | |
Blocking: | Tester: | Martyn Gigg |
Description
Exclude sub-parts of a 'type' defined in instrument definition file using the notation described below.
Say we have a type defined as follows
<type name="door">
<component type="standard-tube">
<location r="2.5" t="19.163020" name="tube1"/> <location r="2.5" t="19.793250" name="tube2"/> <location r="2.5" t="20.423470" name="tube3"/> <location r="2.5" t="21.053700" name="tube4"/> <location r="2.5" t="21.683930" name="tube5"/> <location r="2.5" t="22.314160" name="tube6"/> <location r="2.5" t="22.944390" name="tube7"/> <location r="2.5" t="23.574620" name="tube8"/>
</component>
</type>
The instrument consists of a number of these doors but some of these doors are different in the sense that 1 or 2 tubes are missing for some of them.
So a suggestion is to allow <exclude> sub-elements of <location> using a notation along the lines of
<component type="door">
<location x="0">
<exclude sub-part="tube7"/> <exclude sub-part="tube8"/>
</location> <location x="1" /> <location x="2" /> <location x="3">
<exclude sub-part="tube3"/>
</location>
</component>
where the sub-part of <exclude> refers to the 'name' of one of the components of the type 'door'.
This notation would make the ENGINE-X description more succient.
Change History
comment:2 Changed 10 years ago by Anders Markvardsen
- Status changed from new to accepted
Updated wiki and informed joe about this feature for engine-x idf
comment:4 Changed 10 years ago by Anders Markvardsen
- Status changed from accepted to testing
- Resolution set to fixed
comment:5 Changed 10 years ago by Russell Taylor
- Status changed from testing to reopened
- Resolution fixed deleted
Well I see the code for this, which looks OK if perhaps not as efficient as it could be (please don't ever pass a vector by value), but I don't see any unit test coverage. This needs to be added. The fact that the ENGIN-X definition doesn't use the <exclude> tag means that this can probably wait until after the release.
comment:6 Changed 10 years ago by Anders Markvardsen
- Status changed from reopened to accepted
Unit tests how in fact been included. Although in LoadEmptyInstrument rather than LoadInstrument. See test testParameterTags, which test <exclude> in Test/Instrument/IDFs_for_UNIT_TESTING/IDF_for_UNIT_TESTING2.xml.
comment:9 Changed 10 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:10 Changed 10 years ago by Martyn Gigg
The unit test for this passes but none of the current IDFs use this functionality.
Verified in #5882
comment:12 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2027
(In [4357]) Implementing code for excluding sub-parts of components defined in IDFs
<component type="door">
</component>
Refs #1180