Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ReadPipeAsync revisited.




(slight grammar correction)

Yes, I understand that. I'll put it in a list. :-)

1) I make the request.

2) I receive an immediate error (which as I was assuming is not from the actual transfer).

Note: The error appears to be an overrun error for unknown reasons. It only occurs when the device is connected through an external hub, not directly into the mac's controller. 

3) My question is the following: Is the request still floating around? And if it is not, will re-sending another request cause me to miss data in any way from the device? Basically, does the error in sending the request cause a request to be generated anyway, or does this error return indicate that no request was sent, and I should do it again.

Thanks for the quick response!

Robert.



Le 30 oct. 06 à 10:32, Fernando Urbina a écrit :

On Oct 30, 2006, at 10:15 AM, Robert Bell wrote:


Hi guys,

So, I have finally gotten round to implementing a fix for a 0xe00002e8 in a call to ReadPipeAsync (mentioned in earlier emails). I have a question though.  The code used is as follows:

result = (*interface)->ReadPipeAsync(interface, 1, asynchRequest->rawDataBuffer,
sizeOfRequest, returnHandler, asynchRequest);

if(result != kIOReturnSuccess){
//Handle error.
}

The error is caught in the if block. Given that this is an async request, am I correct in assuming that the return from this function cannot know about errors generated during the actual obtaining of the data? So, if I re-send the request, can I trust that the device is still waiting to receive a read request? If this were a synchronous call, I would naturally assume that some error had occurred that would more than likely mean that I would loose the data, but in this case, it is not clear to me as the call above returns immediately.


Your if block above is catching immediate errors, such as the pipe being stalled or a bad argument being passed.  Actual errors from the transfer will be reported in your returnHandler.  If you queue another request, it will be queued behind that first one.   An async request has to return immediately without waiting for the actual transfer.  That's the whole point of it.

--
Fernando Urbina
USB Technology Team
Apple Computer, Inc.



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden

References: 
 >ReadPipeAsync revisited. (From: Robert Bell <email@hidden>)
 >Re: ReadPipeAsync revisited. (From: Fernando Urbina <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.