Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer > Re: RFCOMM chan...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 980 of 1040
Post > Topic >>

Re: RFCOMM channel to Lego NXT

by outpaddling <jbacon@[EMAIL PROTECTED] > Dec 19, 2007 at 04:50 PM

On Dec 18, 10:03 am, Michael Ash <m...@[EMAIL PROTECTED]
> wrote:
> outpaddling <jba...@[EMAIL PROTECTED]
> wrote:
> > I tried just calling CFRunLoopRun() with the default env, but the
> > handler doesn't fire.  Some other docs I found suggested that I need
> > to add a source using CFRunLoopAddSource(), but I haven't been able to
> > figure out how as yet.
>
> The way this stuff *usually* works is, you create the object, set up a
> callback, then there's some function to create a CFRunLoopSourceRef from
 
> the thing you're working with. For example, a CFMessage****t has a
function
> called CFMessage****tCreateRunLoopSource which returns a
CFRunLoopSourceRef
> and you can then add that to the CFRunLoop.
>
> I don't know if that's really how it works with Bluetooth, and I don't
> know what the function would be if so, but I guess that's the sort of
> thing to look for.
>
> --
> Michael Ash
> Rogue Amoeba Software

I actually already got this far, and found in the Xcode docs:

CFMessage****tCreateRunLoopSource
Creates a CFRunLoopSource object for a CFMessage****t object.

CFRunLoopSourceRef CFMessage****tCreateRunLoopSource (
   CFAllocatorRef allocator,
   CFMessage****tRef ms,
   CFIndex order
);

Problem is, I don't know where to get the CFMessage****tRef from.  I
browsed the framework docs, and found some possibilities, each with
additional parameters that I didn't know where to get.  At this point
I just had to chuckle.  The time required to explore every possible
branch of this trail grows geometrically with each additional layer,
and I'm not even certain that CFMEssage****t is the right path to
follow.  It's clear that I would need to know a lot about Carbon/Cocoa
programming, including several core frameworks, in order to solve this
one on my own, and I just don't have the time, so I have to hope I can
find an analogous code example. It would have been so simple if Apple
would have just let us do synchronous reads.  Oh well...

Thanks for the ideas,

    Jason
 




 5 Posts in Topic:
RFCOMM channel to Lego NXT
outpaddling <jbacon@[E  2007-12-09 09:41:23 
Re: RFCOMM channel to Lego NXT
Michael Ash <mike@[EMA  2007-12-09 14:14:20 
Re: RFCOMM channel to Lego NXT
outpaddling <jbacon@[E  2007-12-17 20:09:43 
Re: RFCOMM channel to Lego NXT
Michael Ash <mike@[EMA  2007-12-18 10:03:11 
Re: RFCOMM channel to Lego NXT
outpaddling <jbacon@[E  2007-12-19 16:50:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 9:28:19 CST 2008.