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.
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.
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: |
|
|
|
|
|
|
|
|
The following are the bus resources types for regular attributes: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For non-regular attributes, the following attribute types are defined:
|
|
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:
|
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:
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. |