Examples of CULCommunicationException


Examples of org.openhab.io.transport.cul.CULCommunicationException

    try {
      String data = br.readLine();
      if(data==null){
        String msg="EOF encountered for "+deviceName;
        log.error(msg);
        throw new CULCommunicationException(msg);
      }
     
      log.debug("Received raw message from CUL: " + data);
      if ("EOB".equals(data)) {
        log.warn("(EOB) End of Buffer. Last message lost. Try sending less messages per time slot to the CUL");
        return;
      } else if ("LOVF".equals(data)) {
        log.warn("(LOVF) Limit Overflow: Last message lost. You are using more than 1% transmitting time. Reduce the number of rf messages");
        return;
      } else if (data.matches("^\\d+\\s+\\d+"))
      {         
        processCreditReport(data);
        return;
      }
      notifyDataReceived(data);
      requestCreditReport();
           
    } catch (IOException e) {
      log.error("Exception while reading from CUL port "+deviceName, e);
      notifyError(e);
     
      throw new CULCommunicationException(e);
    }       
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.