{"action":"created","comment":{"url":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments/212932205","pull_request_review_id":149659069,"id":212932205,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjkzMjIwNQ==","diff_hunk":"@@ -0,0 +1,160 @@\n+import canopen\n+import sys\n+import os\n+import traceback\n+\n+from canopen import Node402, Network\n+\n+import time\n+\n+try:\n+\n+    # Start with creating a network representing one CAN bus\n+    network = canopen.Network()\n+\n+    # Connect to the CAN bus\n+    network.connect(bustype='kvaser', channel=0, bitrate=1000000)\n+\n+    network.check()\n+\n+    # Add some nodes with corresponding Object Dictionaries\n+    node = Node402(35, '/home/andre/Code/test/jupiter.eds')\n+    network.add_node(node)\n+    # network.add_node(34, '/home/andre/Code/test/jupiter.eds')\n+    # node = network[34]\n+\n+    # Reset network\n+    # node.nmt.state = 'RESET COMMUNICATION'\n+    node.nmt.state = 'RESET'\n+    node.nmt.wait_for_bootup(15)\n+\n+    print 'node state 1) = {0}'.format(node.nmt.state)\n+\n+    # Iterate over arrays or records\n+    error_log = node.sdo[0x1003]\n+    for error in error_log.values():\n+        print(\"Error {0} was found in the log\".format(error.raw))\n+\n+    for node_id in network:\n+        print(network[node_id])","path":"examples/simple_ds402_node.py","position":39,"original_position":39,"commit_id":"0fa8b3b67e5d4e64a906e19161900d27c59b563c","original_commit_id":"0fa8b3b67e5d4e64a906e19161900d27c59b563c","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: [Unnecessary parens after 'print' keyword](https://app.codacy.com/app/christiansandberg/canopen/pullRequest?prid=2090496)","created_at":"2018-08-27T10:27:49Z","updated_at":"2018-08-27T10:27:49Z","html_url":"https://github.com/christiansandberg/canopen/pull/105#discussion_r212932205","pull_request_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/105","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments/212932205"},"html":{"href":"https://github.com/christiansandberg/canopen/pull/105#discussion_r212932205"},"pull_request":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/105"}}},"pull_request":{"url":"https://api.github.com/repos/christiansandberg/canopen/pulls/105","id":210719877,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwNzE5ODc3","html_url":"https://github.com/christiansandberg/canopen/pull/105","diff_url":"https://github.com/christiansandberg/canopen/pull/105.diff","patch_url":"https://github.com/christiansandberg/canopen/pull/105.patch","issue_url":"https://api.github.com/repos/christiansandberg/canopen/issues/105","number":105,"state":"open","locked":false,"title":"Rearrange the way PDO's are mapped and added load OD from file to node","user":{"login":"af-silva","id":11874980,"node_id":"MDQ6VXNlcjExODc0OTgw","avatar_url":"https://avatars2.githubusercontent.com/u/11874980?v=4","gravatar_id":"","url":"https://api.github.com/users/af-silva","html_url":"https://github.com/af-silva","followers_url":"https://api.github.com/users/af-silva/followers","following_url":"https://api.github.com/users/af-silva/following{/other_user}","gists_url":"https://api.github.com/users/af-silva/gists{/gist_id}","starred_url":"https://api.github.com/users/af-silva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/af-silva/subscriptions","organizations_url":"https://api.github.com/users/af-silva/orgs","repos_url":"https://api.github.com/users/af-silva/repos","events_url":"https://api.github.com/users/af-silva/events{/privacy}","received_events_url":"https://api.github.com/users/af-silva/received_events","type":"User","site_admin":false},"body":"Rearrange the way PDO's are mapped and also put them in the same package \"pdo\". I follow the same approach used with the SDO's and created the RPDO and TPDO objects (specializations of the base class PDO), this way I think it is more clear the access of the objects instead of the PDO.rx[1] we use the TPDO[1] to access the Transmit PDO 1. To achieve this I have to refactor some code.\r\n\r\nIn the class remote I added the functionality to load the values stored in the EDS file. I don't load the default values, only the parameter values defined by the user, I think is safer this way since the default values should not be touch by the user in the file since they are the values loaded by the manufacture.\r\n\r\nI'm open for suggestions, this is still work in progress but I would appreciate some input from you guys @christiansandberg @TobiasPleyer.\r\n\r\n@TobiasPleyer I'm looking at some code you have done and I will try to used it in this implementation.\r\n\r\nThis is being tested with real hardware and so far so good.\r\n\r\nThanks.","created_at":"2018-08-24T11:57:29Z","updated_at":"2018-08-27T10:27:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"573b52b8dddc40da5c00f98fc15b97aec82621ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/105/commits","review_comments_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/105/comments","review_comment_url":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/christiansandberg/canopen/issues/105/comments","statuses_url":"https://api.github.com/repos/christiansandberg/canopen/statuses/0fa8b3b67e5d4e64a906e19161900d27c59b563c","head":{"label":"Introsys:master","ref":"master","sha":"0fa8b3b67e5d4e64a906e19161900d27c59b563c","user":{"login":"Introsys","id":6554789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/6554789?v=4","gravatar_id":"","url":"https://api.github.com/users/Introsys","html_url":"https://github.com/Introsys","followers_url":"https://api.github.com/users/Introsys/followers","following_url":"https://api.github.com/users/Introsys/following{/other_user}","gists_url":"https://api.github.com/users/Introsys/gists{/gist_id}","starred_url":"https://api.github.com/users/Introsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Introsys/subscriptions","organizations_url":"https://api.github.com/users/Introsys/orgs","repos_url":"https://api.github.com/users/Introsys/repos","events_url":"https://api.github.com/users/Introsys/events{/privacy}","received_events_url":"https://api.github.com/users/Introsys/received_events","type":"Organization","site_admin":false},"repo":{"id":143851708,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NTE3MDg=","name":"canopen","full_name":"Introsys/canopen","owner":{"login":"Introsys","id":6554789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NTQ3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/6554789?v=4","gravatar_id":"","url":"https://api.github.com/users/Introsys","html_url":"https://github.com/Introsys","followers_url":"https://api.github.com/users/Introsys/followers","following_url":"https://api.github.com/users/Introsys/following{/other_user}","gists_url":"https://api.github.com/users/Introsys/gists{/gist_id}","starred_url":"https://api.github.com/users/Introsys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Introsys/subscriptions","organizations_url":"https://api.github.com/users/Introsys/orgs","repos_url":"https://api.github.com/users/Introsys/repos","events_url":"https://api.github.com/users/Introsys/events{/privacy}","received_events_url":"https://api.github.com/users/Introsys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Introsys/canopen","description":"CANopen for Python","fork":true,"url":"https://api.github.com/repos/Introsys/canopen","forks_url":"https://api.github.com/repos/Introsys/canopen/forks","keys_url":"https://api.github.com/repos/Introsys/canopen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Introsys/canopen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Introsys/canopen/teams","hooks_url":"https://api.github.com/repos/Introsys/canopen/hooks","issue_events_url":"https://api.github.com/repos/Introsys/canopen/issues/events{/number}","events_url":"https://api.github.com/repos/Introsys/canopen/events","assignees_url":"https://api.github.com/repos/Introsys/canopen/assignees{/user}","branches_url":"https://api.github.com/repos/Introsys/canopen/branches{/branch}","tags_url":"https://api.github.com/repos/Introsys/canopen/tags","blobs_url":"https://api.github.com/repos/Introsys/canopen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Introsys/canopen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Introsys/canopen/git/refs{/sha}","trees_url":"https://api.github.com/repos/Introsys/canopen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Introsys/canopen/statuses/{sha}","languages_url":"https://api.github.com/repos/Introsys/canopen/languages","stargazers_url":"https://api.github.com/repos/Introsys/canopen/stargazers","contributors_url":"https://api.github.com/repos/Introsys/canopen/contributors","subscribers_url":"https://api.github.com/repos/Introsys/canopen/subscribers","subscription_url":"https://api.github.com/repos/Introsys/canopen/subscription","commits_url":"https://api.github.com/repos/Introsys/canopen/commits{/sha}","git_commits_url":"https://api.github.com/repos/Introsys/canopen/git/commits{/sha}","comments_url":"https://api.github.com/repos/Introsys/canopen/comments{/number}","issue_comment_url":"https://api.github.com/repos/Introsys/canopen/issues/comments{/number}","contents_url":"https://api.github.com/repos/Introsys/canopen/contents/{+path}","compare_url":"https://api.github.com/repos/Introsys/canopen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Introsys/canopen/merges","archive_url":"https://api.github.com/repos/Introsys/canopen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Introsys/canopen/downloads","issues_url":"https://api.github.com/repos/Introsys/canopen/issues{/number}","pulls_url":"https://api.github.com/repos/Introsys/canopen/pulls{/number}","milestones_url":"https://api.github.com/repos/Introsys/canopen/milestones{/number}","notifications_url":"https://api.github.com/repos/Introsys/canopen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Introsys/canopen/labels{/name}","releases_url":"https://api.github.com/repos/Introsys/canopen/releases{/id}","deployments_url":"https://api.github.com/repos/Introsys/canopen/deployments","created_at":"2018-08-07T09:36:33Z","updated_at":"2018-08-27T10:23:59Z","pushed_at":"2018-08-27T10:24:19Z","git_url":"git://github.com/Introsys/canopen.git","ssh_url":"git@github.com:Introsys/canopen.git","clone_url":"https://github.com/Introsys/canopen.git","svn_url":"https://github.com/Introsys/canopen","homepage":"http://canopen.readthedocs.io/","size":496,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"christiansandberg:master","ref":"master","sha":"793de1036eabb371a6f882fa1e7bed5fa1775f39","user":{"login":"christiansandberg","id":3647996,"node_id":"MDQ6VXNlcjM2NDc5OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3647996?v=4","gravatar_id":"","url":"https://api.github.com/users/christiansandberg","html_url":"https://github.com/christiansandberg","followers_url":"https://api.github.com/users/christiansandberg/followers","following_url":"https://api.github.com/users/christiansandberg/following{/other_user}","gists_url":"https://api.github.com/users/christiansandberg/gists{/gist_id}","starred_url":"https://api.github.com/users/christiansandberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiansandberg/subscriptions","organizations_url":"https://api.github.com/users/christiansandberg/orgs","repos_url":"https://api.github.com/users/christiansandberg/repos","events_url":"https://api.github.com/users/christiansandberg/events{/privacy}","received_events_url":"https://api.github.com/users/christiansandberg/received_events","type":"User","site_admin":false},"repo":{"id":68737600,"node_id":"MDEwOlJlcG9zaXRvcnk2ODczNzYwMA==","name":"canopen","full_name":"christiansandberg/canopen","owner":{"login":"christiansandberg","id":3647996,"node_id":"MDQ6VXNlcjM2NDc5OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3647996?v=4","gravatar_id":"","url":"https://api.github.com/users/christiansandberg","html_url":"https://github.com/christiansandberg","followers_url":"https://api.github.com/users/christiansandberg/followers","following_url":"https://api.github.com/users/christiansandberg/following{/other_user}","gists_url":"https://api.github.com/users/christiansandberg/gists{/gist_id}","starred_url":"https://api.github.com/users/christiansandberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiansandberg/subscriptions","organizations_url":"https://api.github.com/users/christiansandberg/orgs","repos_url":"https://api.github.com/users/christiansandberg/repos","events_url":"https://api.github.com/users/christiansandberg/events{/privacy}","received_events_url":"https://api.github.com/users/christiansandberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christiansandberg/canopen","description":"CANopen for Python","fork":false,"url":"https://api.github.com/repos/christiansandberg/canopen","forks_url":"https://api.github.com/repos/christiansandberg/canopen/forks","keys_url":"https://api.github.com/repos/christiansandberg/canopen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christiansandberg/canopen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christiansandberg/canopen/teams","hooks_url":"https://api.github.com/repos/christiansandberg/canopen/hooks","issue_events_url":"https://api.github.com/repos/christiansandberg/canopen/issues/events{/number}","events_url":"https://api.github.com/repos/christiansandberg/canopen/events","assignees_url":"https://api.github.com/repos/christiansandberg/canopen/assignees{/user}","branches_url":"https://api.github.com/repos/christiansandberg/canopen/branches{/branch}","tags_url":"https://api.github.com/repos/christiansandberg/canopen/tags","blobs_url":"https://api.github.com/repos/christiansandberg/canopen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christiansandberg/canopen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christiansandberg/canopen/git/refs{/sha}","trees_url":"https://api.github.com/repos/christiansandberg/canopen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christiansandberg/canopen/statuses/{sha}","languages_url":"https://api.github.com/repos/christiansandberg/canopen/languages","stargazers_url":"https://api.github.com/repos/christiansandberg/canopen/stargazers","contributors_url":"https://api.github.com/repos/christiansandberg/canopen/contributors","subscribers_url":"https://api.github.com/repos/christiansandberg/canopen/subscribers","subscription_url":"https://api.github.com/repos/christiansandberg/canopen/subscription","commits_url":"https://api.github.com/repos/christiansandberg/canopen/commits{/sha}","git_commits_url":"https://api.github.com/repos/christiansandberg/canopen/git/commits{/sha}","comments_url":"https://api.github.com/repos/christiansandberg/canopen/comments{/number}","issue_comment_url":"https://api.github.com/repos/christiansandberg/canopen/issues/comments{/number}","contents_url":"https://api.github.com/repos/christiansandberg/canopen/contents/{+path}","compare_url":"https://api.github.com/repos/christiansandberg/canopen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christiansandberg/canopen/merges","archive_url":"https://api.github.com/repos/christiansandberg/canopen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christiansandberg/canopen/downloads","issues_url":"https://api.github.com/repos/christiansandberg/canopen/issues{/number}","pulls_url":"https://api.github.com/repos/christiansandberg/canopen/pulls{/number}","milestones_url":"https://api.github.com/repos/christiansandberg/canopen/milestones{/number}","notifications_url":"https://api.github.com/repos/christiansandberg/canopen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christiansandberg/canopen/labels{/name}","releases_url":"https://api.github.com/repos/christiansandberg/canopen/releases{/id}","deployments_url":"https://api.github.com/repos/christiansandberg/canopen/deployments","created_at":"2016-09-20T17:42:18Z","updated_at":"2018-08-22T08:01:15Z","pushed_at":"2018-08-27T10:24:20Z","git_url":"git://github.com/christiansandberg/canopen.git","ssh_url":"git@github.com:christiansandberg/canopen.git","clone_url":"https://github.com/christiansandberg/canopen.git","svn_url":"https://github.com/christiansandberg/canopen","homepage":"http://canopen.readthedocs.io/","size":412,"stargazers_count":73,"watchers_count":73,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":37,"open_issues":16,"watchers":73,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/105"},"html":{"href":"https://github.com/christiansandberg/canopen/pull/105"},"issue":{"href":"https://api.github.com/repos/christiansandberg/canopen/issues/105"},"comments":{"href":"https://api.github.com/repos/christiansandberg/canopen/issues/105/comments"},"review_comments":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/105/comments"},"review_comment":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/christiansandberg/canopen/pulls/105/commits"},"statuses":{"href":"https://api.github.com/repos/christiansandberg/canopen/statuses/0fa8b3b67e5d4e64a906e19161900d27c59b563c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}