Source:
public AccessResultCode execute(final LnClientConnection conn, final DlmsDevice device, final PushSetupAlarm pushSetupAlarm) throws IOException, TimeoutException, ProtocolAdapterException { final SetParameter setParameterSendDestinationAndMethod; if (pushSetupAlarm.hasPushObjectList()) { LOGGER.warn("Setting Push Object List of Push Setup Alarm not implemented: {}", pushSetupAlarm.getPushObjectList()); } if (pushSetupAlarm.hasSendDestinationAndMethod()) { final AttributeAddress sendDestinationAndMethodAddress = new AttributeAddress(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID_SEND_DESTINATION_AND_METHOD); final DataObject value = this.buildSendDestinationAndMethodObject(pushSetupAlarm .getSendDestinationAndMethod()); setParameterSendDestinationAndMethod = new SetParameter(sendDestinationAndMethodAddress, value); } else { LOGGER.error("Send Destination and Method of the Push Setup Alarm is expected to be set."); setParameterSendDestinationAndMethod = null; } if (pushSetupAlarm.hasCommunicationWindow()) { LOGGER.warn("Setting Communication Window of Push Setup Alarm not implemented: {}", pushSetupAlarm.getCommunicationWindow()); } if (pushSetupAlarm.hasRandomisationStartInterval()) { LOGGER.warn("Setting Randomisation Start Interval of Push Setup Alarm not implemented: {}", pushSetupAlarm.getRandomisationStartInterval()); } if (pushSetupAlarm.hasNumberOfRetries()) { LOGGER.warn("Setting Number of Retries of Push Setup Alarm not implemented: {}", pushSetupAlarm.getNumberOfRetries()); } if (pushSetupAlarm.hasRepetitionDelay()) { LOGGER.warn("Setting Repetition Delay of Push Setup Alarm not implemented: {}", pushSetupAlarm.getRepetitionDelay()); } if (setParameterSendDestinationAndMethod == null) { return AccessResultCode.OTHER_REASON; } return conn.set(setParameterSendDestinationAndMethod).get(0); }

Target:
public AccessResultCode execute(final LnClientConnection conn, final DlmsDevice device, final PushSetupAlarm pushSetupAlarm) throws IOException, ProtocolAdapterException { final SetParameter setParameterSendDestinationAndMethod; if (pushSetupAlarm.hasPushObjectList()) { LOGGER.warn("Setting Push Object List of Push Setup Alarm not implemented: {}", pushSetupAlarm.getPushObjectList()); } if (pushSetupAlarm.hasSendDestinationAndMethod()) { final AttributeAddress sendDestinationAndMethodAddress = new AttributeAddress(CLASS_ID, OBIS_CODE, ATTRIBUTE_ID_SEND_DESTINATION_AND_METHOD); final DataObject value = this.buildSendDestinationAndMethodObject(pushSetupAlarm .getSendDestinationAndMethod()); setParameterSendDestinationAndMethod = new SetParameter(sendDestinationAndMethodAddress, value); } else { LOGGER.error("Send Destination and Method of the Push Setup Alarm is expected to be set."); throw new ProtocolAdapterException("Error setting Alarm push setup data. No destination and method data"); } if (pushSetupAlarm.hasCommunicationWindow()) { LOGGER.warn("Setting Communication Window of Push Setup Alarm not implemented: {}", pushSetupAlarm.getCommunicationWindow()); } if (pushSetupAlarm.hasRandomisationStartInterval()) { LOGGER.warn("Setting Randomisation Start Interval of Push Setup Alarm not implemented: {}", pushSetupAlarm.getRandomisationStartInterval()); } if (pushSetupAlarm.hasNumberOfRetries()) { LOGGER.warn("Setting Number of Retries of Push Setup Alarm not implemented: {}", pushSetupAlarm.getNumberOfRetries()); } if (pushSetupAlarm.hasRepetitionDelay()) { LOGGER.warn("Setting Repetition Delay of Push Setup Alarm not implemented: {}", pushSetupAlarm.getRepetitionDelay()); } final List<AccessResultCode> resultCodes = conn.set(setParameterSendDestinationAndMethod); if (resultCodes != null && !resultCodes.isEmpty()) { return resultCodes.get(0); } else { throw new ProtocolAdapterException("Error setting Alarm push setup data."); } }