Mac Dev Center Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access I/O Kit Framework Reference
|
IOFireWireNuDCLPoolInterface |
Declared In: |
Use this interface to build NuDCL-based DCL programs.
Allocate a ReceivePacket NuDCL and append it to the program
Allocate a ReceivePacket NuDCL and append it to the program
Allocate a SendPacket NuDCL and append it to the program.
Allocate a SendPacket NuDCL and append it to the program.
Allocate a SkipCycle NuDCL and append it to the program.
Add 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
Get callback for a NuDCL
Get the scatter-gather list for a NuDCL
Returns the pool's DCL program as a CFArray of NuDCLRef's.
Returns number of bytes to be transferred by a NuDCL
Returns a virtual range spanning lowest referenced buffer address to highest
Get the status pointer for a NuDCL.
Get the time stamp pointer for a NuDCL.
Finds the first DCL in the pool not preceeded by any other DCL.
Set current tag and sync bits
Set the branch pointer for a NuDCL
Set the callback for a NuDCL
Set the scatter gather list for a NuDCL
Set the status pointer for a NuDCL
Set the time stamp pointer for a NuDCL
Set a user specified header for a send NuDCL
AllocateReceivePacket |
Allocate a ReceivePacket NuDCL and append 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 |
Allocate a SendPacket NuDCL and append 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 overriden. 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 |
Allocate a SendPacket NuDCL and append 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 IOVirtualRange's
AllocateSkipCycle |
Allocate a SkipCycle NuDCL and append 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 |
Add 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
A 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, NuDCLReceivePacketRef
AppendDCLUpdateList |
IOReturn ( *AppendDCLUpdateList)( NuDCLRef dcl, NuDCLRef updateDCL );
Description forthcoming
CopyDCLUpdateList |
CFSetRef ( *CopyDCLUpdateList)( NuDCLRef dcl );
Description forthcoming
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
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.
Applies: Any NuDCLRef.
GetDCLCallback |
Get callback for a NuDCL
NuDCLCallback ( *GetDCLCallback)( NuDCLRef dcl );
dcl
The DCL to query
Returns the DCLs callback function or NULL if none is set.
Returns the callback function for a DCL
Applies: Any NuDCLRef
GetDCLFlags |
UInt32 ( *GetDCLFlags)( NuDCLRef dcl );
Description forthcoming
GetDCLRanges |
Get the scatter-gather list for a NuDCL
UInt32 ( *GetDCLRanges) ( NuDCLRef dcl, UInt32 maxRanges, IOVirtualRange *outRanges );
dcl
The DCL to query
maxRanges
Description forthcoming.
outRanges
Description forthcoming.
Returns the previously set handler or NULL is no handler was set.
Applies: NuDCLSendPacketRef, NuDCLReceivePacketRef
GetDCLRefcon |
void* ( *GetDCLRefcon)( NuDCLRef dcl );
Description forthcoming
GetDCLs |
Returns the pool's DCL program as a CFArray of NuDCLRef's.
CFArrayRef ( *GetDCLs)( IOFireWireLibNuDCLPoolRef self );
self
The NuDCL pool to use.
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
GetDCLSkipBranch |
NuDCLRef ( *GetDCLSkipBranch)( NuDCLRef dcl );
Description forthcoming
GetDCLSkipCallback |
NuDCLCallback ( *GetDCLSkipCallback)( NuDCLRef dcl );
Description forthcoming
GetDCLSkipRefcon |
void * ( *GetDCLSkipRefcon)( NuDCLRef dcl );
Description forthcoming
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 |
Get 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.
GetDCLSyncBits |
UInt8 ( *GetDCLSyncBits)( NuDCLRef dcl );
Description forthcoming
GetDCLTagBits |
UInt8 ( *GetDCLTagBits)( NuDCLRef dcl );
Description forthcoming
GetDCLTimeStampPtr |
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.
GetDCLUserHeaderPtr |
UInt32 * ( *GetDCLUserHeaderPtr)( NuDCLRef dcl );
Description forthcoming
GetProgram |
Finds the first DCL in the pool not preceeded by any other DCL.
DCLCommand* ( *GetProgram)( IOFireWireLibNuDCLPoolRef self );
self
The NuDCL pool to use.
A DCLCommand pointer.
Returns a backwards-compatible DCL program pointer. This can be passed to IOFireWireLibDeviceRef::CreateLocalIsochPort.
GetUserHeaderMaskPtr |
UInt32 * ( *GetUserHeaderMaskPtr)( NuDCLRef dcl );
Description forthcoming
PrintDCL |
void ( *PrintDCL)( NuDCLRef dcl );
Description forthcoming
PrintProgram |
void ( *PrintProgram)( IOFireWireLibNuDCLPoolRef self );
Description forthcoming
RemoveDCLUpdateList |
IOReturn ( *RemoveDCLUpdateList)( NuDCLRef dcl );
Description forthcoming
SetCurrentTagAndSync |
Set 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 |
Set 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
SetDCLFlags |
void ( *SetDCLFlags)( NuDCLRef dcl, UInt32 flags );
Description forthcoming
SetDCLRanges |
Set 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.
Set 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, NuDCLReceivePacketRef
SetDCLRefcon |
Description forthcoming
SetDCLSkipBranch |
IOReturn ( *SetDCLSkipBranch)( NuDCLRef dcl, NuDCLRef skipCycleDCL );
Description forthcoming
SetDCLSkipCallback |
IOReturn ( *SetDCLSkipCallback)( NuDCLRef dcl, NuDCLCallback callback );
Description forthcoming
SetDCLSkipRefcon |
IOReturn ( *SetDCLSkipRefcon)( NuDCLRef dcl, void *refcon );
Description forthcoming
SetDCLStatusPtr |
Set the status pointer for a NuDCL
IOReturn ( *SetDCLStatusPtr)( NuDCLRef dcl, UInt32 *statusPtr );
dcl
The DCL for which status pointer will be set
statusPtr
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.
SetDCLSyncBits |
IOReturn ( *SetDCLSyncBits)( NuDCLRef dcl, UInt8 syncBits );
Description forthcoming
SetDCLTagBits |
IOReturn ( *SetDCLTagBits)( NuDCLRef dcl, UInt8 tagBits );
Description forthcoming
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.
SetDCLUpdateList |
IOReturn ( *SetDCLUpdateList)( NuDCLRef dcl, CFSetRef dclList );
Description forthcoming
SetDCLUserHeaderPtr |
Set 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
SetDCLWaitControl |
IOReturn ( *SetDCLWaitControl)( NuDCLRef dcl, Boolean wait );
Description forthcoming
revision |
UInt32 revision;
Interface version
version |
UInt32 version;
Interface version
Last Updated: 2009-10-15