.. _architecture_protocol:
Protocol module
===============
.. raw:: html
.. raw:: html
:file: ../figures/svg_href_loader.html
.. raw:: html
:file: ../figures/stack_diagram.svg
.. include:: ../safety_manual/rules/RULE_PROTOCOL_MODULE_NOT_ALLOW.inc
This module is responsible for the wire protocol operation of the DDS implementation.
In the current version of Safe DDS, the provided :ref:`DDS APIs ` do not allow changing the wire protocol mechanism; the provided implementation is compliant with OMG DDSI-RTPS specification v2.5.
Protocol module and its ``protocol::rtps`` implementation can be used to create lightweight *DDS-interoperable* applications that do not require the full DDS API.
By leveraging provided implementation, it is possible to create ``rtps::Reader`` and ``rtps::Writer`` entities which can communicate with other DDS entities using the RTPS protocol:
* `protocol::rtps::Reader <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1rtps_1_1_reader.html>`__
* `protocol::rtps::Writer <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1rtps_1_1_writer.html>`__
Those two entities will need the application to provide a set of interface implementations that allow them to interact with samples databases, reliability behaviours, network flow controlling, etc.
This interfaces are:
* `protocol::ICacheChangeDatabaseQuerier <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_cache_change_database_querier.html>`__
* `protocol::ICacheChangeDatabaseUpdater <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_cache_change_database_updater.html>`__
* `protocol::ICacheChangeRelevanceQuerier <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_cache_change_relevance_querier.html>`__
* `protocol::IReaderObserver <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_reader_observer.html>`__
* `protocol::IWriterObserver <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_writer_observer.html>`__
Those entities will interface with the :ref:`architecture_transport` by means of the following interfaces:
* `protocol::IMessageSink <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_message_sink.html>`__
* `protocol::IProcessor <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1_i_processor.html>`__
An RTPS implementation of ``protocol::IProcessor`` and related utilities such a message dispatcher can be found in:
* `protocol::rtps::Processor <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1rtps_1_1_processor.html>`__
* `protocol::rtps::ProcessorDispatcher <../doxygen/classeprosima_1_1safedds_1_1protocol_1_1rtps_1_1_processor_dispatcher.html>`__