Source:
private void processNextPeriodicMeterReads(final PeriodType periodType, final DateTime beginDateTime, final DateTime endDateTime, final List<PeriodicMeterReadsGas> periodicMeterReads, final List<DataObject> bufferedObjects, final Channel channel, final boolean isSelectiveAccessSupported, final List<GetResult> results) throws ProtocolAdapterException { final DataObject clock = bufferedObjects.get(BUFFER_INDEX_CLOCK); final CosemDateTime cosemDateTime = this.dlmsHelperService.fromDateTimeValue((byte[]) clock.value()); final DateTime bufferedDateTime = cosemDateTime.asDateTime(); if (bufferedDateTime == null) { final DateTimeFormatter dtf = ISODateTimeFormat.dateTime(); LOGGER.warn("Not using an object from capture buffer (clock=" + cosemDateTime.toString() + "), because the date does not match the given period, since it is not fully specified: [" + dtf.print(beginDateTime) + " .. " + dtf.print(endDateTime) + "]."); return; } if (bufferedDateTime.isBefore(beginDateTime) || bufferedDateTime.isAfter(endDateTime)) { final DateTimeFormatter dtf = ISODateTimeFormat.dateTime(); LOGGER.warn("Not using an object from capture buffer (clock=" + dtf.print(bufferedDateTime) + "), because the date does not match the given period: [" + dtf.print(beginDateTime) + " .. " + dtf.print(endDateTime) + "]."); return; } LOGGER.debug("Processing profile (" + periodType + ") objects captured at: {}", this.dlmsHelperService.getDebugInfo(clock)); switch (periodType) { case INTERVAL: this.processNextPeriodicMeterReadsForInterval(periodicMeterReads, bufferedObjects, bufferedDateTime, results); break; case DAILY: this.processNextPeriodicMeterReadsForDaily(periodicMeterReads, bufferedObjects, bufferedDateTime, channel, isSelectiveAccessSupported, results); break; case MONTHLY: this.processNextPeriodicMeterReadsForMonthly(periodicMeterReads, bufferedObjects, bufferedDateTime, channel, isSelectiveAccessSupported, results); break; default: throw new AssertionError("Unknown PeriodType: " + periodType); } }

Target:
private void processNextPeriodicMeterReads(final PeriodType periodType, final DateTime beginDateTime, final DateTime endDateTime, final List<PeriodicMeterReadsGas> periodicMeterReads, final List<DataObject> bufferedObjects, final Channel channel, final boolean isSelectiveAccessSupported, final List<GetResult> results) throws ProtocolAdapterException { final CosemDateTime cosemDateTime = this.dlmsHelperService.readDateTime( bufferedObjects.get(BUFFER_INDEX_CLOCK), "Clock from " + periodType + " buffer"); final DateTime bufferedDateTime = cosemDateTime.asDateTime(); if (bufferedDateTime == null) { final DateTimeFormatter dtf = ISODateTimeFormat.dateTime(); LOGGER.warn("Not using an object from capture buffer (clock=" + cosemDateTime.toString() + "), because the date does not match the given period, since it is not fully specified: [" + dtf.print(beginDateTime) + " .. " + dtf.print(endDateTime) + "]."); return; } if (bufferedDateTime.isBefore(beginDateTime) || bufferedDateTime.isAfter(endDateTime)) { final DateTimeFormatter dtf = ISODateTimeFormat.dateTime(); LOGGER.warn("Not using an object from capture buffer (clock=" + dtf.print(bufferedDateTime) + "), because the date does not match the given period: [" + dtf.print(beginDateTime) + " .. " + dtf.print(endDateTime) + "]."); return; } LOGGER.debug("Processing profile (" + periodType + ") objects captured at: {}", cosemDateTime); switch (periodType) { case INTERVAL: this.processNextPeriodicMeterReadsForInterval(periodicMeterReads, bufferedObjects, bufferedDateTime, results); break; case DAILY: this.processNextPeriodicMeterReadsForDaily(periodicMeterReads, bufferedObjects, bufferedDateTime, channel, isSelectiveAccessSupported, results); break; case MONTHLY: this.processNextPeriodicMeterReadsForMonthly(periodicMeterReads, bufferedObjects, bufferedDateTime, channel, isSelectiveAccessSupported, results); break; default: throw new AssertionError("Unknown PeriodType: " + periodType); } }