Enum support

7 posts / 0 new
Last post
Offline
Last seen: 6 years 3 months ago
Joined: 10/16/2013
Posts: 3
Enum support

Are there plans in work to support dds topics/types that use enumerations?

Thank You,

Jeff Hunter

rip
rip's picture
Offline
Last seen: 18 hours 15 min ago
Joined: 04/06/2012
Posts: 322

Hi Jeff,

... um.  We already support enums.  Is there something missing from our support for them?

enum PrimitiveEnum {
    ENUM1,
    ENUM2,
    ENUM3
};
enum PrimitiveEnumValued {
    VENUM1 = 10,
    VENUM2 = 20,
    VENUM3 = 30
};

rip

Offline
Last seen: 6 years 3 months ago
Joined: 10/16/2013
Posts: 3

Hi Rip,

My question was in relation to the RTI DDS Toolkit for LabVIEW.

Appendix D of the RTI DDS Toolkit for LabVIEW Getting Started guide defines which simple and complex types that the toolkit supports. Enumerations are not listed.

I would like to use enumerations in my data model and then define a enumeration in my LabVIEW cluster and have it "just work". I don't believe that the LabVIEW Toolkit supports that (yet).

I have enums defined in my IDL data model and it's working great for my applications written using C++.

Thank You,

Jeff Hunter

rip
rip's picture
Offline
Last seen: 18 hours 15 min ago
Joined: 04/06/2012
Posts: 322

ah yah... points at self in mirror and says "you goofball"

I didn't see this was on the LabView integration forum, so mea culpa.

also, *headdesk*

We'll wait for someone from the LabView team.

One thing to think about is that enums are carried around as long (idl long, so 32bit integers), and only handled as Enum by the receiving entity's type code objects.

Probably you could hip-fake the code into thinking it is passing along an enum or an int, accordingly.  You'd need to turn off type-code checking however.  Let me think about that...

rip

 

sara's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 01/16/2013
Posts: 125

Hi Jeff,


As you commented, we don't support enums in the current version. The good news are we plan to support enums soon, likely for the next release!! Mainly because several users have already requested it :) . The new feature code is LABPLG-186. You'll know that the enum feature is available by looking for that code in the Release Notes (What's New section).

While you wait, you can change your enum in C++ for an integer (a long would work). I know it is not ideal. Sadly, Rip's solution will not work in the RTI DDS Toolkit for LabVIEW because we use the type codes internally (i.e. there's no way you can turn off the type-code checking).

All the best,

Sara

 

Offline
Last seen: 6 years 3 months ago
Joined: 10/16/2013
Posts: 3

That's great news, thank you Sara. I'll be looking for the new feature.

sara's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 01/16/2013
Posts: 125

 

Hi again,

This feature has already available in the latest release of the RTI DDS Toolkit for LabVIEW (version 1.1.0.88), compatible with RTI Connext 5.1. Take a look at the documentation (found in <LabVIEW folder>/help) for details.

You can download the new version using the VIPM.

Thanks,

Sara