I know you can use the dyanmic data API to set and int and those types, I am however wondering if you can use the dynamic data api to set an enum?
Hi jgr208,
I hope the attached example can help you. This example creates a struct which contains an enum with 2 types; Foo = 0; Bar = 1. Then it prints the representation of them, which is:
enum FooEnum { Foo = 0, Bar = 1};
struct OuterStruct { FooEnum enum_inside_struct; };
Angel.
I believe the question was how to use the DynamicData setters and getters to set and get the values of an enum inside a DynamicData struct.
@jgr: yes, Enum are treated as primitive long values, so use the long (32bit) setter and getter to write/read the enum values.
Hi jgr208,
I hope the attached example can help you. This example creates a struct which contains an enum with 2 types; Foo = 0; Bar = 1. Then it prints the representation of them, which is:
enum FooEnum { Foo = 0, Bar = 1};
struct OuterStruct { FooEnum enum_inside_struct; };
Angel.
I believe the question was how to use the DynamicData setters and getters to set and get the values of an enum inside a DynamicData struct.
@jgr: yes, Enum are treated as primitive long values, so use the long (32bit) setter and getter to write/read the enum values.