OpenSplice C# API  v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
DDS.ShareQosPolicy Struct Reference

This QosPolicy allows sharing of entities by multiple processes or threads. More...

Collaboration diagram for DDS.ShareQosPolicy:
Collaboration graph

Public Attributes

bool Enable
 
string Name
 

Detailed Description

This QosPolicy allows sharing of entities by multiple processes or threads.

Note
Proprietary QoS Policy to share a DataReader between multiple processes.

When the policy is enabled, the data distribution service will try to look up an existing entity that matches the name supplied in the Share QosPolicy. A new entity will only be created if a shared entity registered under the specified name doesn’t exist yet.

Shared Readers can be useful for implementing algorithms like the worker pattern, where a single shared reader can contain samples representing different tasks that may be processed in parallel by separate processes. In this algorithm each processes consumes the task it is going to perform (i.e. it takes the sample representing that task), thus preventing other processes from consuming and therefore performing the same task.

Entities can only be shared between processes if OpenSplice is running in federated mode, because it requires shared memory to communicate between the different processes.

By default, the Share QosPolicy is not used and enable is false. Name must be set to a valid string for the Share QosPolicy to be valid when enable is set to true. This QosPolicy is applicable to DataReader and Subscriber entities, and cannot be modified after the DataReader or Subscriber is enabled. Note that a DataReader can only be shared if its Subscriber is also shared.

Definition at line 1425 of file DdsDcpsStructs.cs.

Member Data Documentation

◆ Enable

bool DDS.ShareQosPolicy.Enable

Definition at line 1428 of file DdsDcpsStructs.cs.

◆ Name

string DDS.ShareQosPolicy.Name

Definition at line 1427 of file DdsDcpsStructs.cs.


The documentation for this struct was generated from the following file: