Important: The information in this document is obsolete and should not be used for new development.
The DSP Parameter Block
The ADSP routines, which you execute by calling the Device Manager'sPBControl
function, require a pointer to a DSP parameter block that holds all of the input and output values associated with the routine. The DSP parameter block contains variant records used by particular routines. TheDSPParamBlock
data type defines the DSP parameter block.This section defines the fields that are common to all ADSP routines that use the DSP parameter block. The fields that are used for specific routines only are defined in the descriptions of the routines to which they apply. The reserved fields, which are used internally by the .DSP driver or not at all, are not defined.
TYPE DSPParamBlock = PACKED RECORD qLink: QElemPtr; {reserved} qType: Integer; {reserved} ioTrap: Integer; {reserved} ioCmdAddr: Ptr; {reserved} ioCompletion: ProcPtr; {completion routine} ioResult: OSErr; {result code} ioNamePtr: StringPtr; {reserved} ioVRefNum: Integer; {reserved} ioCRefNum: Integer; {driver reference number} csCode: Integer; {primary command code} qStatus: LongInt; {reserved} ccbRefNum: Integer; {CCB reference number} CASE Integer OF dspInit, dspCLInit: (ccbPtr: TPCCB; {pointer to CCB} userRoutine: ProcPtr; {pointer to user routine} sendQSize: Integer; {size of send queue} sendQueue: Ptr; {pointer to send queue} recvQSize: Integer; {size of receive queue} recvQueue: Ptr; {pointer to receive queue} attnPtr: Ptr; {pointer to attention-message } { buffer} localSocket: Byte; {local socket number} filler1: Byte); {filler for proper alignment} dspOpen, dspCLListen, dspCLDeny: (localCID: Integer; {local connection ID} remoteCID: Integer; {remote connection ID} remoteAddress: AddrBlock; {remote internet address} filterAddress: AddrBlock; {address filter} sendSeq: LongInt; {send sequence number} sendWindow: Integer; {size of remote buffer} recvSeq: LongInt; {receive sequence number} attnSendSeq: LongInt; {attention send seq number} attnRecvSeq: LongInt; {attention receive seq num} ocMode: Byte; {connection-opening mode} ocInterval: Byte; {interval bet. open requests} ocMaximum: Byte; {retries of open-conn req} filler2: Byte); {filler for proper alignment} dspClose, dspRemove: (abort: Byte; {abort send requests} filler3: Byte); {filler for proper alignment} dspStatus: (statusCCB: TPCCB; {pointer to CCB} sendQPending: Integer; {bytes waiting in send queue} sendQFree: Integer; {available send-queue buffer} recvQPending: Integer; {bytes in receive queue} recvQFree: Integer); {avail receive-queue buffer} dspRead, dspWrite: (reqCount: Integer; {requested number of bytes} actCount: Integer; {actual number of bytes} dataPtr: Ptr; {pointer to data buffer} eom: Byte; {1 if end of message} flush: Byte); {1 to send data now} dspAttention: (attnCode: Integer; {client attention code} attnSize: Integer; {size of attention data} attnData: Ptr; {pointer to attention data} attnInterval: Byte; {reserved} filler4: Byte); {filler for proper alignment} dspOptions: (sendBlocking: Integer; {send-blocking threshold} sendTimer: Byte; {reserved} rtmtTimer: Byte; {reserved} badSeqMax: Byte; {retransmit advice threshold} useCheckSum: Byte); {DDP checksum for packets} dspNewCID: (newCID: Integer); {new connection ID} END;
Field Description
- ioCompletion
- A pointer to a completion routine that you can provide; the Device Manager calls your completion routine when it completes execution of the
PBControl
function, if you executePBControl
asynchro-
nously and you specify a pointer to the routine as the value of this field. SpecifyNIL
for this field if you do not wish to provide a completion routine. If you execute a function synchronously, AppleTalk ignores theioCompletion
field. For information about completion routines, see the chapter "Introduction to AppleTalk" in this book.- ioResult
- The result of the function. If you call the routine asynchronously, the Device Manager sets this field to 1 as soon as you call the routine and it changes the field to the actual result code when the routine completes execution.
ioCRefNum
- The driver reference number that is returned by the
OpenDriver
function. You must specify this number every time you call the
.DSP driver.- csCode
- T he command code for the ADSP routine to be executed. You must fill in this field before calling the
PBControl
function. You use the following constants as values for this field:
qStatus
- This field is reserved for use by ADSP.
ccbRefNum
- The reference number of the connection control block (CCB). ADSP returns the CCB reference number in response to the
dspInit
routine. You must specify this number as a parameter to every .DSP driver routine you call subsequently.