Changeset 4fc185c in rtems-central


Ignore:
Timestamp:
May 4, 2020, 12:47:15 PM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
aab2f5e
Parents:
ddbc8f7
git-author:
Sebastian Huber <sebastian.huber@…> (05/04/20 12:47:15)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/28/20 08:34:46)
Message:

interface: Fix specification of compounds

Use definition attribute for compound members.

Location:
rtemsqual
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/interface.py

    rddbc8f7 r4fc185c  
    267267            with content.indent():
    268268                index = 0
    269                 for compound_member in definition["members"]:
     269                for compound_member in definition["definition"]:
    270270                    content.add(
    271                         _add_definition(self, item, f"members[{index}]",
     271                        _add_definition(self, item, f"definition[{index}]",
    272272                                        compound_member,
    273273                                        Node._get_compound_definition))
  • rtemsqual/tests/spec-interface/s.yml

    rddbc8f7 r4fc185c  
    1010  default:
    1111    brief: Brief union description.
    12     definition: ${uint32_t:/interface-name} ${.:name}
     12    definition:
     13      - default:
     14          brief: Brief member description.
     15          definition: ${uint32_t:/interface-name} ${.:name}
     16          description: Member description.
     17          kind: member
     18          name: some_member
     19        variants: []
     20      - default:
     21          brief: Brief struct description.
     22          definition:
     23          - default:
     24              brief: Brief member 2 description.
     25              definition: ${uint32_t:/interface-name} ${.:name}
     26              description: Member 2 description.
     27              kind: member
     28              name: some_member_2
     29            variants: []
     30          - default:
     31              brief: Brief member 3 description.
     32              definition: ${enum:/interface-name} ${.:name}
     33              description: Member 3 description.
     34              kind: member
     35              name: some_member_3
     36            variants: []
     37          description: struct description.
     38          kind: struct
     39          name: some_struct
     40        variants: []
    1341    description: Union description.
    1442    kind: union
    1543    name: some_union
    16     members:
    17     - default:
    18         brief: Brief member description.
    19         definition: ${uint32_t:/interface-name} ${.:name}
    20         description: Member description.
    21         kind: member
    22         name: some_member
    23       variants: []
    24     - default:
    25         brief: Brief member 2 description.
    26         definition: ${uint32_t:/interface-name} ${.:name}
    27         description: Member 2 description.
    28         kind: member
    29         name: some_member_2
    30       variants: []
    3144  variants: []
    3245interface-type: struct
  • rtemsqual/tests/test_interface.py

    rddbc8f7 r4fc185c  
    116116
    117117/**
     118 * @ingroup GroupB
     119 *
     120 * @brief Enum brief description.
     121 *
     122 * Enum description.
     123 */
     124typedef enum {
     125  /**
     126   * @brief Enumerator 0 brief description.
     127   */
     128  ENUMERATOR_0,
     129
     130  /**
     131   * @brief Enumerator 1 brief description.
     132   */
     133  ENUMERATOR_1,
     134
     135  /**
     136   * @brief Enumerator 2 brief description.
     137   */
     138  ENUMERATOR_2
     139} Enum;
     140
     141/**
    118142 * @ingroup GroupA
    119143 */
     
    127151    ((float_t) 123)
    128152#endif
    129 
    130 /**
    131  * @ingroup GroupB
    132  *
    133  * @brief Enum brief description.
    134  *
    135  * Enum description.
    136  */
    137 typedef enum {
    138   /**
    139    * @brief Enumerator 0 brief description.
    140    */
    141   ENUMERATOR_0,
    142 
    143   /**
    144    * @brief Enumerator 1 brief description.
    145    */
    146   ENUMERATOR_1,
    147 
    148   /**
    149    * @brief Enumerator 2 brief description.
    150    */
    151   ENUMERATOR_2
    152 } Enum;
    153153
    154154/**
     
    275275
    276276    /**
    277      * @brief Brief member 2 description.
     277     * @brief Brief struct description.
    278278     *
    279      * Member 2 description.
     279     * struct description.
    280280     */
    281     uint32_t some_member_2;
     281    struct {
     282      /**
     283       * @brief Brief member 2 description.
     284       *
     285       * Member 2 description.
     286       */
     287      uint32_t some_member_2;
     288
     289      /**
     290       * @brief Brief member 3 description.
     291       *
     292       * Member 3 description.
     293       */
     294      Enum some_member_3;
     295    } some_struct;
    282296  } some_union;
    283297};
Note: See TracChangeset for help on using the changeset viewer.