Predefined Attribute (PdAt) Object Class

Description

The Predefined Attribute (PdAt) object class contains an entry for each existing attribute for each device represented in the Predefined Devices (PdDv) object class. An attribute, in this sense, is any device-dependent information not represented in the PdDv object class. This includes information such as interrupt levels, bus I/O address ranges, baud rates, parity settings, block sizes, and microcode file names.

Each object in this object class represents a particular attribute belonging to a particular device class-subclass-type. Each object contains the attribute name, default value, list or range of all possible values, width, flags, and an NLS description. The flags provide further information to describe an attribute.

Note: For a device being defined or configured, only the attributes that take a nondefault value are copied into the Customized Attribute (CuAt) object class. In other words, for a device being customized, if its attribute value is the default value in the PdDv object class, then there will not be an entry for the attribute in the CuAt object class.

Types of Attributes

There are three types of attributes. Most are regular attributes, which typically describe a specific attribute of a device. The group attribute type provides a grouping of regular attributes. The shared attribute type identifies devices that must all share a given attribute.

A shared attribute identifies another regular attribute as one that must be shared. This attribute is always a bus resource. Other regular attributes (for example, bus interrupt levels) can be shared by devices but are not themselves shared attributes. Shared attributes require that relevant devices have the same values for this attribute. The Attribute Value descriptor for the shared attribute gives the name of the regular attribute that must be shared.

A group attribute specifies a set of other attributes whose values are chosen as the group, as well as the group attribute number used to choose default values. Each attribute listed within a group has an associated list of possible values it can take. These values must be represented as a list, not as a range. For each attribute within the group, the list of possible values must also have the same number of choices. For example, if the possible number of values is n, the group attribute number itself can range from 0 to n-1. The particular value chosen for the group indicates the value to pick for each of the attributes in the group. For example, if the group attribute number is 0, then the value for each of the attributes in the group is the first value from their respective lists.

Predefined Attribute Object Class Descriptors

The Predefined Attribute object class contains the following descriptors:

ODM Type Descriptor Name Description Descriptor Status
ODM_CHAR uniquetype[UNIQUESIZE] Unique Type Required
ODM_CHAR attribute[ATTRNAMESIZE] Attribute Name Required
ODM_VCHAR deflt[DEFAULTSIZE] Default Value Required
ODM_VCHAR values[ATTRVALSIZE] Attribute Values Required
ODM_CHAR width[WIDTHSIZE] Width Optional
ODM_CHAR type[FLAGSIZE] Attribute Type Flags Required
ODM_CHAR generic[FLAGSIZE] Generic Attribute Flags Optional
ODM_CHAR rep[FLAGSIZE] Attribute Representation Flags Required
ODM_SHORT nls_index NLS index Optional

These descriptors are described as follows:

Descriptor Description
Unique Type Identifies the class-subclass-type name of the device to which this attribute is associated. This descriptor is the same as the Unique Type descriptor in the PdDv object class.
Attribute Name Identifies the name of the device attribute. This is the name that can be passed to the mkdev and chdev configuration commands and device methods in the attribute-name and attribute-value pairs.
Default Value If there are several choices or even if there is only one choice for the attribute value, the default is the value to which the attribute is normally set. For groups, the default value is the group attribute number. For example, if the possible number of choices in a group is n, the group attribute number is a number between 0 and n-1. For shared attributes, the default value is set to a null string.

When a device is defined in the system, attributes that take nondefault values are found in the CuAt object class. Attributes that take the default value are found in this object class; these attributes are not copied over to the CuAt object class. Therefore, both attribute object classes must be queried to get a complete set of customized attributes for a particular device.

Attribute Values Identifies the possible values that can be associated with the attribute name. The format of the value is determined by the attribute representation flags. For regular attributes, the possible values can be represented as a string, hexadecimal, octal, or decimal. In addition, they can be represented as either a range or an enumerated list. If there is only one possible value, then the value can be represented either as a single value or as an enumerated list with one entry. The latter is recommended, since the use of enumerated lists allows the attrval subroutine to check that a given value is in fact a possible choice.

If the value is hexadecimal, it is prefixed with the 0x notation. If the value is octal, the value is prefixed with a leading zero. If the value is decimal, its value is represented by its significant digits. If the value is a string, the string itself should not have embedded commas, since commas are used to separate items in an enumerated list.

A range is represented as a triplet of values: lowerlimit, upperlimit, and increment value. The lowerlimit variable indicates the value of the first possible choice. The upperlimit variable indicates the value of the last possible choice. The lowerlimit and upperlimit values are separated by a - (hyphen). Values between the lowerlimit and upperlimit values are obtained by adding multiples of the increment value variable to the lowerlimit variable. The upperlimit and increment value variables are separated by a comma.

Only numeric values are used for ranges. Also, discontinuous ranges (for example, 1-3, 6-8) are disallowed. A combination of list and ranges is not allowed.

An enumerated list contains values that are comma-separated.

If the attribute is a group, the Possible Values descriptor contains a list of attributes composing the group, separated by commas.

If the attribute is shared, the Possible Values descriptor contains the name of the bus resource regular attribute that must be shared with another device.

For type T attributes, the Possible Values descriptor contains the message numbers in a comma-separated list.

