Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(ready)
- {
- try
- {
- Thread.sleep(100);
- System.out.println("response " + response);
- while(inStream.available() > 0)
- {
- int ch;
- ch = inStream.read();
- response = response + (char)ch;
- if(ch == 3)
- {
- String managerResponse = serialCommandManager.doCommand(response.substring(0, response.length()));
- if(managerResponse != null)
- {
- send(managerResponse);
- }
- response = "";
- //end of transmision, isue serial command
- }
- }
- } catch (Exception ex) {
- response = "";
- debugLogger.printSystemOut("Exception on RS232 income " + ex);
- }
- }
Advertisement
RAW Paste Data
Copied
Advertisement