Minor BBOSC framework update

I forgot to mention yesterday that I committed a minor update to the BBOSC framework. It was a single method call to allow convenient access to the attached objects of a packet.

This came about because i never really ‘finished’ the dispatch side of things. Now (with the one added method call) you can in fact add your own dispatch code pretty easily. I had thought to bolt on a nice registered callback kinda thing that decompressed the messages and bundles and sends them to callback registered by address, but i haven’t done that yet. It still works fine without that nice feature, it jsut means a tad bit more work if you want to do any complicated message dispatching.

In any case, if you are a big BBOSC user, you should probably get the updated code and recompile. (I know that the TUIOTestapp i wrote yesterday requires it :-)

That is all for now!

This entry was posted in code, multitouch, openSoundControl. Bookmark the permalink.

4 Responses to Minor BBOSC framework update

  1. toddtreece says:

    I am new to cocoa development and trying to use the listener/dispatcher to receive messages on the iPhone. Could you provide some sample code that demonstrates how to use the dispatcher?

    I have figured out the sender portion using your sample code, and it is very intuitive. Thank you for your work on developing this!

  2. Ben says:

    Hey Todd,

    have a look at my TUIO test app here:

    it has a simple listener/dispatcher/decoder in it using BBOSC. (very simple) it should get you started. Let me know if you have more questions.


  3. toddtreece says:

    Hi Ben,

    I am trying to make a test iPhone app that simply sends itself a string and sets a UILabel to the contents of the received string. I tried to adapt BBTUIOTest sample code, but I am not getting any response from the listener. Since I am new to Cocoa, it could be something simple that I am missing.

    Could you possibly take a look at my project and see if I am missing something?


    Thanks for the help!


  4. Ben says:

    Hey Todd,

    I had a super quick look at your project. It would appear from my brief look that you need to add the UILabel to your interface and connect it to your main view’s outlet.

    then, you will need to subclass the BBOSCDispatch object so that you know when the packets come in. the way you are doing it now just makes a default dispatch object that does little more than log out when something happens.

    once you have a dispatch subclass you will need to do something like:
    BBOSCListener * newListener = [[BBOSCListener alloc] init];
    [newListener setDelegate:dispatchViewDelegate];
    [newListener startListeningOnPort:portNumber];

    have a look at the code in the BBTUIOTest app, it does all that (the BBDispatchViewDelegate is what I am using there to get at the recieved packets, it shows how to decode them and get at the actual messages. you can make the mainView a dispatch delegate if you want, just make sure you implement the -(void)dispatchRawPacket:(NSData*)someData method and you are good to go, just set the view as the delegate like so:
    [newListener setDelegate:self];)

    the dispatcher still needs some work to be super easy to use, so for now you will have to go the long way like in BBTUIOTest.

    hopefully that helps!

Leave a Reply