Failed to set data writer QOS

2 posts / 0 new
Last post
Offline
Last seen: 4 years 10 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]PRESPsService_setLocalEndpointProperty:!copyToWriterRW
[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.

m_locals.Entity_Position_Writer->get_qos(q);
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;

m_locals.Entity_Position_Writer->set_qos(q);

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
Offline
Last seen: 1 week 20 hours ago
Joined: 06/02/2010
Posts: 598

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.

Gerardo