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);
}
}