c++ - What does pragma keylist keyword do? -


while reading various iot messaging protocols came across structure defined below:

enum tempscale {    celsium,    kelvin,    farenheit };  struct tempsensortype {    short id;    float temp;    float hum;    tempscale scale; }; #pragma keylist tempsensortype id 

my question is: #pragma keylist keyword , can find documentation using #pragma preprocessor directives (i believe such directive..).

thanks.

the #pragma looking @ prismtech method defining key value within omg-dds (data distribution service real-time systems) type structure. in case, defining short 'id' key value. comparable rti definition be

struct tempsensortype {     short id; //@key     float temp;     float hum;     tempscale scale; } 

for interoperability between vendors' implementations, can safely do

struct tempsensortype {     short id; //@key     float temp;     float hum;     tempscale scale; } #pragma keylist tempsensortype id 

because rti compiler ignores pragmas, , pt compiler ignores //@key.

this change future versions of specification extensible types, define standard method vendors support.

note if looking @ generic list of iot messaging protocols, concept of "key" value may not exist in other messaging protocols looking at.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -