{"action":"created","comment":{"url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/comments/53632406","id":53632406,"diff_hunk":"@@ -0,0 +1,79 @@\n+/**\n+ * Copyright 2016 Smart Society Services B.V.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ */\n+package org.osgp.adapter.protocol.dlms.domain.commands;\n+\n+import java.io.IOException;\n+import java.util.concurrent.TimeoutException;\n+\n+import org.openmuc.jdlms.AccessResultCode;\n+import org.openmuc.jdlms.AttributeAddress;\n+import org.openmuc.jdlms.LnClientConnection;\n+import org.openmuc.jdlms.ObisCode;\n+import org.openmuc.jdlms.SetParameter;\n+import org.openmuc.jdlms.datatypes.DataObject;\n+import org.osgp.adapter.protocol.dlms.domain.entities.DlmsDevice;\n+import org.osgp.adapter.protocol.dlms.exceptions.ProtocolAdapterException;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.stereotype.Component;\n+\n+import com.alliander.osgp.dto.valueobjects.smartmetering.PushSetupSms;\n+\n+@Component()\n+public class SetPushSetupSmsCommandExecutor extends SetPushSetupCommandExecutor implements\n+CommandExecutor<PushSetupSms, AccessResultCode> {\n+\n+    private static final ObisCode OBIS_CODE = new ObisCode(\"0.1.25.9.0.255\");\n+\n+    @Autowired\n+    private DlmsHelperService dlmsHelperService;\n+\n+    @Override\n+    public AccessResultCode execute(final LnClientConnection conn, final DlmsDevice device,\n+            final PushSetupSms pushSetupSms) throws IOException, TimeoutException, ProtocolAdapterException {\n+\n+        final SetParameter setParameterSendDestinationAndMethod;\n+\n+        if (pushSetupSms.hasPushObjectList()) {\n+            LOGGER.warn(\"Setting Push Object List of Push Setup Sms not implemented: \"\n+                    + pushSetupSms.getPushObjectList());\n+        }\n+\n+        if (pushSetupSms.hasSendDestinationAndMethod()) {\n+            final AttributeAddress sendDestinationAndMethodAddress = new AttributeAddress(CLASS_ID, OBIS_CODE,\n+                    ATTRIBUTE_ID_SEND_DESTINATION_AND_METHOD);\n+            final DataObject value = this.buildSendDestinationAndMethodObject(pushSetupSms\n+                    .getSendDestinationAndMethod());\n+            setParameterSendDestinationAndMethod = new SetParameter(sendDestinationAndMethodAddress, value);\n+        } else {\n+            LOGGER.error(\"Send Destination and Method of the Push Setup Sms is expected to be set.\");\n+            setParameterSendDestinationAndMethod = null;\n+        }\n+\n+        if (pushSetupSms.hasCommunicationWindow()) {\n+            LOGGER.warn(\"Setting Communication Window of Push Setup Sms not implemented: \"\n+                    + pushSetupSms.getCommunicationWindow());\n+        }\n+        if (pushSetupSms.hasRandomisationStartInterval()) {\n+            LOGGER.warn(\"Setting Randomisation Start Interval of Push Setup Sms not implemented: \"\n+                    + pushSetupSms.getRandomisationStartInterval());\n+        }\n+        if (pushSetupSms.hasNumberOfRetries()) {\n+            LOGGER.warn(\"Setting Number of Retries of Push Setup Sms not implemented: \"","path":"osgp-protocol-adapter-dlms/src/main/java/org/osgp/adapter/protocol/dlms/domain/commands/SetPushSetupSmsCommandExecutor.java","position":69,"original_position":66,"commit_id":"13543efb025994a5fd705d68b46eb2127f4ace97","original_commit_id":"789256a1bdd7c256d7f32d52ad0a1dc0e8057911","user":{"login":"mvhaasteren","id":15610273,"avatar_url":"https://avatars.githubusercontent.com/u/15610273?v=3","gravatar_id":"","url":"https://api.github.com/users/mvhaasteren","html_url":"https://github.com/mvhaasteren","followers_url":"https://api.github.com/users/mvhaasteren/followers","following_url":"https://api.github.com/users/mvhaasteren/following{/other_user}","gists_url":"https://api.github.com/users/mvhaasteren/gists{/gist_id}","starred_url":"https://api.github.com/users/mvhaasteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvhaasteren/subscriptions","organizations_url":"https://api.github.com/users/mvhaasteren/orgs","repos_url":"https://api.github.com/users/mvhaasteren/repos","events_url":"https://api.github.com/users/mvhaasteren/events{/privacy}","received_events_url":"https://api.github.com/users/mvhaasteren/received_events","type":"User","site_admin":false},"body":"corrected","created_at":"2016-02-22T14:37:18Z","updated_at":"2016-02-22T14:37:18Z","html_url":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73#discussion_r53632406","pull_request_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73","_links":{"self":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/comments/53632406"},"html":{"href":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73#discussion_r53632406"},"pull_request":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73"}}},"pull_request":{"url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73","id":60091113,"html_url":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73","diff_url":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73.diff","patch_url":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73.patch","issue_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/73","number":73,"state":"open","locked":false,"title":"Slim 434 receive wakeup sms notification","user":{"login":"mvhaasteren","id":15610273,"avatar_url":"https://avatars.githubusercontent.com/u/15610273?v=3","gravatar_id":"","url":"https://api.github.com/users/mvhaasteren","html_url":"https://github.com/mvhaasteren","followers_url":"https://api.github.com/users/mvhaasteren/followers","following_url":"https://api.github.com/users/mvhaasteren/following{/other_user}","gists_url":"https://api.github.com/users/mvhaasteren/gists{/gist_id}","starred_url":"https://api.github.com/users/mvhaasteren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvhaasteren/subscriptions","organizations_url":"https://api.github.com/users/mvhaasteren/orgs","repos_url":"https://api.github.com/users/mvhaasteren/repos","events_url":"https://api.github.com/users/mvhaasteren/events{/privacy}","received_events_url":"https://api.github.com/users/mvhaasteren/received_events","type":"User","site_admin":false},"body":"SLIM-434","created_at":"2016-02-21T15:16:47Z","updated_at":"2016-02-22T14:37:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f95c366a44d1e4bafecb0bcc1221afec72a22bc3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73/commits","review_comments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73/comments","review_comment_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/73/comments","statuses_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/statuses/13543efb025994a5fd705d68b46eb2127f4ace97","head":{"label":"OSGP:SLIM-434-receive-wakeup-sms-notification","ref":"SLIM-434-receive-wakeup-sms-notification","sha":"13543efb025994a5fd705d68b46eb2127f4ace97","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":33675294,"name":"Protocol-Adapter-DLMS","full_name":"OSGP/Protocol-Adapter-DLMS","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Protocol-Adapter-DLMS","description":"Protocol adapter and device simulator for Device Language Message Specification protocol.","fork":false,"url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS","forks_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/forks","keys_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/teams","hooks_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/events","assignees_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/tags","blobs_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/languages","stargazers_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/subscription","commits_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/merges","archive_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/downloads","issues_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/releases{/id}","deployments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/deployments","created_at":"2015-04-09T14:59:22Z","updated_at":"2016-01-13T08:54:07Z","pushed_at":"2016-02-22T14:01:16Z","git_url":"git://github.com/OSGP/Protocol-Adapter-DLMS.git","ssh_url":"git@github.com:OSGP/Protocol-Adapter-DLMS.git","clone_url":"https://github.com/OSGP/Protocol-Adapter-DLMS.git","svn_url":"https://github.com/OSGP/Protocol-Adapter-DLMS","homepage":"","size":7919,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"development"}},"base":{"label":"OSGP:development","ref":"development","sha":"4aeec7b1c87ac6c8b8b7bcd2860679b3afa49863","user":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"repo":{"id":33675294,"name":"Protocol-Adapter-DLMS","full_name":"OSGP/Protocol-Adapter-DLMS","owner":{"login":"OSGP","id":11352045,"avatar_url":"https://avatars.githubusercontent.com/u/11352045?v=3","gravatar_id":"","url":"https://api.github.com/users/OSGP","html_url":"https://github.com/OSGP","followers_url":"https://api.github.com/users/OSGP/followers","following_url":"https://api.github.com/users/OSGP/following{/other_user}","gists_url":"https://api.github.com/users/OSGP/gists{/gist_id}","starred_url":"https://api.github.com/users/OSGP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OSGP/subscriptions","organizations_url":"https://api.github.com/users/OSGP/orgs","repos_url":"https://api.github.com/users/OSGP/repos","events_url":"https://api.github.com/users/OSGP/events{/privacy}","received_events_url":"https://api.github.com/users/OSGP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OSGP/Protocol-Adapter-DLMS","description":"Protocol adapter and device simulator for Device Language Message Specification protocol.","fork":false,"url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS","forks_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/forks","keys_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/teams","hooks_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/hooks","issue_events_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/events{/number}","events_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/events","assignees_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/assignees{/user}","branches_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/branches{/branch}","tags_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/tags","blobs_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/refs{/sha}","trees_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/statuses/{sha}","languages_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/languages","stargazers_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/stargazers","contributors_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/contributors","subscribers_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/subscribers","subscription_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/subscription","commits_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/commits{/sha}","git_commits_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/git/commits{/sha}","comments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/comments{/number}","issue_comment_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/comments{/number}","contents_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/contents/{+path}","compare_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/merges","archive_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/downloads","issues_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues{/number}","pulls_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls{/number}","milestones_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/milestones{/number}","notifications_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/labels{/name}","releases_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/releases{/id}","deployments_url":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/deployments","created_at":"2015-04-09T14:59:22Z","updated_at":"2016-01-13T08:54:07Z","pushed_at":"2016-02-22T14:01:16Z","git_url":"git://github.com/OSGP/Protocol-Adapter-DLMS.git","ssh_url":"git@github.com:OSGP/Protocol-Adapter-DLMS.git","clone_url":"https://github.com/OSGP/Protocol-Adapter-DLMS.git","svn_url":"https://github.com/OSGP/Protocol-Adapter-DLMS","homepage":"","size":7919,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73"},"html":{"href":"https://github.com/OSGP/Protocol-Adapter-DLMS/pull/73"},"issue":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/73"},"comments":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/issues/73/comments"},"review_comments":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73/comments"},"review_comment":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/pulls/73/commits"},"statuses":{"href":"https://api.github.com/repos/OSGP/Protocol-Adapter-DLMS/statuses/13543efb025994a5fd705d68b46eb2127f4ace97"}}}}