Jump to content

Enumerated Types with Ring type numbering


Recommended Posts

Rings are interesting because they give two very nice added functionalities over an enum.

  1. They allow any number to be assigned to an element
  2. They allow run-time editing of list items

The problem with rings is that their base type includes only the numeric. Using rings in your code requires you to have a front panel control and use the Properties node to get the string info. DAQmx uses rings and to play with the strings requires some interesting workarounds...

It would be nice to have a different type that allows the strings to be bundled into the type, like an enum, yet allow any number to be assigned. Run-time editing would be gone, but if you need run time editing then you definitely have a FP object so you would use a ring.

This would require some interesting type descriptor to allow for 'unassigned' numbers :( I don't know if this completely precludes the possibility, though.

David

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.