### Get Help for QoS Configuration Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Display examples and available QoS policies for configuring the pubsub tool using the `--qoshelp` option. ```console $ pubsub --qoshelp ``` -------------------------------- ### Install Documentation Dependencies Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/how-to-build.md Install the necessary Python packages for building the documentation using pip and the requirements.txt file. ```bash pip install -r requirements.txt ``` -------------------------------- ### Install Development and Documentation Dependencies Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/intro.md Install additional dependencies for running the test suite or building documentation from source. This includes optional components for development and docs. ```shell git clone https://github.com/eclipse-cyclonedds/cyclonedds-python cd cyclonedds-python # Testsuite: pip install .[dev] pytest # Documentation pip install .[docs] cd docs sphinx-build ./source ./build python -m http.server --directory build ``` -------------------------------- ### Install CycloneDDS Python with Pre-built Binaries Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Use this command for the simplest installation when DDS Security and shared memory via Iceoryx are not required. ```bash $ pip install cyclonedds ``` -------------------------------- ### Build and Install CycloneDDS Python from Git Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md This method clones the CycloneDDS repository, builds and installs it, sets the CYCLONEDDS_HOME environment variable, and then installs the Python package directly from a git repository. ```bash $ git clone https://github.com/eclipse-cyclonedds/cyclonedds $ cd cyclonedds && mkdir build install && cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=../install $ cmake --build . --config RelWithDebInfo --target install $ cd .. $ export CYCLONEDDS_HOME="$(pwd)/install" $ pip3 install git+https://github.com/eclipse-cyclonedds/cyclonedds-python ``` -------------------------------- ### CMake Minimum Requirements and Project Setup Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/tests/support_modules/fuzz_tools/rand_idl/c_app/CMakeLists.txt Sets the minimum CMake version and defines the project name and language. Ensure CycloneDDS is installed and findable. ```cmake cmake_minimum_required(VERSION 3.16) project(xtypes_sub LANGUAGES C) find_package(CycloneDDS REQUIRED) ``` -------------------------------- ### Run the Pub/Sub Tool Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Execute the pubsub tool to start publishing or subscribing. ```console $ pubsub [Options] ``` -------------------------------- ### Install CycloneDDS with Development Dependencies (Local Clone) Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Install the CycloneDDS package from a local git clone, including development dependencies using pip. ```bash cd /path/to/git/clone # for development: pip3 install --user ".[dev]" # for documentation generation pip3 install --user ".[docs]" # or for both pip3 install --user ".[dev,docs]" ``` -------------------------------- ### Install Cyclone DDS Python from GitHub with custom path Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/intro.md Install the Cyclone DDS Python API directly from GitHub, setting the CYCLONEDDS_HOME environment variable to specify a custom installation path for the C library. ```shell CYCLONEDDS_HOME="/path/to/cyclonedds" pip install git+https://github.com/eclipse-cyclonedds/cyclonedds-python ``` -------------------------------- ### Install CycloneDDS with Development Dependencies Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Install the CycloneDDS package from a GitHub repository, including development dependencies using pip. ```bash pip3 install --user "cyclonedds[dev] @ git+https://github.com/eclipse-cyclonedds/cyclonedds-python" ``` -------------------------------- ### Install Cyclone DDS Python via pip Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/intro.md Install the Cyclone DDS Python API from PyPi using pip. This is the simplest installation method. ```shell pip install cyclonedds ``` -------------------------------- ### Build and Install CycloneDDS Python from Source via PyPI Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md This process involves cloning the CycloneDDS repository, building it, setting the CYCLONEDDS_HOME environment variable, and then installing the Python package from PyPI without using pre-built binaries. ```bash $ git clone https://github.com/eclipse-cyclonedds/cyclonedds $ cd cyclonedds && mkdir build install && cd build $ cmake .. -DCMAKE_INSTALL_PREFIX=../install $ cmake --build . --config RelWithDebInfo --target install $ cd .. $ export CYCLONEDDS_HOME="$(pwd)/install" $ pip3 install cyclonedds --no-binary cyclonedds ``` -------------------------------- ### Instantiate Lifespan Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Provides an example of creating a Lifespan QoS policy with a specified duration. ```python from cyclonedds.core import Policy from cyclonedds.core import duration # Lifespan of 2 seconds lifespan_policy = Policy.Lifespan(duration(seconds=2)) ``` -------------------------------- ### Instantiate History Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Provides examples for creating History QoS policies, specifically KeepAll and KeepLast with a specified depth. ```python from cyclonedds.core import Policy # Keep all samples history_keep_all = Policy.History.KeepAll # Keep the last 10 samples history_keep_last = Policy.History.KeepLast(depth=10) ``` -------------------------------- ### Show cyclonedds help Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Displays the help screen showing available subcommands for the cyclonedds tool. No setup is required. ```bash cyclonedds --help ``` -------------------------------- ### Rebuild Documentation (after activating venv) Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/how-to-build.md When rebuilding docs in a new shell, first activate the virtual environment, then run the sphinx-build command. Dependency installation is skipped. ```bash source .venv/bin/activate sphinx-build ./manual ./output ``` -------------------------------- ### Install CycloneDDS Python Nightly Build Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Install the nightly build for the latest features, which may be less stable and could include API breaks. ```bash $ pip install cyclonedds-nightly ``` -------------------------------- ### Instantiate Durability Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Shows examples of creating different Durability QoS policy types: Volatile, TransientLocal, Transient, and Persistent. ```python from cyclonedds.core import Policy durability_volatile = Policy.Durability.Volatile durability_transient_local = Policy.Durability.TransientLocal durability_transient = Policy.Durability.Transient durability_persistent = Policy.Durability.Persistent ``` -------------------------------- ### Run DDS performance tests Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Acts as a front-end to `ddsperf` with modes for publish, subscribe, ping, and pong. This example shows a subscribe performance test. ```bash cyclonedds performance --duration 21s --render-output-once-on-exit --force-color-mode subscribe --triggering-mode waitset ``` -------------------------------- ### Get Help for Pub/Sub Tool Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Display the help message for the pubsub tool to see available options. ```console $ pubsub --help ``` -------------------------------- ### ddsls JSON output example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md This is an example of the JSON structure written to a file when using the --filename option. ```json { "PARTICIPANT": { "New": { "da531001-77b3-aef6-0cb8-647f000001c1": { "key": "da531001-77b3-aef6-0cb8-647f000001c1" } }, "Disposed": { "8e281001-e010-0c8d-305c-20a3000001c1": { "key": "8e281001-e010-0c8d-305c-20a3000001c1" } } } } ``` -------------------------------- ### Property QoS Policy Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Configure custom properties using the Property QoS policy. This policy accepts string keys and values, with an optional boolean to control propagation. ```python >>> Policy.Property(key="host", value="central", propagate=True) ``` -------------------------------- ### Topicdata QoS Policy Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Use the Topicdata QoS policy to set topic-specific data. The data must be provided as bytes. ```python >>> Policy.Topicdata(data=b"Hello, World!") ``` -------------------------------- ### Dynamically subscribe to a topic Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Dynamically subscribes to a specified topic and displays incoming data. The topic type is discovered similarly to the `typeof` command. Example shown with Vehicle example and a 10-second timeout. ```bash timeout -s INT 10s cyclonedds subscribe Vehicle --suppress-progress-bar --force-color-mode ``` -------------------------------- ### List DDS entities and QoS Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Shows the entities and their QoS settings in your DDS system. Useful for verifying system state. Run with Python Vehicle example in background. ```bash cyclonedds ls --suppress-progress-bar --force-color-mode ``` -------------------------------- ### EntityName QoS Policy Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Set a specific name for an entity using the EntityName QoS policy. The name must be a string. ```python >>> Policy.EntityName(name="my_entity_name") ``` -------------------------------- ### Build Self-Contained CycloneDDS CLI Binary Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Build a self-contained binary of the `cyclonedds` CLI tool using PyOxidizer. Ensure PyOxidizer is installed first. ```bash cd /path/to/git/clone pip3 install --user pyoxidizer pyoxidizer build ``` -------------------------------- ### Dynamically publish to a topic Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Dynamically builds a REPL with datatypes and a writer for a topic, allowing data to be published. The type discovery process is similar to the `typeof` command. No specific example code provided, only help. ```bash cyclonedds publish --help ``` -------------------------------- ### BinaryProperty QoS Policy Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Use BinaryProperty for custom properties where the value is in bytes. The propagate parameter controls if the property is shared. ```python >>> Policy.BinaryProperty(key="host", value=b"central", propagate=True) ``` -------------------------------- ### Define a Sequence of Strings Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md Use `cyclonedds.idl.types.sequence` to define a list of elements of the same type. This example shows a sequence of strings. ```python from dataclasses import dataclass from cyclonedds.idl import IdlStruct from cyclonedds.idl.types import sequence @dataclass class Names(IdlStruct): names: sequence[str] n = Names(names=["foo", "bar", "baz"]) ``` -------------------------------- ### Configure DurabilityService QoS with Multiple Arguments Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Set the DurabilityService QoS with multiple arguments, separated by spaces, commas, or colons. This example shows setting duration and history parameters. ```console $ pubsub --topic hello --qos DurabilityService 1000, History.KeepLast 10, 100, 10, 10 ``` -------------------------------- ### Set Entity QoS for Data Writer Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Use the --entityqos option in conjunction with --qos to set specific QoS policies for particular entities, like the data writer. This example sets Durability to TransientLocal for the data writer. ```console $ pubsub --topic hello --qos Durability.TransientLocal --entityqos datawriter ``` -------------------------------- ### Groupdata QoS Policy Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md The Groupdata QoS policy is used for group-level configurations. Ensure the data is provided in bytes format. ```python >>> Policy.Groupdata(data=b"Hello, World!") ``` -------------------------------- ### List DDS applications Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Lists the applications currently running in your DDS system. This functionality depends on 'Participant Properties' (QoS properties). Run with Python Vehicle example in background. ```bash cyclonedds ps --suppress-progress-bar --force-color-mode ``` -------------------------------- ### ddsls Output Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md This output shows the details of DDS entities discovered by ddsls. It includes information about new participants, publications, and subscriptions, along with their respective keys, associated participant information, topic and type names, and QoS settings. 'New' indicates an alive entity, while 'Disposed' would indicate a removed one. ```text -- New PARTICIPANT -- key: 9ce21001-ad00-8ac9-4428-52f1000001c1 qos: Qos() key: 350c1001-c5e3-ca6b-712a-ee09000001c1 qos: Qos() -- New PUBLICATION -- key: 9ce21001-ad00-8ac9-4428-52f100000102 participant_key: 9ce21001-ad00-8ac9-4428-52f1000001c1 participant_instance_handle: 11822753457071331301 topic_name: Vehicle type_name: vehicles::Vehicle qos: Qos(Policy.Deadline(deadline=10000), Policy.DestinationOrder.ByReceptionTimestamp, Policy.Durability.Transient, Policy.DurabilityService(cleanup_delay=0, history=Policy.History.KeepLast(depth=1), max_samples=-1, max_instances=-1, max_samples_per_instance=-1), Policy.History.KeepLast(depth=10), Policy.IgnoreLocal.Nothing, Policy.LatencyBudget(budget=0), Policy.Lifespan(lifespan=9223372036854775807), Policy.Liveliness.Automatic(lease_duration=9223372036854775807), Policy.Ownership.Shared, Policy.OwnershipStrength(strength=0), Policy.PresentationAccessScope.Instance(coherent_access=False, ordered_access=False), Policy.Reliability.BestEffort, Policy.ResourceLimits(max_samples=-1, max_instances=-1, max_samples_per_instance=-1), Policy.TransportPriority(priority=0), Policy.WriterDataLifecycle(autodispose=True)) -- New SUBSCRIPTION -- key: 350c1001-c5e3-ca6b-712a-ee0900000107 participant_key: 350c1001-c5e3-ca6b-712a-ee09000001c1 participant_instance_handle: 5513147631977453825 topic_name: Vehicle type_name: vehicles::Vehicle qos: Qos(Policy.Deadline(deadline=10000), Policy.DestinationOrder.ByReceptionTimestamp, Policy.Durability.Transient, Policy.History.KeepLast(depth=10), Policy.IgnoreLocal.Nothing, Policy.LatencyBudget(budget=0), Policy.Liveliness.Automatic(lease_duration=9223372036854775807), Policy.Ownership.Shared, Policy.PresentationAccessScope.Instance(coherent_access=False, ordered_access=False), Policy.ReaderDataLifecycle(autopurge_nowriter_samples_delay=9223372036854775807, autopurge_disposed_samples_delay=9223372036854775807), Policy.Reliability.BestEffort, Policy.ResourceLimits(max_samples=-1, max_instances=-1, max_samples_per_instance=-1), Policy.TimeBasedFilter(filter_time=0), Policy.TransportPriority(priority=0)) ``` -------------------------------- ### Define Bounded Sequence and Array Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md Use `cyclonedds.idl.types.array` for fixed-size lists and `cyclonedds.idl.types.sequence` with a size parameter for bounded sequences. This example defines an array of 3 integers and a sequence of integers with a maximum of 4 elements. ```python from dataclasses import dataclass from cyclonedds.idl import IdlStruct from cyclonedds.idl.types import sequence, array @dataclass class Numbers(IdlStruct): ThreeNumbers: array[int, 3] MaxFourNumbers: sequence[int, 4] ``` -------------------------------- ### Enable Watch Mode in ddsls Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Use the --watch option to enable watch mode, which keeps ddsls running to monitor entity creation, disposal, and QoS changes in real-time. This example monitors the dcpsparticipant topic. ```console $ ddsls --topic dcpsparticipant --watch ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/how-to-build.md Host the built documentation using Python's http.server to view it in a browser. Specify the directory containing the built files. ```bash python -m http.server --directory output ``` -------------------------------- ### Create and Inspect Qos Objects Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Demonstrates how to create a Qos object with specific policies and how to check for the presence of a policy. ```python from cyclonedds.core import Qos, Policy # Create a Qos object with Reliable and KeepLast policies qos = Qos(Policy.Reliability.Reliable(max_blocking_time=duration(seconds=1)), Policy.History.KeepLast(depth=10)) # Check if a policy is present print(Policy.History.KeepLast in qos) print(Policy.History.KeepAll in qos) ``` -------------------------------- ### Define a Dictionary with String Keys and Values Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md While dictionaries are not directly supported by the IDL compiler, they can be used in pure Python projects. Use `typing.Dict` to define dictionaries where both keys and values have a constant type. This example uses string keys and string values. ```python from typing import Dict from dataclasses import dataclass from cyclonedds.idl import IdlStruct @dataclasses.dataclass class ColourMap(IdlStruct): mapping: Dict[str, str] c = ColourMap({"red": "#ff0000", "blue": "#0000ff"}) ``` -------------------------------- ### Instantiate ResourceLimits Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Demonstrates creating a ResourceLimits QoS policy with specified limits for samples, instances, and samples per instance. ```python from cyclonedds.core import Policy resource_limits = Policy.ResourceLimits( max_samples=10, max_instances=10, max_samples_per_instance=2 ) ``` -------------------------------- ### Create and Activate Virtual Environment Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/how-to-build.md Use a virtual environment to isolate documentation building dependencies. Activate it using the 'source' command. ```bash python -m venv .venv source .venv/bin/activate ``` -------------------------------- ### Build and Serve Documentation Locally Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Commands to build Sphinx documentation and serve it locally for preview. Navigate to the 'docs' directory and use Python's HTTP server. ```bash cd docs python -m sphinx source/ _build/ # Serve the HTML files to view at localhost:8000 python -m http.server -d _build ``` -------------------------------- ### guid class Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.internal.md Represents a Globally Unique Identifier (GUID) within CycloneDDS. Provides methods for conversion to Python's UUID type. ```APIDOC ## class guid ### Description Represents a Globally Unique Identifier (GUID). ### Methods #### as_python_guid() Converts the GUID to a Python UUID object. * **Return type:** *UUID* ``` -------------------------------- ### Instantiate Reliability Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Demonstrates how to create instances of the Reliability QoS policy, including BestEffort and Reliable with a max_blocking_time. ```python from cyclonedds.core import Policy from cyclonedds.core import duration # BestEffort reliability reliability_best_effort = Policy.Reliability.BestEffort # Reliable with a maximum blocking time of 1 second reliability_reliable = Policy.Reliability.Reliable(max_blocking_time=duration(seconds=1)) ``` -------------------------------- ### Build Documentation with Sphinx Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/how-to-build.md Build the documentation using the sphinx-build command, specifying the source and output directories. ```bash sphinx-build ./manual ./output ``` -------------------------------- ### Instantiate PresentationAccessScope Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Shows how to create PresentationAccessScope QoS policies with different access scopes (Instance, Topic, Group) and access control settings. ```python from cyclonedds.core import Policy # Instance scope with coherent and ordered access pres_instance = Policy.PresentationAccessScope.Instance(coherent_access=True, ordered_access=False) # Topic scope with coherent and ordered access pres_topic = Policy.PresentationAccessScope.Topic(coherent_access=True, ordered_access=False) # Group scope with coherent and ordered access pres_group = Policy.PresentationAccessScope.Group(coherent_access=True, ordered_access=False) ``` -------------------------------- ### now Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/index.md Gets the current timestamp. ```APIDOC ## now() ### Description Gets the current timestamp. ### Function `cyclonedds.util.timestamp.now()` ``` -------------------------------- ### ddsls JSON Mode Output Example Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Example output from ddsls when run in JSON mode. It displays entity information, including type, event status (new/disposed), and key identifiers, in a machine-readable JSON array. ```json [ { "type": "PARTICIPANT", "event": "new", "value": [ { "key": "5dc81001-75dc-1fe3-5468-48b3000001c1" }, { "key": "764e1001-d9da-53dd-ca0b-ab06000001c1" } ] }] ``` -------------------------------- ### cyclonedds typeof Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/index.md Gets the type of a DDS topic. ```APIDOC ## cyclonedds typeof ### Description Gets the type of a DDS topic. ### Command `cyclonedds typeof ` ``` -------------------------------- ### Topic Name Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.topic.md Methods and properties to get the name of the topic. ```APIDOC ## get_name(max_size=256) ### Description Gets the name of the topic. ### Parameters * **max_size** (*int*) - Maximum size for the name string. ### Returns * **str** - The topic name. ## *property* name *: str* ### Description Get topic name. ``` -------------------------------- ### Pub/Sub Tool Help Message Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md The detailed help message outlines all available arguments and their descriptions for configuring the pubsub tool. ```console usage: pubsub [-h] [-T TOPIC] [-f FILENAME] [-eqos {all,topic,publisher,subscriber,datawriter,datareader}] [-q QOS [QOS ...]] [-r RUNTIME] [--qoshelp] optional arguments: -h, --help show this help message and exit -T TOPIC, --topic TOPIC The name of the topic to publish/subscribe to -f FILENAME, --filename FILENAME Write results to file in JSON format -eqos {all,topic,publisher,subscriber,datawriter,datareader}, --entityqos {all,topic,publisher,subscriber,datawriter,datareader} Select the entites to set the qos. Choose between all entities, topic, publisher, subscriber, datawriter and datareader. (default: all). Inapplicable qos will be ignored. -q QOS [QOS ...], --qos QOS [QOS ...] Set QoS for entities, check '--qoshelp' for available QoS and usage -r RUNTIME, --runtime RUNTIME Limit the runtime of the tool, in seconds. --qoshelp e.g.: --qos Durability.TransientLocal --qos History.KeepLast 10 --qos ReaderDataLifecycle 10, 20 --qos Partition [a, b, 123] --qos PresentationAccessScope.Instance False, True --qos DurabilityService 1000, History.KeepLast 10, 100, 10, 10 --qos Durability.TransientLocal History.KeepLast 10 Available QoS and usage are: --qos Reliability.BestEffort --qos Reliability.Reliable [max_blocking_time] --qos Durability.Volatile --qos Durability.TransientLocal --qos Durability.Transient --qos Durability.Persistent --qos History.KeepAll --qos History.KeepLast [depth] --qos ResourceLimits [max_samples], [max_instances], [max_samples_per_instance] --qos PresentationAccessScope.Instance [coherent_access], [ordered_access] --qos PresentationAccessScope.Topic [coherent_access], [ordered_access] --qos PresentationAccessScope.Group [coherent_access], [ordered_access] --qos Lifespan [lifespan] --qos Deadline [deadline] --qos LatencyBudget [budget] --qos Ownership.Shared --qos Ownership.Exclusive --qos OwnershipStrength [strength] --qos Liveliness.Automatic [lease_duration] --qos Liveliness.ManualByParticipant [lease_duration] --qos Liveliness.ManualByTopic [lease_duration] --qos TimeBasedFilter [filter_time] --qos Partition [partitions] --qos TransportPriority [priority] --qos DestinationOrder.ByReceptionTimestamp --qos DestinationOrder.BySourceTimestamp --qos WriterDataLifecycle [autodispose] --qos ReaderDataLifecycle [autopurge_nowriter_samples_delay], [autopurge_disposed_samples_delay] --qos DurabilityService [cleanup_delay], [History.KeepAll / History.KeepLast [depth]], [max_samples], [max_instances], [max_samples_per_instance] --qos IgnoreLocal.Nothing --qos IgnoreLocal.Participant --qos IgnoreLocal.Process --qos Userdata [data] --qos Groupdata [data] --qos Topicdata [data] ``` -------------------------------- ### matched_pub Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.sub.md Property to get instance handles of the data writers matching a reader. ```APIDOC ## *property* matched_pub *: List[int]* ### Description Get instance handles of the data writers matching a reader. ### Returns A list of instance handles of the matching data writers. ### Raises * [**DDSException**](cyclonedds.core.md#cyclonedds.core.DDSException) – When the number of matching writers < 0.: ### Return type List[int] ``` -------------------------------- ### Topic Type Name Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.topic.md Methods and properties to get the data type name of the topic. ```APIDOC ## get_type_name(max_size=256) ### Description Gets the data type name of the topic. ### Parameters * **max_size** (*int*) - Maximum size for the type name string. ### Returns * **str** - The topic type name. ## *property* typename *: str* ### Description Get topic type name. ``` -------------------------------- ### Convert Qos to and from Dictionary Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Illustrates converting a Qos object to a Python dictionary and vice versa using asdict() and fromdict() class methods. ```python from cyclonedds.core import Qos, Policy qos = Qos(Policy.History.KeepAll) data = qos.asdict() print(data) new_qos = Qos.fromdict(data) print(new_qos == qos) ``` -------------------------------- ### Detect Incompatible QoS Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Demonstrates how the pub/sub tool warns about incompatible QoS settings, such as Durability.TransientLocal for a data reader, which may prevent successful publishing and subscribing. ```console $ pubsub --topic hello --qos Durability.TransientLocal --entityqos datareader ``` ```console IncompatibleQosWarning: The Qos requested for subscription is incompatible with the Qos offered by publication.PubSub may not be available. ``` -------------------------------- ### Access and Compare Qos Policies Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Shows how to access individual policies within a Qos object and compare two Qos objects for equality. ```python from cyclonedds.core import Qos, Policy qos1 = Qos(Policy.Reliability.BestEffort) qos2 = Qos(Policy.Reliability.BestEffort) # Access a specific policy print(qos1[Policy.Reliability]) # Compare Qos objects print(qos1 == qos2) print(qos1 != qos2) ``` -------------------------------- ### Run ddsls with --all topic Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Use the --all option to subscribe to all built-in topics and display information about all DDS entities in the domain. This is useful for a comprehensive overview of the DDS environment. ```console $ ddsls --all ``` -------------------------------- ### Configure Topic for Pub/Sub Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Use the `--topic` option to specify the topic name for publishing or subscribing data. ```console $ pubsub --topic ``` -------------------------------- ### Run ddsls Tool Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Basic command to run the ddsls tool. Use `--help` to see all available options. ```bash $ ddsls [Options] ``` -------------------------------- ### Executable Creation and Linking Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/tests/support_modules/fuzz_tools/rand_idl/c_app/CMakeLists.txt Builds an executable from C source files and links it against the generated IDL library and the CycloneDDS DDS library. Ensure xtypes_sub.c and xtypes_dynamic_index.c are present. ```cmake add_executable(xtypes_sub xtypes_sub.c xtypes_dynamic_index.c) target_link_libraries(xtypes_sub xtypes_sub_lib CycloneDDS::ddsc) ``` -------------------------------- ### Get current timestamp in nanoseconds Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.util.md The timestamp.now() helper function returns the current time as the number of nanoseconds since the Unix Epoch, suitable for DDS time_t. ```python >>> timestamp.now() ``` -------------------------------- ### Create and Refresh Statistics Object Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Instantiate a Statistics object for a given entity and then refresh it to get the latest performance data. This is useful for monitoring DataWriter or DataReader performance. ```python >>> Statistics(datawriter) >>> Statistics(datawriter).refresh() ``` -------------------------------- ### Specify Topic for Pub/Sub Tool Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Use the --topic option to specify the topic for reading or writing data. ```console $ pubsub --topic HelloWorld ``` -------------------------------- ### Set Multiple QoS Policies Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Configure multiple QoS policies simultaneously, such as Reliability and History. Arguments for policies can be space-separated. ```console $ pubsub --topic hello --qos Reliability.BestEffort History.KeepLast 10 ``` -------------------------------- ### begin_coherent() Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Initiates coherent publishing or the access to a coherent set within a Subscriber. This operation is applicable to Publishers, Subscribers, DataWriters, and DataReaders. ```APIDOC ## begin_coherent() ### Description Begin coherent publishing or begin accessing a coherent set in a Subscriber. This can only be invoked on Publishers, Subscribers, DataWriters and DataReaders. Invoking on a DataWriter or DataReader behaves as if it was invoked on its parent Publisher or Subscriber respectively. ### Return type None ``` -------------------------------- ### Define Basic IDL Struct with Dataclasses Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md Manually define IDL structures in Python by inheriting from `cyclonedds.idl.IdlStruct` and using the `@dataclass` decorator. This example shows a simple `Point2D` struct. ```python from dataclasses import dataclass from cyclonedds.idl import IdlStruct @dataclass class Point2D(IdlStruct): x: int y: int p1 = Point2D(20, -12) p2 = Point2D(x=12, y=-20) p1.x += 5 ``` -------------------------------- ### Show topic types Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.md Displays the type(s) associated with a specific topic in your DDS system. Supports XTypes, which can have multiple compatible types per topic. Run with Python Vehicle example. ```bash cyclonedds typeof Vehicle --suppress-progress-bar --force-color-mode ``` -------------------------------- ### Write ddsls output to a file Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Use the --filename option to specify a file for JSON output. The file will contain entity information like type, status (New/Disposed), and GUID. ```console $ ddsls --topic participant --watch --filename ddsls_data.json ``` -------------------------------- ### lookup_instance Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.sub.md Looks up the instance handle for a given sample. ```APIDOC ## lookup_instance(sample) ### Parameters * **sample** ( *_*T*) ### Return type int | None ``` -------------------------------- ### ddsls Verbose Mode Command Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Enables verbose mode for ddsls, which provides complete entity information in addition to QoS change details. Use this command to get more context on QoS modifications. ```bash $ ddsls --all --watch --verbose ``` -------------------------------- ### Entity Initialization Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Details on initializing an Entity in CycloneDDS. ```APIDOC ## Entity Initialization ### __init__(ref, listener=None) Initialize an Entity. You should never need to initialize an Entity manually. * **Parameters:** * **ref** (*int*) – The reference id as returned by the DDS API. * **listener** ([*Listener*](#cyclonedds.core.Listener)) – Listener for this entity. We retain the python object to avoid it being garbage collected if the listener goes out of scope but the entity doesn’t. If we don’t the python function will be freed, causing C to call into freed memory -> segfault. * **Raises:** [**DDSException**](#cyclonedds.core.DDSException) – If an invalid reference id is passed to this function this means instantiation of some other object failed. * **Return type:** None ``` -------------------------------- ### Run Local CI Script Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Execute the `local-ci.py` script to run the test suite and linting for the project. ```bash python local-ci.py ``` -------------------------------- ### Reference Other IDL Structs/Unions Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md To use other IDL-defined classes as member types, ensure they inherit from `IdlStruct` or `IdlUnion` and contain only serializable members. This example shows a `Cloud` struct containing a sequence of `Point2D` structs. ```python from dataclasses import dataclass from cyclonedds.idl import IdlStruct from cyclonedds.idl.types import sequence @dataclass class Point2D(IdlStruct): x: int y: int @dataclass class Cloud(IdlStruct): points: sequence[Point] ``` -------------------------------- ### Inapplicable QoS Warning Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Illustrates the warning message received when a QoS policy is set that is not applicable to the selected entity. The tool ignores inapplicable policies and uses defaults. ```console InapplicableQosWarning: The Policy.Topicdata(data=b'test') is not applicable for datareader, will be ignored. ``` -------------------------------- ### Serialize and Deserialize IDL Objects Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md Classes inheriting from `IdlStruct` or `IdlUnion` automatically gain `serialize()` and `deserialize()` methods. `serialize()` returns the object as `bytes`, and `deserialize()` reconstructs the object from `bytes`. This example demonstrates serializing a `Point2D` object and then deserializing it back. ```python from dataclasses import dataclass from cyclonedds.idl import IdlStruct @dataclass class Point2D(IdlStruct): x: int y: int p = Point2D(10, 10) data = p.serialize() q = Point2D.deserialize(data) assert p == q ``` -------------------------------- ### Set WriterDataLifecycle QoS to Off Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Demonstrates setting a boolean QoS policy like WriterDataLifecycle to 'off' (equivalent to False). QoS policy names are case-insensitive. ```console --qos WriterDataLifecycle off ``` -------------------------------- ### Define a Discriminated Union Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/idl.md IDL discriminated unions require a discriminator to indicate the active case. Use the `@union` decorator, `cyclonedds.idl.types.case`, and `cyclonedds.idl.types.default`. The discriminator type is passed as an argument to the `@union` decorator. This example defines a `WalkInstruction` union with different movement types and a default jump action. ```python from enum import Enum, auto from dataclasses import dataclass from cyclonedds.idl import IdlUnion, IdlStruct from cyclonedds.idl.types import uint8, union, case, default, MaxLen class Direction(Enum): North = auto() East = auto() South = auto() West = auto() class WalkInstruction(IdlUnion, discriminator=Direction): steps_n: case[Direction.North, int] steps_e: case[Direction.East, int] steps_s: case[Direction.South, int] steps_w: case[Direction.West, int] jumps: default[int] @dataclass class TreasureMap(IdlStruct): description: str steps: sequence[WalkInstruction, 20] map = TreasureMap( description="Find my Coins, Diamonds and other Riches!\nSigned\nCaptain Corsaro", steps=[ WalkInstruction(steps_n=5), WalkInstruction(steps_e=3), WalkInstruction(jumps=1), WalkInstruction(steps_s=9) ] ) print (map.steps[0].discriminator) # You can always access the discriminator, which in this case would print 'Direction.North' ``` -------------------------------- ### InstanceState Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/index.md Represents the instance state of a sample. ```APIDOC ## InstanceState ### Description Represents the instance state of a sample. ### Enum `cyclonedds.core.InstanceState` ``` -------------------------------- ### Publishing Various Data Types Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Demonstrates publishing integers, strings, and arrays/sequences of both to the subscribed topic. The tool supports these data types for read/write operations. ```console 420 Subscribed: Integer(seq=0, keyval=420) test Subscribed: String(seq=1, keyval='test') [1, 8, 3] Subscribed: IntArray(seq=2, keyval=[1, 8, 3]) ['h','e','l','l','o'] Subscribed: StrArray(seq=3, keyval=['h', 'e', 'l', 'l', 'o']) [20] Subscribed: IntSequence(seq=4, keyval=[20]) ['test'] Subscribed: StrSequence(seq=5, keyval=['test']) ``` -------------------------------- ### Modify QoS using --qos option Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Adjust Quality of Service (QoS) settings for the pubsub tool using the `--qos` option. ```console $ pubsub --qos ``` -------------------------------- ### ViewState Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/index.md Represents the view state of a sample. ```APIDOC ## ViewState ### Description Represents the view state of a sample. ### Enum `cyclonedds.core.ViewState` ``` -------------------------------- ### sample_info class Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.internal.md Contains metadata associated with a data sample, including its state, handles, and timestamps. ```APIDOC ## class sample_info ### Description Contains metadata associated with a data sample. ### Members - **absolute_generation_rank** (Structure/Union member) - **disposed_generation_count** (Structure/Union member) - **generation_rank** (Structure/Union member) - **instance_handle** (Structure/Union member) - **instance_state** (Structure/Union member) - **no_writers_generation_count** (Structure/Union member) - **publication_handle** (Structure/Union member) - **sample_rank** (Structure/Union member) - **sample_state** (Structure/Union member) - **source_timestamp** (Structure/Union member) - **valid_data** (Structure/Union member) - **view_state** (Structure/Union member) ``` -------------------------------- ### Listener Methods Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Provides methods for resetting, copying, and merging listener configurations. ```APIDOC ## Listener Methods ### reset() Resets the listener. ### copy() Creates a copy of the listener. ### copy_to(listener) Copies the listener's configuration to another listener. ### merge(listener) Copies any configured (non-default) callbacks from the given listener to self, replacing existing callbacks already configured on this listener. ``` -------------------------------- ### Configure QoS for Specific Entities Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.pubsub.md Use the `--entityqos` option to modify QoS settings for particular entities like publishers or subscribers. ```console $ pubsub --entityqos --qos ``` -------------------------------- ### Topic Class Constructor Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.topic.md Initializes a Topic object. This represents a DDS Topic. ```APIDOC ## class cyclonedds.topic.Topic(domain_participant, topic_name, data_type, qos=None, listener=None) ### Description Representing a Topic. ### Parameters * **domain_participant** ([*cyclonedds.domain.DomainParticipant*](cyclonedds.domain.md#cyclonedds.domain.DomainParticipant)) - The DomainParticipant associated with this topic. * **topic_name** (*AnyStr*) - The name of the topic. * **data_type** (*Type* *[* *\_S* *]*) - The data type of the topic. * **qos** ([*Qos*](cyclonedds.qos.md#cyclonedds.core.Qos) *|* *None*) - Optional Quality of Service settings for the topic. * **listener** ([*Listener*](cyclonedds.core.md#cyclonedds.core.Listener) *|* *None*) - Optional listener for topic events. ``` -------------------------------- ### ddsls Help Message Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/tools.ddsls.md Displays the help message for the ddsls tool, outlining all available command-line options and their descriptions. ```bash $ ddsls --help ``` -------------------------------- ### Set OwnershipStrength QoS Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Configure the OwnershipStrength QoS policy to manage ownership when multiple writers are present. Higher strength values take precedence. ```python Policy.OwnershipStrength(strength=2) ``` -------------------------------- ### Set LatencyBudget QoS Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Configure the LatencyBudget QoS policy to define the maximum acceptable latency for samples. Use a duration object for the budget. ```python Policy.LatencyBudget(duration(seconds=2)) ``` -------------------------------- ### sample_buffer class Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.internal.md Represents a buffer for holding sample data, including its content and length. ```APIDOC ## class sample_buffer ### Description Represents a buffer for holding sample data. ### Members - **buf** (Structure/Union member) - **len** (Structure/Union member) ``` -------------------------------- ### Listener Initialization Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Initialize a Listener object, optionally providing callback functions for various DDS events. ```APIDOC ## cyclonedds.core.Listener(**kwargs) ### Description Listeners are callback containers for entities. ### Parameters * **on_data_available** (*Callable*) – Set on_data_available callback. * **on_inconsistent_topic** (*Callable*) – Set on_inconsistent_topic callback. * **on_liveliness_lost** (*Callable*) – Set on_liveliness_lost callback. * **on_liveliness_changed** (*Callable*) – Set on_liveliness_changed callback. * **on_offered_deadline_missed** (*Callable*) – Set on_offered_deadline_missed callback. * **on_offered_incompatible_qos** (*Callable*) – Set on_offered_incompatible_qos callback. * **on_data_on_readers** (*Callable*) – Set on_data_on_readers callback. * **on_sample_lost** (*Callable*) – Set on_sample_lost callback. * **on_sample_rejected** (*Callable*) – Set on_sample_rejected callback. * **on_requested_deadline_missed** (*Callable*) – Set on_requested_deadline_missed callback. * **on_requested_incompatible_qos** (*Callable*) – Set on_requested_incompatible_qos callback. * **on_publication_matched** (*Callable*) – Set on_publication_matched callback. * **on_subscription_matched** (*Callable*) – Set on_subscription_matched callback. ### Note All listener callbacks are dispatched synchronously from DDS receive thread(s). Acquiring the Python GIL from the DDS receive thread will severely hurt DDS performance. Deleting entities or writing data inside listener callbacks can lead to deadlocks. ``` -------------------------------- ### Dynamically Publish to a DDS Topic Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/README.md Use `cyclonedds publish` to create an interactive REPL for building datatypes and a writer for a topic, displaying data as it arrives. Type discovery is similar to `typeof`. ```bash cyclonedds publish ``` -------------------------------- ### Set Deadline QoS Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Use the Deadline QoS policy to specify the maximum expected time between samples. Configure it with a duration object. ```python Policy.Deadline(deadline=duration(seconds=2)) ``` -------------------------------- ### Set Partition QoS Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md The Partition QoS policy allows you to logically divide the DDS domain. Samples are only delivered to subscribers in the same partition. ```python Policy.Partition(partitions=["partition_a", "partition_b", "partition_c"]) ``` ```python Policy.Partition(partitions=[f"partition_{i}" for i in range(100)]) ``` -------------------------------- ### Generate Typesupport with idlc Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/cyclonedds/idl/_typesupport/howto.md Use the `idlc` compiler to generate Python typesupport files. Specify the output language as Python (`-l py`) and the root prefix for generated modules (`-p py-root-prefix`). ```bash idlc -l py -p py-root-prefix=cyclonedds.idl._typesupport ddsi_xt_type_object.idl ``` ```bash idlc -l py -p py-root-prefix=cyclonedds.idl._typesupport ddsi_xt_typemap.idl ``` -------------------------------- ### set_qos(qos) Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Sets Quality of Service (QoS) policies on an entity. Only specific policies can be set after creation. Unset policies remain unchanged. ```APIDOC ## set_qos(qos) ### Description Set [`Qos`](cyclonedds.qos.md#cyclonedds.core.Qos) policies on this entity. Note, only a limited number of [`Qos`](cyclonedds.qos.md#cyclonedds.core.Qos) policies can be set after the object is created ([`Policy.LatencyBudget`](cyclonedds.qos.md#cyclonedds.core.Policy.LatencyBudget) and [`Policy.OwnershipStrength`](cyclonedds.qos.md#cyclonedds.core.Policy.OwnershipStrength)). Any policies not set explicitly in the supplied [`Qos`](cyclonedds.qos.md#cyclonedds.core.Qos) remain unchanged. ### Parameters - **qos** ([*Qos*](cyclonedds.qos.md#cyclonedds.core.Qos)) – The [`Qos`](cyclonedds.qos.md#cyclonedds.core.Qos) to apply to this entity. ### Raises - [**DDSException**](#cyclonedds.core.DDSException) – If you pass an immutable policy or cause the total collection of qos policies to become inconsistent an exception will be raised. ### Return type None ``` -------------------------------- ### Set DurabilityService QoS Policy Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md Configure the DurabilityService QoS policy for persistent data storage. This policy requires several parameters including cleanup delay, history depth, and maximum sample counts. ```python Policy.DurabilityService( cleanup_delay=duration(minutes=2.5), history=Policy.History.KeepLast(20), max_samples=2000, max_instances=200, max_samples_per_instance=25 ) ``` -------------------------------- ### load_cyclonedds Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/index.md Loads the CycloneDDS library. ```APIDOC ## load_cyclonedds() ### Description Loads the CycloneDDS library. ### Function `cyclonedds.internal.load_cyclonedds()` ``` -------------------------------- ### on_offered_incompatible_qos Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.core.md Callback function invoked when a DataWriter encounters an offered incompatible QoS. It receives the DataWriter instance and the status information. ```APIDOC ## on_offered_incompatible_qos(writer, status) ### Description Callback function invoked when a DataWriter encounters an offered incompatible QoS. It receives the DataWriter instance and the status information. ### Parameters * **writer** (*cyclonedds.pub.DataWriter*) - The DataWriter instance. * **status** (*offered_incompatible_qos_status*) - The status object containing details about the incompatible QoS. ### Return type None ``` -------------------------------- ### Policy.BinaryProperty Source: https://github.com/eclipse-cyclonedds/cyclonedds-python/blob/master/docs/manual/cyclonedds.qos.md The BinaryProperty Qos Policy. Allows setting key-value binary properties. ```APIDOC ## Policy.BinaryProperty ### Description The BinaryProperty Qos Policy. Allows setting key-value binary properties. ### Parameters - **key** (str) - Required - The key for the property. - **value** (bytes) - Required - The binary value for the property. - **propagate** (bool) - Optional - Whether to propagate this property. Defaults to False. ### Request Example ```py Policy.BinaryProperty(key="host", value=b"central", propagate=True) ``` ```