Previous Menu Next
Defining Variable Type Attributes

Alternative attribute definitions can be specified with choice. In the example, an event definition exampleEvent could contain either a severity or a name attribute. A decision is made at runtime over which definition is to be used.

When encoding such an attribute, each definition is attempted, in order, until encoding is successful.

In the example, an event containing the attribute data "Reboot" would fail decoding as type integer, but pass as type string. Therefore the data would be decoded as attribute attrib2. Similarly, the data "Reboot" would be encoded as a string, rather than an integer.

MDL Example