Failed to set data writer QOS

2 posts / 0 new
Last post
Last seen: 4 years 2 months ago
Joined: 06/04/2015
Posts: 6
Failed to set data writer QOS

I get the following errors when trying to change the batch settings:

[D0300|Writer(80002002)|SET_QOS]DDS_DataWriter_set_qos:ERROR: Failed to set writer QoS

It runs without errors until I add the (3) commented out lines.

q.deadline.period = DDS_Duration_t::from_millis(100);
//DDS_Duration_t res = {0, 0};
//q.batch.enable = true;
//q.batch.source_timestamp_resolution = res;


What is causing these errors? It looks like batch is already enabled by default, so it looks like it has to do with the timestamp resolution. 

Gerardo Pardo's picture
Last seen: 2 weeks 5 days ago
Joined: 06/02/2010
Posts: 596

Hello Dave,

This is because the BATCH policy is immutable. It cannot be changed after the DataWriter is enabled. If you look at the documentation for the BatchQosPolicy you will see that "changeable" is specied to be UNTIL_ENABLE which means precisely this.