IDL 4.2 · §7.4.1.4.4.6

Enum

An enum defines a distinct type with a fixed set of named enumerators. @value lets you pin explicit ordinals; the wire representation follows the XTypes rules for enum bit-bound.

Example

enum Color { RED, GREEN, BLUE };
enum Status { @value(10) OK, @value(20) FAIL };

ZeroDDS support

OMG IDL 4.2 section§7.4.1.4.4.6
Implementationidl-rust/src/enum_emit.rs
Testsparse_omg.rs
Status✓ RC3 — parsed, validated and code-generated across all target languages.

See also: IDL construct coverage · idl-4.2 audit · OMG IDL 4.2 spec