474849505152535455
if (socket == null) { try { socket = new DatagramSocket(port); logger.debug("Swegon ventilation UDP message listener started"); } catch (SocketException e) { throw new SwegonVentilationException(e); } } }
82838485868788899091929394
return Arrays.copyOfRange(packet.getData(), 0, packet.getLength() - 1); } catch (SocketException e) { throw new SwegonVentilationException(e); } catch (IOException e) { throw new SwegonVentilationException(e); } }
137138139140141142143144145146147148149150
data[j] = message[j]; return data; } else { throw new SwegonVentilationException("CRC does not match"); } } catch (InterruptedException e) { throw new SwegonVentilationException(e); } }
49505152535455565758
case (byte) 0x73: return parseMessage73(d); } } else { throw new SwegonVentilationException("Illegal data received, first byte mismatch!"); } return null; }
5859606162636465
in = serialPort.getInputStream(); logger.debug("Swegon ventilation Serial Port message listener started"); } catch (Exception e) { throw new SwegonVentilationException(e); } }
133134135136137138139140141142143144145146147148149150151152
data[j] = message[j]; return data; } else { throw new SwegonVentilationException( "CRC does not match"); } } } } } } catch (IOException e) { throw new SwegonVentilationException( "Error occured while receiving data", e); } return null; }