Hello, in chapter 19 "IviDmm Attribute Value Definitions" (page 145) most attributes have two more values like:
xxxxx Class Extension Base xxxxx Specific Extension Base
So for example for the fist attribute "Autozero" i can set the parameter to
a Autozero Off b Autozero On c Autozero Once d Autozero Class Extension Base e Autozero Specific Extension Base
What is the use of values d and e? Or what happens in the code when this is selected?
Answer by Kirk Fertitta · Apr 03 at 12:51 PM
These are used as the base numeric values for defining new enum values. Class extension groups can define new values that are only supported by instruments compliant with that extension group. Extension groups can be added to IVI specifications and this may require introducing new enum values for certain enums. The specs define the base numeric values to use for those enums.
Similarly, IVI-C specific drivers can define instrument-specific values for enums that go beyond what's defined in the spec. But, they can "attach" these enum values to IVI-defined enums, as opposed to introducing an entirely new enum for the instrument-specific values. This is a capability unique to IVI-C drivers, albeit one that, in my opinion, comes with the potential for user confusion. Compared with IVI.NET and IVI-COM, it can be more difficult to tell which functions are IVI-defined and which are instrument-specific. Allowing instrument-specific drivers to extend IVI-defined enums arguably muddies the waters more in terms of assessing which bits of code are interchangeable and which are not because now you have a situation where a IVI-defined function is being called, but one of the parameters is being passed a non-IVI-defined enum value.
But, because IVI-C doesn't have a language-level function hierarchy like IVI.NET and IVI-COM (it only has the .fp function panel and the .sub attribute file, both of which are only visible in specialized ADEs), it can be cumbersome in IVI-C to introduce new functions alongside similar-behaved functions just for the purpose of adding some additional enum values to a driver. Extending IVI-defined enums using these "extension base" values gives the driver designer another option to consider.