Important: The information in this document is obsolete and should not be used for new development.
Slot Manager Parameter Block
Every Slot Manager function requires a pointer to a Slot Manager parameter block as a parameter and returns anOSErrresult code. Each routine uses only a subset of the fields of the parameter block. See the individual routine descriptions for a list of the fields used with each routine. The Slot Manager parameter block is defined by theSpBlockdata type.
TYPE SpBlock = PACKED RECORD {Slot Manager parameter block} spResult: LongInt; {result} spsPointer: Ptr; {structure pointer} spSize: LongInt; {size of structure} spOffsetData: LongInt; {offset or data} spIOFileName: Ptr; {reserved for Slot Manager} spsExecPBlk: Ptr; {pointer to SEBlock data structure} spParamData: LongInt; {flags} spMisc: LongInt; {reserved for Slot Manager} spReserved: LongInt; {reserved for Slot Manager} spIOReserved: Integer; {ioReserved field from SRT} spRefNum: Integer; {driver reference number} spCategory: Integer; {Category field of sRsrcType entry} spCType: Integer; {cType field of sRsrcType entry} spDrvrSW: Integer; {DrSW field of sRsrcType entry} spDrvrHW: Integer; {DrHW field of sRsrcType entry} spTBMask: SignedByte; {sRsrcType entry bit mask} spSlot: SignedByte; {slot number} spID: SignedByte; {sResource ID} spExtDev: SignedByte; {external device ID} spHwDev: SignedByte; {hardware device ID} spByteLanes: SignedByte; {valid byte lanes} spFlags: SignedByte; {flags used by Slot Manager} spKey: SignedByte; {reserved for Slot Manager} END;Listing 2-1 on page 2-18 illustrates how to set values in an
Field Description
spResult- A general-purpose field used to contain the results returned by several different routines.
spsPointer- A pointer to a data structure. The field can point to an sResource, a data block, or a declaration ROM, depending on the routine being executed.
spSize- The size of the data pointed to in the
spsPointerfield.spOffsetData- The contents of the offset field of an sResource entry. Some routines use this field for other offsets or data.
spIOFileName- Reserved for use by the Slot Manager.
spsExecPBlk- A pointer to an
SEBlockdata structure, which is described on page 2-27.spParamData- On input, a long word containing flags that determine what sResources the Slot Manager searches. When set, bit 0 (the
fAllflag) indicates that disabled sResources should be included. When set, bit 1 (thefOneSlotflag) restricts the search to sResources on a single card. Bit 2 (thefNextflag) indicates when set that the routine finds the next sResource. The rest of the bits must be cleared to 0.- On output, this field indicates whether the sResource is enabled or disabled (if 0, the sResource is enabled; if 1, it is disabled).
spMisc- Reserved for use by the Slot Manager.
spReserved- Reserved for future use.
spIOReserved- The value of the
ioReservedfield from the sResource's entry in the slot resource table.spRefNum- The driver reference number of the driver associated with an sResource, if there is one.
spCategory- The
Categoryfield of thesRsrcTypeentry (which is described on page 2-10).spCType- The
cTypefield of thesRsrcTypeentry.spDrvrSW- The
DrSWfield of thesRsrcTypeentry.spDrvrHW- The
DrHWfield of thesRsrcTypeentry.spTBMask- A mask that determines which
sRsrcTypefields the Slot Manager examines when searching for sResources.spSlot- The number of the slot with the NuBus card containing the requested, or returned, sResource.
spID- The sResource ID of the requested, or returned, sResource.
spExtDev- The external device identifier. This field allows you to distinguish between devices on a card.
spHwDev- The hardware device identifier from the
sRsrcHWDevIDfield of the sResource.spByteLanes- The byte lanes used by a declaration ROM.
spFlags- Flags typically used by the Slot Manager.
spKey- Reserved for use by the Slot Manager.
SpBlockrecord to disable and enable an sResource. Listing 2-2 on page 2-19 illustrates how to use the values in anSpBlockrecord for searching for sResources.