E1.20 RDM (Remote Device Management) Protocol Forums

E1.20 RDM (Remote Device Management) Protocol Forums (http://www.rdmprotocol.org/forums/index.php)
-   RDM General Implementation Discussion (http://www.rdmprotocol.org/forums/forumdisplay.php?f=4)
-   -   New C++-oriented `rdmconst.h` header (http://www.rdmprotocol.org/forums/showthread.php?t=1297)

shawn July 20th, 2019 09:20 AM

New C++-oriented `rdmconst.h` header
1 Attachment(s)
I recreated the intent of `rdm.h` into a new, more C++-oriented, `rdmconst.h` file. Notes about the file:
  1. Uses `constexpr` instead of `#define`s.
  2. Fixes some spelling mistakes from the standard by introducing new constants, but keeping the old constants and tagging them with `[[deprecated("spelling")]]`.
  3. Puts everything into an `rdm` namespace.

Feel free to make comments and suggestions. Consider this a beta version.

The file is attached.

shawn July 20th, 2019 01:32 PM

1 Attachment(s)
I've updated to a new version with more constants from E1.37-7. This one is `rdmconst-beta2.h`.

bootress January 16th, 2020 10:59 AM

I'm replying to this way late since Scott reminded me about the forums last night, but I love this!!

One thing to note - using the [[deprecated]] attribute makes this usable in a minimum C++14 environment. We do encounter older toolchains than that, especially in the RDM world, so it might be worth adding that fact as a comment.

All times are GMT -6. The time now is 09:48 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.