4.7 Changer Support

AutoChanger support has also been added to NetWare 4.x platforms. NWPA creates an object for the autochanger and has device, media, and slot objects associated with the autochanger. To NWPA, the concept of a autochanger is a non-static set of media or magazines (media can be changed via the mailbox) associated with one or more devices, and also a mailslot where new media can be added or taken out of the changer.

NWPA support of an autochanger is very similar to the earlier NetWare 4.0 support provided through the DDFS. The CDM messages that are specific to an autochanger are:

Along with the above CDM messages, magazine CDM messages may also be supported. Novell treats changers as changers full of magazines because most changers contain double-sided media. This paradigm requires the changer to emulate magazine behavior. This can be done by registering an Enhancer CDM as part of the changer CDM. This Enhancer CDM binds to the devices associated with the changer. It is the responsibility of the CDM to figure out which devices belong to the changer. SCSI provides for the changer to give Target ID's of the devices associated with it. The Enhancer part of the changer CDM can then intercept magazine control functions bound for the device and have them executed by the changer.

Changer Bindings

In the CDM inquiry, the CDM needs to bind to the changer, and most of the information that needs to be filled out in the ChangerInfo section of UpdateInfoStruct will be available. The fields that should be filled in at binding time are:

controlMask
The changer functions above.
numberOfSlots
Slots in changer.
numberOfExchangeSlots
Number of exchange slots (mailboxes).
numberOfDevices
Number of devices in the changer.
deviceObjects[1]
This field is variable length.

NWPA object IDs for each device in the order they are addressed in the future. That is, deviceObjects[3] is the fourth device in a changer command.

NWPA object IDs for the devices might not be available at the time of the CDM inquiry, in which case that field should not be changed and the device should not be activated. The device IDs for the changer's devices can be found in a number of ways. Registering an enhancer for devices of the right type and checking the SCSI target ID's of the devices against those in the changer is one way. Another might be to use NWPA APIs to walk the object tree and compare those SCSI target IDs. However it is done, after the object IDs for the device are found they should be filled in and updated using CDI_Object_Update.

The Return Changer Media Mapping (0x001C - 0x0002) CDM message passes a buffer that is a byte map to be filled in by the CDM for the devices, slots, and mailboxes of the changer, in that order. This buffer should be filled in with the locations of the media in the devices, slots, and mailboxes. After this, the changer objects are built in NWPA and an Activate CDM message is sent. The changer should be activated by the CDM using CDI_Object_Update. After the changer has been activated, applications can send changer commands to the CDM.

The CDM receives Changer Commands from an application for moves of media from a source to a destination. The numbers of the destination and source are the order given in the byte map of the Return Changer Media Mapping (0x001C - 0x0002) buffer. The preload command is sent to the CDM just before a move from a mailbox is done to allow the CDM to do any needed preparation before inserting the media.

After the preload, the user is prompted at the console to insert media into the mailbox. After the user has acknowledged the insert of media, the CDM receives the move command with the mailbox as the source. The changer eject command is received by the CDM after a move where the mailbox is the destination, which allows for the CDM to do a rotate out on the changer if it is needed