Prev: inspect enumerations
Next: Image fusion using PCA
From: Robert on 11 Aug 2010 15:10 I use enumerated data types in simulink. Now I have to export block interfaces and where an enumerated signal is involved I have to place a respective data type definition in the export. But while ordinary class definitions may be inspected using the meta class operator or properties/methods/fields, these techniques yield virtually nothing on enumerations. I see no way besides determining the class definition file used with "which" and parsing the classdef syntax myself. >>>>>Some sample code: class definition: classdef(Enumeration) ENUMTriplets < Simulink.IntEnumType enumeration Huey (0) Dewey (1) Louie (2) end methods (Static = true) function retVal = getDefaultValue() retVal = ENUMTriplets.Dewey; end end end >>>>>code thats NOT working: mc = ?ENUMTriplets >>>>>yields mc = meta.class handle Package: meta Properties: Name: 'ENUMTriplets' Description: '' DetailedDescription: '' Hidden: 0 Sealed: 0 ConstructOnLoad: 0 InferiorClasses: {0x1 cell} Properties: {0x1 cell} Methods: {125x1 cell} Events: {0x1 cell} SuperClasses: {[1x1 meta.class]} ContainingPackage: {} Methods, Events, Superclasses >>>> where "Methods" comprises a bunch of operations defined for integer data types, but not the enumerated names. Any ideas?? TIA, Robert
|
Pages: 1 Prev: inspect enumerations Next: Image fusion using PCA |