.. _section-dds-options: DDS Options for Protocol Buffers ******************************** Message Options =============== .. list-table:: Message Options (``.omg.dds.type``) :name: MessageOptions :widths: 20 60 40 40 :header-rows: 1 * - Option - Description - Value - |IDL| Output * - ``.name`` - Specifies a custom name that will be used to identify the type when used on a DDS topic. - ``"MyCustomName"`` (non-empty string literal) - ``@type_name("MyCustomName")`` * - ``.extensibility`` - Controls the extensibility annotation of the corresponding |IDL| ``struct``. - ``MUTABLE`` - ``@mutable`` * - - - ``FINAL`` - ``@final`` * - - - ``APPENDABLE`` - ``@appendable`` * - ``.default_id`` - Specifies the default policy used to control the default ``@id`` annotation emitted for each member of an |IDL| ``struct``. - ``PROTOBUF_DEFAULT_ID`` - ``@id(N)`` (on members) * - - - ``DDS_DEFAULT_ID`` - N/A (use default DDS id for each member) * - ``.auto_id`` - Controls the ``@autoid`` annotation for the |IDL| ``struct``. - ``NO_AUTO_ID`` - N/A (no annotation) * - - - ``SEQUENTIAL`` - ``@autoid(sequential)`` * - - - ``HASH`` - ``@autoid(hash)`` Field Options ============= .. list-table:: Field Options (``.omg.dds.member``) :name: FieldOptions :widths: 20 60 40 40 :header-rows: 1 * - Option - Description - Value - |IDL| Output * - ``.key`` - Specifies whether the corresponding member is part of the DDS key. - ``true`` - ``@key`` * - - - ``false`` (default) - N/A (no annotation) * - ``.optional`` - Controls whether the corresponding member should be annotated as ``@optional``. If specified, this option will take precedence over the default annotionation derived from the field's "presence". - ``true`` - ``@optional`` * - - - ``false`` - N/A (no annotation) * - ``.default_id`` - Controls the default ``@id`` annotation emitted for the corresponding member. If specified, this option will take precedence over the default policy set at the message level via option ``.omg.dds.type.default_id``. - See ``.omg.dds.type.default_id``. - * - ``.id`` - Explicitly set and emit a specific ``@id`` annotation for the corresponding member. - ``N`` (32-bit unsigned integer) - ``@id(N)`` * - ``.hash_id`` - Generates the ``@hashid`` annotation for the corresponding member with the specified source string. - ``"My String"`` (non-empty string literal) - ``@hashid("My String")`` .. _section-omg-dds-descriptor: omg/dds/descriptor.proto ======================== .. .. literalinclude:: /../../resource/proto/omg/dds/descriptor.proto .. literalinclude:: /../../proto/omg/dds/descriptor.proto :language: protobuf :linenos: :caption: omg/dds/descriptor.proto