3.2 Attribute Class

The Attribute Class maintains all attribute objects. Attributes are used to describe a specific feature of an IO object. For example, all IO objects have a name, and IO objects can have capacity. The name, and possibly the capacity, are attributes of an IO object. An attribute object knows how to communicate with an IO object to get, and possibly set, a specified attribute.

This section covers the following topics:

The following figure illustrates the relationship between an IO object and an attribute object.

Figure 3-1 Attribute objects

Notice that although there are two device objects, there are not two name attribute objects, nor two capacity attribute objects. The name-attribute object can extract the name from any IO object in the Media Manager database. Likewise, the capacity-attribute object can extract the capacity from any IO object in Media Manager.

3.2.1 Attribute Types

See Attribute Types.

Generic Attributes

Generic attributes provide access to those attributes that are common to all IO objects and are not associated with a particular object.

Type Attributes

Type attributes are assigned to an object-manager object and know how to get/set attributes of IO objects that are of a particular type (mirror, partition, device, etc.). For example, the mirror-count attribute is a type attribute because it applies only to a specific type of IO object.

Specific Attributes

Specific attributes are those attributes that are associated with a specific IO object. For example, a RAID device could have a configuration feature which could be represented by an attribute that would apply only to the RAID device object.

3.2.2 Attribute Registration

The registration of attributes is typically performed by classes and is currently beyond the scope of this document.

There are a number of default attributes registered with the Media Manager. See Attribute IDs and Attribute Names.

3.2.3 Attribute Generic Information

An attribute's generic information can be obtained by calling MM_ReturnObjectGenericInfo. The AttributeGenericInfoDef structure is returned for the Attribute OBID.