Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Devices /
Chapter 2 - Slot Manager / Slot Manager Reference
Data Structures


Slot Manager Parameter Block

Every Slot Manager function requires a pointer to a Slot Manager parameter block as a parameter and returns an OSErr result 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 the SpBlock data 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;
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 spsPointer field.
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 SEBlock data 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 fAll flag) indicates that disabled sResources should be included. When set, bit 1 (the fOneSlot flag) restricts the search to sResources on a single card. Bit 2 (the fNext flag) 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 ioReserved field 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 Category field of the sRsrcType entry (which is described on page 2-10).
spCType
The cType field of the sRsrcType entry.
spDrvrSW
The DrSW field of the sRsrcType entry.
spDrvrHW
The DrHW field of the sRsrcType entry.
spTBMask
A mask that determines which sRsrcType fields 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 sRsrcHWDevID field 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.
Listing 2-1 on page 2-18 illustrates how to set values in an SpBlock record to disable and enable an sResource. Listing 2-2 on page 2-19 illustrates how to use the values in an SpBlock record for searching for sResources.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996