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.
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:
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.
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.
Hi
Can we change the name of the enum variable alone so that we can get SpeedRequest Speedcmd and not like SpeedRequest Enum SpeedRequest.
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
>
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
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.