NXTCommBlueCove and InputStream & OutputStream

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

NXTCommBlueCove and InputStream & OutputStream

Postby kirkpthompson » Wed Dec 26, 2007 8:04 am

Hi. I am trying to figure out how the InputStream and OutputStream (from the StreamConnection object) in NXTCommBlueCove work. Where does the abstract read() method in InputStream actually get implemented to support Bluetooth COMMS?

Thnx.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby lawrie » Wed Dec 26, 2007 1:23 pm

getInputStream() and getOutputSteam() return instances of classes that extend InputStream and OutputStream.

Look at the BTSend sample.
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Postby kirkpthompson » Thu Dec 27, 2007 2:29 am

Hi. Sorry for not being clear. I am looking for the native methods that do the actual BT work of sending and receiving like the low-level methods btSend() and btReceive() in lejos.nxt.comm.Blutetooth but on the PC side.

I found that BTOutputStream and BTInputStream are used for the NXT BT COMMS and are returned by the connection object. These supply implementation for the read and write abstracts for the InputStream and OutputStream classes. I would like to understand the low level [native] methods used for the BT COMMs on the PC side (I'm on a PC, WinXP).

Thnx again.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby lawrie » Thu Dec 27, 2007 8:45 am

Look at the Bluecove source which is distributed with lejos in bluecove-2.0.0-sources.tar.gz.
lawrie
leJOS Team Member
 
Posts: 922
Joined: Mon Feb 05, 2007 1:27 pm

Postby kirkpthompson » Thu Dec 27, 2007 5:30 pm

Holy Smokes!

I am looking and feeling a bit overwhelmed...

Thnx.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron
more stuff