Width If the attribute is a regular attribute of type M for a bus memory address or of type O for a bus I/O address, the Width descriptor can be used to identify the amount in bytes of the bus memory or bus I/O space that must be allocated. Alternatively, the Width field can be set to a null string, which indicates that the amount of bus memory or bus I/O space is specified by a width attribute, that is, an attribute of type W.

If the attribute is a regular attribute of type W, the Width descriptor contains the name of the bus memory address or bus I/O address attribute to which this attribute corresponds. The use of a type W attribute allows the amount of bus memory or bus I/O space to be configurable, whereas if the amount is specified in the bus memory address or bus I/O address attribute's Width descriptor, it is fixed at that value and cannot be customized.

For all other attributes, a null string is used to fill in this field.

Attribute Type Identifies the attribute type. Only one attribute type must be specified. The characters A, B, M, I, N, O, P, and W represent bus resources that are regular attributes.

For regular attributes that are not bus resources, the following attribute types are defined:

 
L
Indicates the microcode file base name and the text from the label on the diskette containing the microcode file. Only device's with downloadable microcode have attributes of this type. The L attribute type is used by the chkmcode program to determine whether a device which is present has any version of its microcode installed. If none is installed, the user is prompted to insert the microcode diskette with the label identified by this attribute. The base name is stored in the Default Value field and is the portion of the microcode file name not consisting of the level and version numbers. The label text is stored in the Possible Values field.
 
T
Indicates message numbers corresponding to possible text descriptions of the device. These message numbers are within the catalog and set identified in the device's PdDv object.

A single PdDv object can represent many device types. Normally, the message number in a device's PdDv object also identifies its text description. However, there are cases where a single PdDv object represents different device types. This happens when the parent device which detects them cannot distinguish between the types. For example, a single PdDv object is used for both the 120MB and 160MB Direct Attached Disk drives. For these devices, unique device descriptions can be assigned by setting the message number in the device's PdDv object to 0 and having a T attribute type, indicating the set of possible message numbers. The device's configure method determines the actual device type and creates a corresponding CuAt object indicating the message number of the correct text description.

 
R
Indicates any other regular attribute that is not a bus resource.
 
Z
If the attribute name is led, than this indicates the LED number for the device. Normally, the LED number for a device is specified in the device's PdDv object. However, in cases where the PdDv object may be used to respresent multiple device types, unique LED numbers can be assigned to each device type by having a type Z attribute with an attribute name of led. In this case, the LED number in the PdDv object is set to 0. The device's configure method determines the actual LED number for the device, possibly by obtaining the value from the device, and creates a corresponding CuAt object indicating the LED number. The default value specified in the type Z PdAt object with the attribute name of led is the LED number to be used until the device's configure method has determined the LED number for the device.
 

The following are the bus resources types for regular attributes:

 
A
Indicates DMA arbitration level.
 
B
Indicates a bus memory address which is not associated with DMA transfers.
 
M
Indicates a bus memory address to be used for DMA transfers.
 
I
Indicates bus interrupt level that can be shared with another device.
 
N
Indicates a bus interrupt level that cannot be shared with another device.
 
O
Indicates bus I/O address.
 
P
Indicates priority class.
 
W
Indicates an amount in bytes of bus memory or bus I/O space.
 

For non-regular attributes, the following attribute types are defined:

G
Indicates a group.
S
Indicates a shared attribute.
Generic Attribute Flags Identifies the flags that can apply to any regular attribute. Any combination (one, both, or none) of these flags is valid. This descriptor should be a null string for group and shared attributes. This descriptor is always set to a null string for type T attributes.

These are the defined generic attribute flags:

D
Indicates a displayable attribute. The lsattr command displays only attributes with this flag.
U
Indicates an attribute whose value can be set by the user.
Attribute Representation Flags Indicates the representation of the regular attribute values. For group and shared attributes, which have no associated attribute representation, this descriptor is set to a null string. Either the n or s flag, both of which indicate value representation, must be specified.

The r, l, and m flags indicate, respectively, a range, an enumerated list, and a multi-select value list, and are optional. If neither the r flag nor the l flag is specified, the attrval subroutine will not verify that the value falls within the range or the list.

These are the defined attribute representation flags:

n
Indicates that the attribute value is numeric: either decimal, hex, or octal.
s
Indicates that the attribute value is a character string.
r
Indicates that the attribute value is a range of the form: lowerlimit-upperlimit,increment value.
l
Indicates that the attribute value is an enumerated list of values.
m
Indicates that multiple values can be assigned to this attribute. Multiple values for an attribute are represented as a comma separated list.
b
Indicates that value is a boolean type, and can only have 2 values. Typical values are yes,no, true,false, on,off, disable,enable or 0,1.
d
Indicates that the default value for the attribute has been altered by the chdef command.

The attribute representation flags are always set to nl (numeric list) for type T attributes.

NLS Index Identifies the message number in the NLS message catalog of the message containing a textual description of the attribute. Only displayable attributes, as identified by the Generic Attribute Flags descriptor, need an NLS message. If the attribute is not displayable, the NLS index can be set to a value of 0. The catalog file name and the set number associated with the message number are stored in the PdDv object class.