From 38fc07353d217e0aba35fa5b806b8d26d6540de3 Mon Sep 17 00:00:00 2001 From: Roman Sokolkov Date: Mon, 20 Jun 2022 13:47:22 +0200 Subject: [PATCH] Add ROSIDL enum support Signed-off-by: Roman Sokolkov --- CMakeLists.txt | 1 + idl/EnumsMessage.idl | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 idl/EnumsMessage.idl diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c73383..e049b75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ set(action_files ) set(idl_files + "idl/EnumsMessage.idl" # "idl/IdlOnlyTypes.idl" ) diff --git a/idl/EnumsMessage.idl b/idl/EnumsMessage.idl new file mode 100644 index 0000000..e766eca --- /dev/null +++ b/idl/EnumsMessage.idl @@ -0,0 +1,25 @@ +module test_msgs { + module idl { + typedef SomeEnum SomeEnum__3[3]; + + module EnumsMessage_Enums { + enum SomeEnum { + ENUMERATOR1, + ENUMERATOR2 + }; + }; + + struct EnumsMessage { + SomeEnum enum_value; + + @default (value="ENUMERATOR2") + SomeEnum enum_default_value; + + SomeEnum__3 static_array_values; + + sequence bounded_array_values; + + sequence dynamic_array_values; + }; + }; +};