Enum read inside a cluster in RTI DDS

6 posts / 0 new
Last post
Offline
Last seen: 2 years 2 months ago
Joined: 01/06/2022
Posts: 3
Enum read inside a cluster in RTI DDS

Hi

How we can frame this enum SpeedRequest Speedcmd using Labview to avoid data mismatch;

 

       

Organization:
Keywords:
Ismael Mendez's picture
Offline
Last seen: 4 weeks 5 hours ago
Joined: 07/03/2017
Posts: 74

Hi Saarthak,

You can use a LabVIEW Enum or Ring control (Ring only available on toolkit version 3.1.1.111 and newer) to frame it. You must use I32 representation and disable the option "Allow undefined values at runtime". Keep in mind that DDS Toolkit will add the suffix "Enum" to the enum name in the Data Type. So if your type is MyEnum as seen above, the resulting name in the Data Type will be MyEnumEnum. Depending on your QoS this might affect matching.

You can see more information about how to use enums in the RTI Connext DDS Toolkit Getting Started Guide. You can find it in LabVIEW at Help->RTI DDS Toolkit->Open Getting Started Guide. 

Offline
Last seen: 2 years 2 months ago
Joined: 01/06/2022
Posts: 3

Hi

 Can we change the name of the enum variable alone so that we can get SpeedRequest Speedcmd and not like SpeedRequest Enum SpeedRequest.

Ismael Mendez's picture
Offline
Last seen: 4 weeks 5 hours ago
Joined: 07/03/2017
Posts: 74

Hi 

The toolkit adds the postfix "Enum" automatically and cannot be changed. If this is is preventing you from matching with other peers you can avoid sending the TypeObject by configuring it in the QoS:

<participant_qos>
    <resource_limits>
        <type_object_max_serialized_length>0</type_object_max_serialized_length>
    </resource_limits>
</participant_qos>
Offline
Last seen: 2 years 2 months ago
Joined: 01/06/2022
Posts: 3

Hi

  with labview can we generate an enum like mentioned below

Speedrequest Speedcmd

Hope you note the difference in the enum naming

When we tried it with labview we get Speedrequestenum Speedrequest.

Kindly Suggest

Ismael Mendez's picture
Offline
Last seen: 4 weeks 5 hours ago
Joined: 07/03/2017
Posts: 74

Hi Saarthak,

As mentioned above the "enum" suffix is added automatically by the LabVIEW toolkit in enums. The reason for that is that every member of the DataType must have a type name and a member name like "int myNumber". But in LabVIEW there is only one name. So the toolkit generates the typename using the member name + "enum" suffix. It cannot be changed. As I said in my previous comment if this causes a problem with the matching you can set the QoS to avoid sending the type object. This way the member names won't be considered for matching.