Changer Command (0x001C - 0x0003)

Mandatory for autochangers.This message directs the CDM to perform one of three commands associated with moving media within an autochanger: move, preload, or eject media.

Parameters

function
0x001C – changer function
parameter0
0x0003 – changer command
parameter1
Not used.
parameter2
Not used.
bufferLength
Not used.
buffer
The Media Manager fills the data according to the following format:
       LONG source 
       LONG destination 
       LONG commandType 
    
    

The fields in the buffer structure are defined as follows:

Field

Description

source

Contains the mapped location for the read/write device, storage slot, or media exchange slot from which the media will move.

destination

Contains the mapped location of the read/write device, storage slot, or media exchange slot to which the media will move.

commandType

Contains one of three values, depending on the desired operation:

  • 0x00 = changer moves the media from source to destination.
  • 0x01 = changer preload (= required for devices that execute a command before the user inserts the media) indicates to the driver that the next MESSAGE request will be a regular move command from source to destination.
  • 0x02 = changer eject moves media to the exchange slot and ejects the media.

Object

Media Manager Object ID

read/write device "0"

0x0000

read/write device "1"

0x0001

storage slot "0"

0x0002

storage slot "1"

0x0003

storage slot "2"

0x0004

storage slot "3"

0x0005

storage slot "4"

0x0006

storage slot "5"

0x0007

storage slot "6"

0x0008

storage slot "7"

0x0009

storage slot "8"

0x000A

media exchange slot "0"

0x000B

Example: Given the configuration in this table, if the Media manager called ChangerCommand and filled the buffer with the following information:

    0x000B <== source - exchange slot "0" 
    0x0001 <== destination - device "1" 
    0x0001 <== changer preload command
    

the next Media Manager command would fill the buffer with the following information:

    0x000B 
    0x0001 
    0x0000 <== changer move command
    

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 (0x0003) 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 to field the message.