Return Changer Media Mapping (0x001C - 0x0002)

Directs the CDM to return a structure that contains the media mapping for the read/write devices, storage slots, and exchange slots for an autochanger.

Parameters

function
0x001C – changer function
parameter0
0x0002 – return changer media mapping
parameter1
Not used.
parameter2
Not used.
bufferLength
Not used. The length of this buffer is calculated by Media Manager based on the information returned in the changer portion of the UpdateInfoStruct structure.
buffer
Pointer to the buffer where the requested data is to be returned. The CDM fills in the data according to the following format:
    BYTE Device0; //status of read/write device #0 (1=Full 0=Empty)
    BYTE Device1; //status of the read/write device #1 (1=Full 0=Empty)
    . 
    . 
    BYTE StorageSlot0; //status of storage slot #0 (1=Full 0=Empty)
    BYTE StorageSlot1; //status of storage slot #1 (1=Full 0=Empty)
    . 
    . 
    BYTE ExchangeSlot0; //status of exchange slot #0 (1=Full 0=Empty)
    BYTE ExchangeSlot1; //status of exchange slot #1 (1=Full 0=Empty)
    . 
    . 
    

The buffer is a byte table for all Read/Write devices, Storage Slots, and Media Exchange Slots configured as objects of the Autochanger. It is critical that the table be in the order shown above. The value assigned each byte indicates that the corresponding object contains media or is empty (1=Full 0=Empty).

For example, if the numberOfDevices returned in UpdateInfoStruct = 2 and numberOfSlots returned in UpdateInfoStruct = 9 and numberOfExchangeSlots returned in UpdateInfoStruct = 1, then the buffer might appear as follows (the actual representation depends on whether each slot has media):

Buffer Entry

Object

Status

Corresponding Media Manager

01h

read/write device "0"

has media

0x0000

00h

read/write device "1"

is empty

0x0001

01h

storage slot "0"

is empty

0x0002

00h

storage slot "1"

is empty

0x0003

00h

storage slot "2"

is empty

0x0004

01h

storage slot "3"

has media

0x0005

01h

storage slot "4"

has media

0x0006

01h

storage slot "5"

has media

0x0007

00h

storage slot "6"

is empty

0x0008

01h

storage slot "7"

has media

0x0009

01h

storage slot "8"

has media

0x000A

00h

media exchange slot "0"

is empty

0x000B

Remarks

This is a Media Manager control function (packaged in a CDMMessageStruct) that has 0x001C as the value in its function field to identify that it is a function in the changer category. The value in parameter0 acts as a subfunction index (0x0002) to identify what function to perform. The CDM can either implement a secondary jump table using the value in parameter0 as an index, or use a switch statement on parameter0 to call its routine that will field the message.