-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding dynamic data enum example #640
base: master
Are you sure you want to change the base?
Conversation
The compilation is starting. Take a look here. |
The compilation is starting. Take a look here. |
Everything is OK. Thank you for the PR! |
1 similar comment
Everything is OK. Thank you for the PR! |
The compilation is starting. Take a look here. |
The compilation is starting. Take a look here. |
Everything is OK. Thank you for the PR! |
1 similar comment
Everything is OK. Thank you for the PR! |
This looks like a really granular and small example. I don't think it makes sense to create a brand new example instead of adding the relevant code to the documentation, the KB, or incorporating it into an existing example. |
{ EnumMember("off", 0), EnumMember("on", 42) }); | ||
} | ||
|
||
DynamicType create_struct_dynamic_type() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be simplified:
{
return StructType("EnumStruct", { {"engine_state_element", create_enum_type() } });
}
{ EnumMember("off", 0), EnumMember("on", 42) }); | ||
} | ||
|
||
DynamicType create_struct_dynamic_type() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DynamicType create_struct_dynamic_type() | |
StructType create_struct_dynamic_type() |
Summary
This PR adds an example that shows how to use DynamicData Enums and get their member ordinal values by name (string).
Checks
examples/connext_dds/CMakeList.txt
accordingly.