mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 13:54:34 -06:00
133 lines
4.4 KiB
XML
133 lines
4.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<grammar
|
|
xmlns="http://relaxng.org/ns/structure/1.0"
|
|
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
|
|
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
|
|
<include href="common_elements.rng"/>
|
|
|
|
<start>
|
|
<element name="serializable">
|
|
<!-- Required attributes -->
|
|
|
|
<attribute name="name">
|
|
<a:documentation>Name of the serializable object.</a:documentation>
|
|
<text/>
|
|
</attribute>
|
|
|
|
<!-- Optional attributes -->
|
|
|
|
<optional>
|
|
<attribute name="namespace">
|
|
<a:documentation>Namespace of the serializable object.</a:documentation>
|
|
<text/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<optional>
|
|
<attribute name="typeid">
|
|
<a:documentation>ID for the object. If not declared, the autocoder generates one. Must be unique
|
|
across all serializable files.
|
|
</a:documentation>
|
|
<ref name="id_define"/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<interleave>
|
|
<!-- Required elements -->
|
|
|
|
<ref name="members_define"/>
|
|
|
|
<!-- Optional elements -->
|
|
|
|
<zeroOrMore>
|
|
<element name="import_serializable_type">
|
|
<a:documentation>Import more serializable objects.</a:documentation>
|
|
<data type="anyURI"/>
|
|
</element>
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
<element name="include_header">
|
|
<a:documentation>Import header files.</a:documentation>
|
|
<data type="anyURI"/>
|
|
</element>
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
<element name="import_enum_type">
|
|
<a:documentation>Import enum XML files.</a:documentation>
|
|
<data type="anyURI"/>
|
|
</element>
|
|
</zeroOrMore>
|
|
|
|
<zeroOrMore>
|
|
<element name="import_array_type">
|
|
<a:documentation>Import array XML files.</a:documentation>
|
|
<data type="anyURI"/>
|
|
</element>
|
|
</zeroOrMore>
|
|
|
|
<optional>
|
|
<!-- Optional Comments -->
|
|
<ref name="comment_define"/>
|
|
</optional>
|
|
</interleave>
|
|
</element>
|
|
</start>
|
|
|
|
<define name="members_define">
|
|
<!-- 'members' is just a tag that hold multiple 'member' tags -->
|
|
<element name="members">
|
|
<a:documentation>A collection of member items to define the serializable object.</a:documentation>
|
|
<oneOrMore>
|
|
<ref name="member_define"/>
|
|
</oneOrMore>
|
|
</element>
|
|
</define>
|
|
|
|
<define name="member_define">
|
|
<!-- Defines each item that one of these objects can store -->
|
|
<element name="member">
|
|
<a:documentation>Item define in the serializable object.</a:documentation>
|
|
|
|
<!-- Required attributes -->
|
|
|
|
<attribute name="name">
|
|
<a:documentation>Name of the member item.</a:documentation>
|
|
<text/>
|
|
</attribute>
|
|
|
|
<!-- Optional attributes -->
|
|
|
|
<optional>
|
|
<a:documentation>Optional comment.</a:documentation>
|
|
<attribute name="comment">
|
|
<text/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<optional>
|
|
<a:documentation>Format string</a:documentation>
|
|
<attribute name="format">
|
|
<text/>
|
|
</attribute>
|
|
</optional>
|
|
|
|
<!-- Optional element -->
|
|
|
|
<interleave>
|
|
<optional>
|
|
<a:documentation>Optional default value.</a:documentation>
|
|
<element name="default">
|
|
<text/>
|
|
</element>
|
|
</optional>
|
|
|
|
<!-- Type, size, and internal enum define are defined within this ref -->
|
|
<ref name="type_size_choice_define"/>
|
|
</interleave>
|
|
</element>
|
|
</define>
|
|
</grammar>
|