Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stuck with readline and acknowledgement processing.

 
sukbir frwa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Below is my codes. Currently the codes gets data from gps devices. The problem now if you notice is that I have to send twice the acknowledgement message that is w.write("$PA\n"); w.flush(); once in line 56 and 57 and once more in 85 and 86 then only I will receive all the 5 strings. Currently my method of receving is the one I have commented out that is from 62 to 128. I notice that if I dont know send the second acknowledgement I only receive the single string but it suppose to be 5 strings. So I am trying to revert to readline method at line 58 but unfortunately it always wait for \n rather than null. Any help.

 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please indent your code properly next time? It was almost impossible to read it without it. I've added some this time.
 
sukbir frwa
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Rob,
Sorry for the formatting and indent. Thank you.
Rob Spoor wrote:Could you please indent your code properly next time? It was almost impossible to read it without it. I've added some this time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic