{"action":"created","issue":{"url":"https://api.github.com/repos/sebi2k1/node-can/issues/41","repository_url":"https://api.github.com/repos/sebi2k1/node-can","labels_url":"https://api.github.com/repos/sebi2k1/node-can/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/sebi2k1/node-can/issues/41/comments","events_url":"https://api.github.com/repos/sebi2k1/node-can/issues/41/events","html_url":"https://github.com/sebi2k1/node-can/issues/41","id":272377240,"node_id":"MDU6SXNzdWUyNzIzNzcyNDA=","number":41,"title":"Example code fails - Cannot read property 'signals' of undefined","user":{"login":"tmlbl","id":6007526,"node_id":"MDQ6VXNlcjYwMDc1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/6007526?v=4","gravatar_id":"","url":"https://api.github.com/users/tmlbl","html_url":"https://github.com/tmlbl","followers_url":"https://api.github.com/users/tmlbl/followers","following_url":"https://api.github.com/users/tmlbl/following{/other_user}","gists_url":"https://api.github.com/users/tmlbl/gists{/gist_id}","starred_url":"https://api.github.com/users/tmlbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmlbl/subscriptions","organizations_url":"https://api.github.com/users/tmlbl/orgs","repos_url":"https://api.github.com/users/tmlbl/repos","events_url":"https://api.github.com/users/tmlbl/events{/privacy}","received_events_url":"https://api.github.com/users/tmlbl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-08T22:45:07Z","updated_at":"2018-12-16T10:32:35Z","closed_at":"2018-12-16T10:32:35Z","author_association":"NONE","body":"I am running the example from the README and running into an issue.\r\n\r\nIt looks like the code is expecting `db.messages` to be a map, but mine is a long array with many null fields, and the message descriptions as JSON objects in the array. It appears to be an issue with the parser, since I can get the example working by doing the following (excuse the `this` as this is in a class method):\r\n\r\n```javascript\r\nthis.network = can.parseNetworkDescription(\r\n    \"node_modules/socketcan/samples/can_definition_sample.kcd\");\r\nthis.channel = can.createRawChannel(\"vcan0\");\r\nthis.db = new can.DatabaseService(\r\n    this.channel, \r\n    this.network.buses['Motor']\r\n);\r\nthis.channel.start();\r\n\r\nthis.db.messages.find(m => m && m.name == 'Emission')\r\n    .signals['Enginespeed'].onUpdate(s => {\r\n        console.log('Enginespeed', s.value);\r\n    });\r\n\r\nthis.db.messages.find(m => m && m.name == 'Emission')\r\n    .signals['Enginespeed'].update(80);\r\n```\r\n\r\nBut obviously this is not the intended API.\r\n"},"comment":{"url":"https://api.github.com/repos/sebi2k1/node-can/issues/comments/447632334","html_url":"https://github.com/sebi2k1/node-can/issues/41#issuecomment-447632334","issue_url":"https://api.github.com/repos/sebi2k1/node-can/issues/41","id":447632334,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzYzMjMzNA==","user":{"login":"sebi2k1","id":1223463,"node_id":"MDQ6VXNlcjEyMjM0NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1223463?v=4","gravatar_id":"","url":"https://api.github.com/users/sebi2k1","html_url":"https://github.com/sebi2k1","followers_url":"https://api.github.com/users/sebi2k1/followers","following_url":"https://api.github.com/users/sebi2k1/following{/other_user}","gists_url":"https://api.github.com/users/sebi2k1/gists{/gist_id}","starred_url":"https://api.github.com/users/sebi2k1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebi2k1/subscriptions","organizations_url":"https://api.github.com/users/sebi2k1/orgs","repos_url":"https://api.github.com/users/sebi2k1/repos","events_url":"https://api.github.com/users/sebi2k1/events{/privacy}","received_events_url":"https://api.github.com/users/sebi2k1/received_events","type":"User","site_admin":false},"created_at":"2018-12-16T10:32:35Z","updated_at":"2018-12-16T10:32:35Z","author_association":"OWNER","body":"You are right. The example had an issue, the TankController is on instrumentation bus and the db object on motor bus. I fixed the example."}}
{"actor":{"display_login":"sebi2k1"}}