Hi Folks,
We have some SBE questions. Are the following allowed per SBE standard?
- Two composites referencing each other, so the referred type in one “Engine” is actually declared after the first usage. Since the
boosterfield could be optional, the nestedness could stop at any arbitrary depth with the null value for “booster_val_field”
<composite name="Booster">
<type name="booster_val_field" primitiveType="int64"/>
<ref name="Engine">type="Engine"/>
</composite>
<composite name="Engine">
<type name="engine_val_field" primitiveType="int64"/>
<ref name="booster" type="Booster" presence="optional"/>
</composite>
- Assuming nested ref tag is allowed (please kindly point out if it’s not or unlikely in practice), a composite referencing itself. It could stop following the same null value logic as above.
<composite name="Engine">
<type name="value" primitiveType="int64"/>
<ref name="booster" type=" Engine" presence="optional"/>
</composite>
- (not related to ref tag) Is it okay for a spec to have a composite/type that is completely unreferenced in any message? For example
<field name="modelYear" id="2" type="ModelYear"/>is removed from the “Car” message, but remains declared inside “types”.
I sincerely appreciate your help!