userData QosPolicy constraint

4 posts / 0 new
Last post
Offline
Last seen: 1 year 3 months ago
Joined: 03/13/2022
Posts: 11
userData QosPolicy constraint

Hi

We want to define the idl with the user data (@copy). but meet to the userData constraint, that say the total of userData character into the IDL can not be more than 255 character.

How can set the "DDS_DomainParticipantQos.resource_limits.reader_user_data_max_length" ?

In the following example we get the corresponding error (the total of character can not be more than 255 character)

   module IDL_Example
    	{
            struct payload
            {
                float start;                        //@copy(//Example:2::0:Expert)
                float stop;                        //@copy(//Example:2::0:Expert)
                float step;                       //@copy(//Example:2::0:Expert)
                string paramName;                       //@copy(//Example:2::0:Expert)
                string paramPolicy;                     //@copy(//Example:2::0:Expert)
                float minAverage;                    //@copy(//Example:2::0:Expert)
                float maxAverage;                 //@copy(//Example:3::0:Expert)
                float sum;                //@copy(//Example:3::0:Expert)
                string message;                //@copy(//Example:3::0:Expert)
                unsigned long id;                //@copy(//Example:1::1:Expert) 
            };
    	};

Is there a way to set the constraint value or not?

please help our

thanks

Howard's picture
Offline
Last seen: 5 days 6 hours ago
Joined: 11/29/2012
Posts: 567

Sorry, am a bit confused.  The //@copy that you show just copies a comment, "//Example:...", into the generated code in various places.

How is this related to userData?  Which I assume you're referring to the USER_DATA QoS Policy?

For what programming language are you generating the code, C++11?

If you need to change the maximum length for UserData that can be accepted for a DataReader, you just need to change the value of the QoS that you have already found:

DDS_DomainParticipantQos.resource_limits.reader_user_data_max_length

However, if you do so, you will need to do this for all DomainParticipants in your system (across all applications).

 

Offline
Last seen: 1 year 3 months ago
Joined: 03/13/2022
Posts: 11

Hi my friend

I don't found the DDS_DomainParticipantQos.resource_limits.reader_user_data_max_length.

How can I set the this parameter for single application or all application?

Thank you

Howard's picture
Offline
Last seen: 5 days 6 hours ago
Joined: 11/29/2012
Posts: 567

You need to learn about settng parameters in a QOS object and then using that object to create a DDS Entity...such as DomainParticipant.

Please see Chapter 19 of the Connext Users Manual: https://community.rti.com/static/documentation/connext-dds/6.1.1/doc/manuals/connext_dds_professional/users_manual/index.htm#users_manual/XMLConfiguration.htm

I suggest that perhaps taking a basic course in using the Connext DDS API will be useful.

QoS must be set for each DomainParticipant that is created.  There is no such thing as a global setting for all participants in all applications.  However, if you define and distribute a QoS Profile as described in Chapter 19 above, it will be easier for a system to have use a consistent set of QoS values when creating DDS Entities.