ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOFireWireNuDCLPoolInterface |
Declared In: |
Use this interface to build NuDCL-based DCL programs.
Adds a memory range to the scatter gather list of a NuDCL.
Allocates a ReceivePacket NuDCL and appends it to the program.
Allocate a ReceivePacket NuDCL and append it to the program
Allocates a SendPacket NuDCL and appends it to the program.
Allocates a SendPacket NuDCL and appends it to the program.
Allocates a SkipCycle NuDCL and appends it to the program.
Adds a memory range to the scatter gather list of a NuDCL.
Returns number of buffers for a NuDCL
Get the next pointer for a NuDCL
Get the branch pointer for a NuDCL @discussion: Applies: Any NuDCLRef.
Gets callback for a NuDCL.
Get the next pointer for a NuDCL
Gets the scatter-gather list for a NuDCL
Returns the pool's DCL program as a CFArray of NuDCLRefs.
Returns number of bytes to be transferred by a NuDCL
Returns a virtual range spanning lowest referenced buffer address to highest
Gets the status pointer for a NuDCL.
Get the time stamp pointer for a NuDCL.
Gets the status pointer for a NuDCL.
Finds the first DCL in the pool not preceeded by any other DCL.
Sets current tag and sync bits.
Set the branch pointer for a NuDCL
Sets the callback for a NuDCL.
Sets a user specified header for a send NuDCL.
Sets the scatter gather list for a NuDCL.
Set the status pointer for a NuDCL
Set the time stamp pointer for a NuDCL
Sets a user specified header for a send NuDCL.
AddDCLRange |
Adds a memory range to the scatter gather list of a NuDCL.
IOReturn ( *AppendDCLRanges) ( NuDCLRef dcl, UInt32 numRanges, IOVirtualRange *range );
dcl
The DCL to modify.
range
An IOVirtualRange to add to this DCL buffer list. Do not pass NULL.
Returns an IOReturn error code.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify().
Applies: NuDCLSendPacketRef, NuDCLReceivePacket.
AllocateReceivePacket |
Allocates a ReceivePacket NuDCL and appends it to the program.
NuDCLReceivePacketRef ( *AllocateReceivePacket)( IOFireWireLibNuDCLPoolRef self, CFMutableSetRef saveBag, UInt8 headerBytes, UInt32 numBuffers, IOVirtualRange *buffers );
self
The NuDCL pool to use.
headerBytes
Number of bytes of isochronous header to receive with the data. Valid values are 0, 4, and 8.
saveBag
The allocated DCL can be added to a CFBag for easily setting DCL update lists. Pass a CFMutableSetRef to add the allocated DCL to a CFBag; pass NULL to ignore. SaveBag is unmodified on failure.
numBuffers
The number of virtual ranges in 'buffers'.
buffers
An array of virtual memory ranges containing the packet contents. The array is copied into the DCL.
Returns an NuDCLReceivePacketRef on success or 0 on failure.
The ReceivePacket DCL receives an isochronous packet from the bus. One DCL runs per bus cycle. If receiving isochronous headers, an update must be run before the isochronous header is valid.
Receive DCLs can be modified using other functions of IOFireWireLibNuDCLPool.
AllocateReceivePacket_v |
Allocate a ReceivePacket NuDCL and append it to the program
NuDCLReceivePacketRef ( *AllocateReceivePacket_v)( IOFireWireLibNuDCLPoolRef self, CFMutableSetRef saveBag, UInt8 headerBytes, IOVirtualRange *firstRange, ... );
self
The NuDCL pool to use.
saveBag
The allocated DCL can be added to a CFBag for easily setting DCL update lists. Pass a CFMutableSetRef to add the allocated DCL to a CFBag; pass NULL to ignore. SaveBag is unmodified on failure.
headerBytes
Number of bytes of isochronous header to receive with the data. Valid values are 0, 4, and 8.
firstRange
The first buffer to be transmitted. Follow with additional ranges; terminate with NULL.
Returns an NuDCLReceivePacketRef on success or 0 on failure.
Same as AllocateReceivePacket but ranges are passed as a NULL-terminated vector of IOVirtualRange's
AllocateSendPacket |
Allocates a SendPacket NuDCL and appends it to the program.
NuDCLSendPacketRef ( *AllocateSendPacket)( IOFireWireLibNuDCLPoolRef self, CFMutableSetRef saveBag, UInt32 numBuffers, IOVirtualRange *buffers );
self
The NuDCL pool to use.
saveBag
The allocated DCL can be added to a CFBag for easily setting DCL update lists. Pass a CFMutableSetRef to add the allocated DCL to a CFBag; pass NULL to ignore. SaveBag is unmodified on failure.
numBuffers
The number of virtual ranges in 'buffers'.
buffers
An array of virtual memory ranges containing the packet contents. The array is copied into the DCL.
Returns an NuDCLSendPacketRef on success or 0 on failure.
The SendPacket DCL sends an isochronous packet on the bus. One DCL runs per bus cycle. The isochronous header is automatically generated, but can be overridden. An update must be run to regenerate the isochronous header. The sync and tag fields of allocated DCLs default to 0, unless If SetCurrentTagAndSync has been called.
Send DCLs can be modified using other functions of IOFireWireLibNuDCLPool.
AllocateSendPacket_v |
Allocates a SendPacket NuDCL and appends it to the program.
NuDCLSendPacketRef ( *AllocateSendPacket_v)( IOFireWireLibNuDCLPoolRef self, CFMutableSetRef saveBag, IOVirtualRange *firstRange, ... );
self
The NuDCL pool to use.
saveBag
The allocated DCL can be added to a CFBag for easily setting DCL update lists. Pass a CFMutableSetRef to add the allocated DCL to a CFBag; pass NULL to ignore. SaveBag is unmodified on failure.
firstRange
The first buffer to be transmitted. Follow with additional ranges; terminate with NULL.
Returns an NuDCLSendPacketRef on success or 0 on failure.
Same as AllocateSendPacket but ranges are passed as a NULL-terminated vector of IOVirtualRanges.
AllocateSkipCycle |
Allocates a SkipCycle NuDCL and appends it to the program.
NuDCLSkipCycleRef ( *AllocateSkipCycle)( IOFireWireLibNuDCLPoolRef self );
self
The NuDCL pool to use.
Returns an NuDCLSkipCycleRef on success or 0 on failure.
The SkipCycle DCL causes the DCL program to "sends" an empty cycle.
AppendDCLRanges |
Adds a memory range to the scatter gather list of a NuDCL.
IOReturn ( *AppendDCLRanges) ( NuDCLRef dcl, UInt32 numRanges, IOVirtualRange *range );
dcl
The DCL to modify.
range
An IOVirtualRange to add to this DCL buffer list. Do not pass NULL.
Returns an IOReturn error code.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify().
Applies: NuDCLSendPacketRef, NuDCLReceivePacket.
CountDCLRanges |
Returns number of buffers for a NuDCL
UInt32 ( *CountDCLRanges) ( NuDCLRef dcl );
dcl
The DCL to query
Returns number of ranges in DCLs scatter-gather list
Applies: NuDCLSendPacketRef, NuDCLReceivePacket
FindDCLNextDCL |
Get the next pointer for a NuDCL
NuDCLRef ( *FindDCLNextDCL)( IOFireWireLibNuDCLPoolRef self, NuDCLRef dcl );
dcl
The dcl whose next pointer will be returned
Returns the DCL immediately following this DCL in program order (ignoring branches) or 0 for none.
Applies: Any NuDCLRef
GetDCLBranch |
Get the branch pointer for a NuDCL @discussion: Applies: Any NuDCLRef.
NuDCLRef ( *GetDCLBranch)( NuDCLRef dcl );
dcl
The dcl whose branch pointer will be returned.
Returns the branch pointer of 'dcl' or 0 for none is set.
GetDCLCallback |
Gets callback for a NuDCL.
NuDCLCallback ( *GetDCLCallback)( NuDCLRef dcl );
dcl
The DCL to query.
Returns the DCL's callback function or NULL if none is set.
Returns the callback function for a DCL.
Applies: Any NuDCLRef.
GetDCLNextDCL |
Get the next pointer for a NuDCL
NuDCLRef ( *FindDCLNextDCL)( IOFireWireLibNuDCLPoolRef self, NuDCLRef dcl );
dcl
The dcl whose next pointer will be returned
Returns the DCL immediately following this DCL in program order (ignoring branches) or 0 for none.
Applies: Any NuDCLRef
GetDCLRanges |
Gets the scatter-gather list for a NuDCL
UInt32 ( *GetDCLRanges) ( NuDCLRef dcl, UInt32 maxRanges, IOVirtualRange *outRanges );
dcl
The DCL to query.
stopProc
The handler to set.
Returns the previously set handler or NULL if no handler was set.
Applies: NuDCLSendPacketRef, NuDCLReceivePacket.
GetDCLs |
Returns the pool's DCL program as a CFArray of NuDCLRefs.
CFArrayRef ( *GetDCLs)( IOFireWireLibNuDCLPoolRef self );
self
The NuDCL pool to use.
Returns a CFArrayRef.
GetDCLSize |
Returns number of bytes to be transferred by a NuDCL
IOByteCount ( *GetDCLSize) ( NuDCLRef dcl );
dcl
The DCL to query
Returns an IOByteCount.
Applies: NuDCLSendPacketRef, NuDCLReceivePacket
GetDCLSpan |
Returns a virtual range spanning lowest referenced buffer address to highest
IOReturn ( *GetDCLSpan) ( NuDCLRef dcl, IOVirtualRange *spanRange );
dcl
The DCL to query
Returns an IOVirtualRange.
Applies: NuDCLSendPacketRef, NuDCLReceivePacket
GetDCLStatusPtr |
Gets the status pointer for a NuDCL.
UInt32* ( *GetDCLStatusPtr)( NuDCLRef dcl );
dcl
The DCL whose status pointer will be returned.
Returns a UInt32 status pointer.
Applies: Any NuDCLRef.
GetDCLTimeStampPtr(NuDCLRef) |
Get the time stamp pointer for a NuDCL.
UInt32* ( *GetDCLTimeStampPtr)( NuDCLRef dcl );
dcl
The DCL whose timestamp pointer will be returned.
Returns a UInt32 time stamp pointer.
Applies: Any NuDCLRef.
GetDCLTimeStampPtr(NuDCLRef) |
Gets the status pointer for a NuDCL.
UInt32* ( *GetDCLStatusPtr)( NuDCLRef dcl );
dcl
The DCL whose status pointer will be returned.
Returns a UInt32 status pointer.
Applies: Any NuDCLRef.
GetProgram |
Finds the first DCL in the pool not preceeded by any other DCL.
DCLCommand* ( *GetProgram)( IOFireWireLibNuDCLPoolRef self );
self
The NuDCL pool to use.
Returns a DCLCommand pointer.
Returns a backwards-compatible DCL program pointer. This can be passed to CreateLocalIsochPort.
SetCurrentTagAndSync |
Sets current tag and sync bits.
void ( *SetCurrentTagAndSync)( IOFireWireLibNuDCLPoolRef self, UInt8 tag, UInt8 sync );
self
The NuDCL pool to use.
tag
Tag field value for subsequently allocated send DCLs.
sync
Sync field value for subsequently allocated send DCLs.
Sets the DCL pool's current tag and sync bits. All send DCLs allocated after calling this function will transmit the specified tag and sync values. These fields can also be set on each DCL using SetDCLTagBits() and SetDCLSyncBits().
SetDCLBranch |
Set the branch pointer for a NuDCL
IOReturn ( *SetDCLBranch)( NuDCLRef dcl, NuDCLRef branchDCL );
Returns an IOReturn error code.
Program execution will jump to the DCL pointed to by 'branchDCL', after the DCL is executed. If set to 0, execution will stop after this DCL.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify()
Applies: Any NuDCLRef.
SetDCLCallback(NuDCLRef, NuDCLCallback) |
Sets the callback for a NuDCL.
IOReturn ( *SetDCLCallback) ( NuDCLRef dcl, NuDCLCallback callback );
dcl
The DCL to modify.
callback
The callback function.
Returns an IOReturn error code.
A callback can be called each time a NuDCL is run. Use SetDCLCallback() to set the callback for a NuDCL. If the update option is also set, the callback will be called after the update has run.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify().
Applies: Any NuDCLRef.
SetDCLCallback(NuDCLRef, UInt32 *, UInt32 *) |
Sets a user specified header for a send NuDCL.
IOReturn ( *SetDCLUserHeaderPtr)( NuDCLRef dcl, UInt32 *headerPtr, UInt32 *mask );
dcl
The DCL to modify.
headerPtr
A pointer to a two-quadlet header. See section 9.6 of the the OHCI specification.
mask
A pointer to a two-quadlet mask. The quadlets in headerPtr are masked with 'mask' and the masked-out bits are replaced by the FireWire system software.
Returns an IOReturn error code.
Allows the client to create a custom header for a transmitted isochronous packet. The header is masked with 'mask', and the FireWire system software fills in the masked-out bits.
This change will apply immediately to a non-running DCL program. An update must be run on the DCL for changes to take effect in a running program.
Applies: NuDCLSendPacketRef.
SetDCLRanges |
Sets the scatter gather list for a NuDCL.
IOReturn ( *SetDCLRanges) ( NuDCLRef dcl, UInt32 numRanges, IOVirtualRange *ranges );
dcl
The DCL to modify.
numRanges
number of ranges in 'ranges'.
ranges
An array of virtual ranges.
Returns an IOReturn error code.
Sets the list of data buffers for a DCL. Setting too many ranges may result in a memory region with too many discontinous physical segments for the hardware to send or receive in a single packet. This will result in an error when the program is compiled.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify().
Applies: NuDCLSendPacketRef, NuDCLReceivePacket.
SetDCLStatusPtr |
Set the status pointer for a NuDCL
IOReturn ( *SetDCLStatusPtr)( NuDCLRef dcl, UInt32 *statusPtr );
dcl
The DCL for which status pointer will be set.
timeStampPtr
A pointer to a quadlet which will hold the status after 'dcl' is updated.
Returns an IOReturn error code.
Setting a the status pointer for a NuDCL causes the packet transmit/receive hardware status to be recorded when the DCL executes. This DCL must be updated after it has executed for the status to be valid.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify()
Status values are as follows: (from the OHCI spec, section 3.1.1)
5'h00 No event status.
5'h02 evt_long_packet (receive) The received data length was greater than the buffer's data_length.
5'h05 evt_overrun (receive) A receive FIFO overflowed during the reception of an isochronous packet.
5'h06 evt_descriptor_read (receive/transmit) An unrecoverable error occurred while the Host Controller was reading a descriptor block.
5'h07 evt_data_read (transmit) An error occurred while the Host Controller was attempting to read from host memory in the data stage of descriptor processing.
5'h08 evt_data_write (receive/transmit) An error occurred while the Host Controller was attempting to write to host memory either in the data stage of descriptor processing (AR, IR), or when processing a single 16-bit host memory write (IT).
5'h0A evt_timeout (transmit) Indicates that the asynchronous transmit response packet expired and was not transmitted, or that an IT DMA context experienced a skip processing overflow (See section9.3.4).
5'h0B evt_tcode_err (transmit) A bad tCode is associated with this packet. The packet was flushed.
5'h0E evt_unknown (receive/transmit) An error condition has occurred that cannot be represented by any other event codes defined herein.
5'h11 ack_complete (receive/transmit) No event occurred. (Success)
5'h1D ack_data_error (receive) A data field CRC or data_length error.
Applies: Any NuDCLRef.
SetDCLTimeStampPtr |
Set the time stamp pointer for a NuDCL
IOReturn ( *SetDCLTimeStampPtr)( NuDCLRef dcl, UInt32 *timeStampPtr );
dcl
The DCL for which time stamp pointer will be set
timeStampPtr
A pointer to a quadlet which will hold the timestamp after 'dcl' is updated.
Returns an IOReturn error code.
Setting a the time stamp pointer for a NuDCL causes a time stamp to be recorded when a DCL executes. This DCL must be updated after it has executed for the timestamp to be valid.
This change will apply immediately to a non-running DCL program. To apply the change to a running program use IOFireWireLocalIsochPortInterface::Notify()
Applies: Any NuDCLRef.
SetDCLUserHeaderPtr |
Sets a user specified header for a send NuDCL.
IOReturn ( *SetDCLUserHeaderPtr)( NuDCLRef dcl, UInt32 *headerPtr, UInt32 *mask );
dcl
The DCL to modify.
headerPtr
A pointer to a two-quadlet header. See section 9.6 of the the OHCI specification.
mask
A pointer to a two-quadlet mask. The quadlets in headerPtr are masked with 'mask' and the masked-out bits are replaced by the FireWire system software.
Returns an IOReturn error code.
Allows the client to create a custom header for a transmitted isochronous packet. The header is masked with 'mask', and the FireWire system software fills in the masked-out bits.
This change will apply immediately to a non-running DCL program. An update must be run on the DCL for changes to take effect in a running program.
Applies: NuDCLSendPacketRef.
|
Last Updated: 2009-02-23