The mrd_show(3mrd) function can be used to obtain information
about specific element types of a supported Medium-Changer.
Medium-Changer element types that mrd_show(3mrd) can retrieve
information about include PORT, DRIVE, SLOT and TRANSPORT. If
a element_type of ROBOT is specified, the mrd_show(3mrd) is
equivalent to calling mrd_startup(3mrd) - that is, robot_info
is filled in.
The robot_info_t data structure is described in mrd_
startup(3mrd).
The element_name parameter specifies the first element of the
type element_type about which to obtain information. The element_
count parameter specifies the number of elements of type element_
type about which information is to be obtained.
1 – Element Info
The element_info_t data structure is defined in the include file
<mrd_common.h>. The fields of this data structure are described
below:
o name - The name field holds the volume tag of the media if
applicable.
o state - The state field can have one of the following values:
ELEMENT_FULL,
ELELMENT_EMPTY, or
ELEMENT_EXCEPT.
o port_type - If the element_type parameter specifies PORT, the
port_type field will have one of the following values:
IN_OUT_PORT,
INPORT,
OUTPORT.
o status - The status field can have one of the following
values:
MRD_STATUS_SLOT_INVALID,
MRD_STATUS_DEVICE_INVALID,
MRD_STATUS_TRANSPORT_INVALID,
MRD_STATUS_PORT_INVALID, or
MRD_STATUS_SUCCESS.
o flags - Use the ELEMENT_VALID mask on the flags field to
indicate whether or not the full Read Element Status data
is valid. The ELEMENT_PVOLTAG and ELEMENT_AVOLTAG indicate
whether the primary or alternate volume tags of the Read
Element Status data are valid.
o element_addr - This is the address of the element, unadjusted
for the starting address. The routine mrd_map_element(3mrd)
can be used to convert an absolute element address to a
relative address and type. This field will be set to -1 when
the information is not valid.
o source_addr - On most SCSI-2 medium-changers, this is the
address where a cartridge resided before being moved to its
current location. The routine mrd_map_element(3mrd) can be
used to convert an absolute element address to a relative
address and type. This field will be set to -1 when the
information is not valid. On some SCSI-2 medium-changers (the
DLT family loaders) this will be the element address of the
slot itself.
o data - This a copy of the SCSI-2 Read Element Status data
when the ELEMENT_VALID bit is set in the flags field. A byte-
order neutral declaration of this data structure is included
in the <mrd_common.h> include file as the mrd_reades_t data
structure.