public:
virtual UInt32 genPhysicalSegments( IOMemoryDescriptor *descriptor, IOByteCount fromPosition, void * segments, UInt32 maxSegments, UInt32 maxTransferSize = 0, IOByteCount *transferSize = 0);
Generates a list of physical segments from the given memory descriptor, relative to the current position of the descriptor.
Result: If the descriptor is exhausted of memory, a zero is returned, otherwise the number of segments that were filled in is returned.
Name Description descriptor IOMemoryDescriptor that describes the data associated with an I/O request. fromPosition Starting location of the I/O within a memory descriptor. segments Void pointer to base of output physical scatter/gather list. Always passed directly onto the SegmentFunction without interpretation by the cursor. maxSegments Maximum number of segments that can be written to segments array. maxTransferSize Maximum transfer size is limited to that many bytes, otherwise it defaults to the maximum transfer size specified when the memory cursor was initialized. transferSize Pointer to a IOByteCount variable that can contain the total size of the transfer being described. Default to 0 indicating that no transfer size need be returned.
public:
virtual bool initWithSpecification(SegmentFunction outSegFunc, IOPhysicalLength maxSegmentSize = 0, IOPhysicalLength maxTransferSize = 0, IOPhysicalLength alignment = 1);
Result: true if the inherited classes and this instance initialise successfully.
Name Description outSegFunc SegmentFunction to call to output one physical segment. maxSegmentSize Maximum allowable size for one segment. Defaults to 0. maxTransferSize Maximum size of an entire transfer. Default to 0 indicating no maximum. alignment Alligment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
public:
static IOMemoryCursor * withSpecification(SegmentFunction outSegFunc, IOPhysicalLength maxSegmentSize = 0, IOPhysicalLength maxTransferSize = 0, IOPhysicalLength alignment = 1);
Result: A new memory cursor if successfully created and initialised, 0 otherwise.
Name Description outSegFunc SegmentFunction to call to output one physical segment. maxSegmentSize Maximum allowable size for one segment. Defaults to 0. maxTransferSize Maximum size of an entire transfer. Default to 0 indicating no maximum. alignment Alligment restrictions on output physical addresses. Not currently implemented. Defaults to single byte alignment.
public:struct PhysicalSegment { IOPhysicalAddress location; IOPhysicalLength length; }; /*! @defined IOPhysicalSegment @discussion Backward compatibilty define for the old non-class scoped type definition. See $link IOMemoryCursor::PhysicalSegment */ #define IOPhysicalSegment IOMemoryCursor::PhysicalSegment /*! @typedef SegmentFunction
A physical address/length pair.
protected:IOPhysicalLength alignMask;
Currently unused. Reserved for automated aligment restriction code.
protected:IOPhysicalLength maxSegmentSize;
Maximum size of one segment in a scatter/gather list
protected:IOPhysicalLength maxTransferSize;
Maximum size of a transfer that this memory cursor is allowed to generate
protected:SegmentFunction outSeg;
The action method called when an event has been delivered
#define OutputSegmentFunc IOMemoryCursor::SegmentFunction
Backward compatibilty define for the old non-class scoped type definition. See $link IOMemoryCursor::SegmentFunction
© 2000 Apple Computer, Inc. (Last Updated 2/23/2000)