Dynamic Attribute of type Enum
|
|
---|---|
Hi, I'm exploring the concept of Dynamic Attribute. I'm able to successfully create and use attributes dynamically of type Double, Float, String, etc. But if I try to dynamically create an attribute of type "DevEnum" I get following error: I know that the TANGO 9 is not yet officially released and the Enum datatype is a feature of TANGO 9. I just want to know if the error is because of the incorrect code or the feature of Dynamic Attribute with Enum Datatype is not yet implemented. I have attached the device server code. I'm using the JTango-9.0.3 jar file. I generate the code using the Pogo-9.1.2a which has the feature of using Enumeration as TANGO Deta types. |
|
|
---|---|
Hello, The enum attribute is implemented in Java. You can either use it with: - a Java enum. Example:
- or with a dynamic attribute. In this case, the value returned in getValue must be a short (and not an enum as in your code). It allows to have a configurable list of enum values with the attribute property "enum_labels". Example:
Best Regards, Gwenaëlle. |