opensubscriber
   Find in this group all groups
 
Unknown more information…

f : firewire@lists.apple.com 12 November 2005 • 7:23AM -0500

A/VC asynchronous messaging: a couple questions
by Tommy Schell

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi,

I'm using the a/vc asynchronous interface, having a little trouble.


With the following declarations:

// FIRST, A CALLBACK
void myCallback( void *pRefCon, IOFireWireAVCLibAsynchronousCommand  
*pCommandObject) {

         printf("From my async callback!!\n");
}

// THEN, IN MAIN().....

void *pRef;
     IOFireWireAVCLibAsynchronousCommand  **async_command;
                UInt8   command[20];
                 UInt32  cmdLen = 0;
.......

.......    // GET INTERFACE, ETC
             // SET UP COMMAND BUFFER

                // open the AVC unit interface
                 result = (*avcUnit)->open( avcUnit );

// HERE, IT CHOKES
  result = (*avcUnit)->createAVCAsynchronousCommand( avcUnit,  
command, cmdLen, (IOFireWireAVCLibAsynchronousCommandCallback)  
&myCallback, pRef, async_command);

                 if( kIOReturnSuccess == result )
                         result = (*avcUnit)-
>AVCAsynchronousCommandSubmit( avcUnit, *async_command);

                 result = (*avcUnit)->AVCAsynchronousCommandRelease  
( avcUnit, *async_command);



If, after opening the avcUnit, I use the AVCCommand() call instead,  
everything's fine.
But when I try the async calls, it chokes on the 1st one.
The most likely candidates for trouble in the argument list of the  
createAVCAsynchronousCommand call, I suppose, are the 4th and 5th args.
Especially the 5th call:  do I need to be passing in something  
besides a null pointer as void* pRefCon?
I tried passing a pointer to a UInt32, but that didn't help.

Also, how does one get access to the response of the command?  
There's nowhere to pass a response pointer, as there is in the  
AVCCommand() call.

Thanks,
Tommy Schell

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Firewire mailing list      (Firewire@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/firewire/subscriber%40opensubscriber.com

This email sent to subscriber@open...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.