protected ServiceRequest getServiceRequest ( final KNXnetIPHeader h , final byte [ ] data , final int offset ) throws KNXFormatException { try { return PacketHelper . getServiceRequest ( h , data , offset ) ; } catch ( final KNXFormatException e ) { // check if at least the connection header of the service request // is correct and try to get its values final ServiceRequest req = PacketHelper . getEmptyServiceRequest ( h , data , offset ) ; logger . warn ( "received request with unknown cEMI data " + DataUnitBuilder . toHex ( Arrays . copyOfRange ( data , offset + 4 , offset + h . getTotalLength ( ) - h . getStructLength ( ) ) , " " ) , e ) ; return req ; } }
Extracts the service request out of the supplied packet data .