User Tools

Site Tools


ddsf:public:guidebook:06_append:glossary:d:data_writer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ddsf:public:guidebook:06_append:glossary:d:data_writer [2019/05/12 21:15]
admin ↷ Page moved from ddsf:public:resources:glossary:d:data_writer to ddsf:public:resources:appendix:glossary:d:data_writer
ddsf:public:guidebook:06_append:glossary:d:data_writer [2021/07/14 16:37] (current)
murphy ↷ Links adapted because of a move operation
Line 1: Line 1:
 ==== Data Writer ==== ==== Data Writer ====
-DataWriter objects are responsible for sending type-specific data to one or more DataReaders.+[[ddsf:​public:​guidebook:​06_append:​glossary:​start| Return ​to Glossary ]]
  
-A DataWriter is created with Topic, which gives a name to the data stream ​and associates the DataWriter with a data type.  A DataWriter sends data to one or more DataReaders if the DataWriter and DataReader(s):​+An [[ddsf:​public:​guidebook:​06_append:​glossary:​e:​entity|entity]] attached to [[ddsf:​public:​guidebook:​06_append:​glossary:​p:​publisher|Publisher]] bound to publish samples from only  
 +one [[ddsf:​public:​guidebook:​06_append:​glossary:​t:​topic|Topic]] ​and therefore exactly one data type, providing type-safe  
 +operations ​to write/send data. The Topic must be created before ​the  
 +Data Writer.
  
-  * have Topics with the same name +Source: [[https://​istkb.adlinktech.com/​article/​vortex-opensplice-dds-glossary/​ | OpenSplice Glossary]]
-  * have data types that are assignable to each other (not necessarily identical) +
-  * are within the same domain +
-  * have compatible QoS +
-  * can be discovered and communicate with each other over one or more transports+
  
-The behavior of a DataWriter is controlled by QoS.  For example, a DataWriter can be made reliable by configuring its RELIABILITY QoS.  A DataWriter provides asynchronous notifications in the form of Status Changes. 
- 
-There are two types of objects that can be referred to as DataWriters: ​ DDS DataWriter objects and type-specific DataWriter objects (usually called FooDataWriter to indicate a user data type “Foo”). 
- 
-The DDS::​DataWriter object is used for actions that are not specific to a single data type, such as configuring QoS or installing listeners. ​ The type-specific FooDataWriter object is used for actions that involve the specific data type, such as writing data or unregistering/​disposing of an instance. 
- 
-For example, when writing data, you must use a type-specific DataWriter, rather than the generic DataWriter class: 
- 
-<Code C linenums:1 | Example of using a DDS DataWriter>​ 
-// Create the DDS::​DataWriter. ​ This object can be used for configuring QoS, 
-// asserting liveliness, or other non-type specific actions. 
-DDS::​DataWriter *ddsWriter ​ 
-  = publisher->​create_datawriter 
-      ( medicalDataTopic, ​ 
-        qos,  
-        listener, 
-        DDS_STATUS_MASK_ALL 
-      );  
-// Create the type-specific DataWriter. ​ This object can be used for writing data, 
-// disposing a data-instance,​ or other actions that are specific to a data type  
-MedicalDeviceDataWriter *medicalDataWriter ​ 
-  = MedicalDeviceDataWriter::​narrow(ddsWriter); ​ 
-medicalDataWriter->​write(deviceData,​ ...); 
-</​Code>​ 
ddsf/public/guidebook/06_append/glossary/d/data_writer.1557710157.txt.gz · Last modified: 2019/05/12 21:15 by admin