node-opendds icon indicating copy to clipboard operation
node-opendds copied to clipboard

Setting DataWriter representation

Open sanderkukk opened this issue 4 years ago • 1 comments

What is the correct format or is it possible to set the DataWriter representation? In OpenDDS 3.16 the default was set to "DDS::XCDR2_DATA_REPRESENTATION" Is it possible to set it to "DDS::XCDR_DATA_REPRESENTATION" through create_datawriter QoS?

I tried to set: { ...qualityOfService, representation: { value: "DDS::XCDR_DATA_REPRESENTATION" } }

and it seems it is an array :

{ ...qualityOfService, representation: { value: ["DDS::XCDR_DATA_REPRESENTATION", "DDS::XCDR2_DATA_REPRESENTATION"] } }

but this does not seem to set because in the debug logs I still get : dds_demarshal: Deserializing with encoding kind XCDR2.

Any pointers?

sanderkukk avatar Nov 21 '22 10:11 sanderkukk

The type of the "representation" QoS is an array. This type is used for both the reader and the writer. When it's used as part of the writer's QoS the array must have exactly one value in it. That value determines how the writer encodes its data.

mitza-oci avatar Nov 21 '22 14:11 mitza-oci