private ControlMessage parseSegmentedControlMessage(@NonNull final NetworkKey key, @NonNull final byte[] data, @NonNull final byte[] decryptedProxyPdu, final int ttl, final int src, final int dst) {
        if (segmentedControlMessagesMessages == null) {
            segmentedControlMessagesMessages = new SparseArray<>();
            segmentedControlMessagesMessages.put(0, data);
        } else {
            final int k = segmentedControlMessagesMessages.size();
            segmentedAccessMessagesMessages.put(k, data);
        }

        final ControlMessage message = parseSegmentedControlLowerTransportPDU(decryptedProxyPdu);
        if (message != null) {
            final SparseArray<byte[]> segmentedMessages = segmentedControlMessagesMessages.clone();
            segmentedControlMessagesMessages = null;
            message.setNetworkKey(key);
            message.setIvIndex(mUpperTransportLayerCallbacks.getIvIndex());
            message.setNetworkLayerPdu(segmentedMessages);
            message.setTtl(ttl);
            message.setSrc(src);
            message.setDst(dst);
        }
        return message;
    }
Parses a unsegmented control message

@param key               Network Key used to decrypt
@param data              Received pdu data
@param decryptedProxyPdu Decrypted proxy pdu
@param ttl               TTL of the pdu
@param src               Source address where the pdu originated from
@param dst               Destination address to which the pdu was sent
@return a complete {@link ControlMessage} or null if the message was unable to parsed
mesh/src/main/java/no/nordicsemi/android/mesh/transport/NetworkLayer.java