AttributeInfoStruct

Used by the CDM to store device-attribute information for a device (or devices) the CDM manages.

Used By:CDM

Syntax

    struct AttributeInfoStruct 
    { 
       LONG    attributeID;
       LONG    attributeType;
       LONG    attributeLength;
       BYTE    attributeName[64];
    };
    

Fields

attributeID
(IN) A 4-byte field containing a unique ID for the attribute being registered. Currently, NWPA defines the following attribute IDs:

Value

Description

0x44454D0A

Media Type

0x5241430E

Cartridge Type

0x494E5509

Unit Size

0x4F4C420A

Block Size

0x50414308

Capacity

0x4552500E

Preferred Unit Size

0x4D455209

Removable Device

0x41455209

Read Only Device

0x50415412

Tape Position Size

0x5041540F

Tape Media Size

0x50415411

Tape Write Format

0x50415410

Tape Read Format

0x4E494D12

Minimum Block Size

0x58414D12

Maximum Block Size

0x54414415

Data Compression Information

attributeType
(IN) A 4-byte field indicating the data type of the infoBuffer parameter for the get/set entry points associated with the attribute being registered through CDI_Register_Object_Attribute. The data types are defined as follows:

Value

Description

0x00000001

String

0x00000002

BYTE

0x00000003

WORD

0x00000004

LONG

0x00000005

Other

Indicates that the calling application knows what data type to expect from the target CDM.

attributeLength
(IN) A 4-byte field containing a value that indicates the byte-length of the infoBuffer input parameter to the get/set entry points associated with the attribute. These entry points are registered during CDI_Register_Object_Attribute along with the attribute.
attributeName
(IN) A 64-byte field containing a byte-length-preceded string. The string contains the ASCII codes that make up the name of the attribute being registered, and it is also NULL terminated.

Remarks

A CDM can register multiple attributes, one attribute for each call to CDI_Register_Object_Attribute. The CDM is expected to maintain an instance of this structure for each attribute it registers.

By registering device attributes with the Media Manager, the CDM can present specific information about a device's operational modes to the application layer. For example, a tape CDM can inform an application that its tape device supports multiple block sizes.

For more information about attributes, refer to the technical reference information on the CDI_Register_Object_Attribute API.

A copy of this information is passed to the Media Manager when the CDM registers an attribute by calling CDI_Register_Object_Attribute.