{"action":"opened","number":15,"pull_request":{"url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15","id":45606865,"html_url":"https://github.com/irkenjs/bs2-serialport/pull/15","diff_url":"https://github.com/irkenjs/bs2-serialport/pull/15.diff","patch_url":"https://github.com/irkenjs/bs2-serialport/pull/15.patch","issue_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/15","number":15,"state":"open","locked":false,"title":"Refactor Transport code into separate class, use new setBreak/clearBreak API","user":{"login":"2fast2fourier","id":719569,"avatar_url":"https://avatars.githubusercontent.com/u/719569?v=3","gravatar_id":"","url":"https://api.github.com/users/2fast2fourier","html_url":"https://github.com/2fast2fourier","followers_url":"https://api.github.com/users/2fast2fourier/followers","following_url":"https://api.github.com/users/2fast2fourier/following{/other_user}","gists_url":"https://api.github.com/users/2fast2fourier/gists{/gist_id}","starred_url":"https://api.github.com/users/2fast2fourier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2fast2fourier/subscriptions","organizations_url":"https://api.github.com/users/2fast2fourier/orgs","repos_url":"https://api.github.com/users/2fast2fourier/repos","events_url":"https://api.github.com/users/2fast2fourier/events{/privacy}","received_events_url":"https://api.github.com/users/2fast2fourier/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\nThis PR restructures the transport internals in the protocol, simplifying the protocol by extracting the complicated transport-level logic. This also presents a simplified Transport interface that can be replaced by other serial implementations as needed. The updated transport uses the setBreak/clearBreak APIs (45+) instead of the null-byte workaround.\r\n#### What are the important parts of the code?\r\nProtocol now calls into a separate Transport class (`transport.js`). Transport contains all the internal logic for setting break conditions, switching control states, and sending/receiving data.\r\n#### How should this be tested by the reviewer?\r\nCheck out the `experimental-break` branch in Parallax-IDE, it has the requisite changes needed to run this branch immediately.\r\n#### What are the relevant tickets?\r\nCloses parallaxinc/Parallax-IDE#144\r\nRelated parallaxinc/Parallax-IDE#194","created_at":"2015-09-21T22:10:58Z","updated_at":"2015-09-21T22:10:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"phated","id":992373,"avatar_url":"https://avatars.githubusercontent.com/u/992373?v=3","gravatar_id":"","url":"https://api.github.com/users/phated","html_url":"https://github.com/phated","followers_url":"https://api.github.com/users/phated/followers","following_url":"https://api.github.com/users/phated/following{/other_user}","gists_url":"https://api.github.com/users/phated/gists{/gist_id}","starred_url":"https://api.github.com/users/phated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phated/subscriptions","organizations_url":"https://api.github.com/users/phated/orgs","repos_url":"https://api.github.com/users/phated/repos","events_url":"https://api.github.com/users/phated/events{/privacy}","received_events_url":"https://api.github.com/users/phated/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15/commits","review_comments_url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15/comments","review_comment_url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/comments{/number}","comments_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/15/comments","statuses_url":"https://api.github.com/repos/irkenjs/bs2-serialport/statuses/4d6f3a85558e217453375879d4ff7746f7de2f17","head":{"label":"irkenjs:experimental-break","ref":"experimental-break","sha":"4d6f3a85558e217453375879d4ff7746f7de2f17","user":{"login":"irkenjs","id":12467570,"avatar_url":"https://avatars.githubusercontent.com/u/12467570?v=3","gravatar_id":"","url":"https://api.github.com/users/irkenjs","html_url":"https://github.com/irkenjs","followers_url":"https://api.github.com/users/irkenjs/followers","following_url":"https://api.github.com/users/irkenjs/following{/other_user}","gists_url":"https://api.github.com/users/irkenjs/gists{/gist_id}","starred_url":"https://api.github.com/users/irkenjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irkenjs/subscriptions","organizations_url":"https://api.github.com/users/irkenjs/orgs","repos_url":"https://api.github.com/users/irkenjs/repos","events_url":"https://api.github.com/users/irkenjs/events{/privacy}","received_events_url":"https://api.github.com/users/irkenjs/received_events","type":"Organization","site_admin":false},"repo":{"id":32599463,"name":"bs2-serialport","full_name":"irkenjs/bs2-serialport","owner":{"login":"irkenjs","id":12467570,"avatar_url":"https://avatars.githubusercontent.com/u/12467570?v=3","gravatar_id":"","url":"https://api.github.com/users/irkenjs","html_url":"https://github.com/irkenjs","followers_url":"https://api.github.com/users/irkenjs/followers","following_url":"https://api.github.com/users/irkenjs/following{/other_user}","gists_url":"https://api.github.com/users/irkenjs/gists{/gist_id}","starred_url":"https://api.github.com/users/irkenjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irkenjs/subscriptions","organizations_url":"https://api.github.com/users/irkenjs/orgs","repos_url":"https://api.github.com/users/irkenjs/repos","events_url":"https://api.github.com/users/irkenjs/events{/privacy}","received_events_url":"https://api.github.com/users/irkenjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/irkenjs/bs2-serialport","description":"bs2 wrapper for node-serialport","fork":false,"url":"https://api.github.com/repos/irkenjs/bs2-serialport","forks_url":"https://api.github.com/repos/irkenjs/bs2-serialport/forks","keys_url":"https://api.github.com/repos/irkenjs/bs2-serialport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irkenjs/bs2-serialport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irkenjs/bs2-serialport/teams","hooks_url":"https://api.github.com/repos/irkenjs/bs2-serialport/hooks","issue_events_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/events{/number}","events_url":"https://api.github.com/repos/irkenjs/bs2-serialport/events","assignees_url":"https://api.github.com/repos/irkenjs/bs2-serialport/assignees{/user}","branches_url":"https://api.github.com/repos/irkenjs/bs2-serialport/branches{/branch}","tags_url":"https://api.github.com/repos/irkenjs/bs2-serialport/tags","blobs_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/refs{/sha}","trees_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irkenjs/bs2-serialport/statuses/{sha}","languages_url":"https://api.github.com/repos/irkenjs/bs2-serialport/languages","stargazers_url":"https://api.github.com/repos/irkenjs/bs2-serialport/stargazers","contributors_url":"https://api.github.com/repos/irkenjs/bs2-serialport/contributors","subscribers_url":"https://api.github.com/repos/irkenjs/bs2-serialport/subscribers","subscription_url":"https://api.github.com/repos/irkenjs/bs2-serialport/subscription","commits_url":"https://api.github.com/repos/irkenjs/bs2-serialport/commits{/sha}","git_commits_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/commits{/sha}","comments_url":"https://api.github.com/repos/irkenjs/bs2-serialport/comments{/number}","issue_comment_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/comments{/number}","contents_url":"https://api.github.com/repos/irkenjs/bs2-serialport/contents/{+path}","compare_url":"https://api.github.com/repos/irkenjs/bs2-serialport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irkenjs/bs2-serialport/merges","archive_url":"https://api.github.com/repos/irkenjs/bs2-serialport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irkenjs/bs2-serialport/downloads","issues_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues{/number}","pulls_url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls{/number}","milestones_url":"https://api.github.com/repos/irkenjs/bs2-serialport/milestones{/number}","notifications_url":"https://api.github.com/repos/irkenjs/bs2-serialport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irkenjs/bs2-serialport/labels{/name}","releases_url":"https://api.github.com/repos/irkenjs/bs2-serialport/releases{/id}","created_at":"2015-03-20T18:10:13Z","updated_at":"2015-05-16T00:48:44Z","pushed_at":"2015-09-21T21:42:10Z","git_url":"git://github.com/irkenjs/bs2-serialport.git","ssh_url":"git@github.com:irkenjs/bs2-serialport.git","clone_url":"https://github.com/irkenjs/bs2-serialport.git","svn_url":"https://github.com/irkenjs/bs2-serialport","homepage":null,"size":392,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"irkenjs:master","ref":"master","sha":"51c0f850bd3537970d36cc6af64683eaafa74214","user":{"login":"irkenjs","id":12467570,"avatar_url":"https://avatars.githubusercontent.com/u/12467570?v=3","gravatar_id":"","url":"https://api.github.com/users/irkenjs","html_url":"https://github.com/irkenjs","followers_url":"https://api.github.com/users/irkenjs/followers","following_url":"https://api.github.com/users/irkenjs/following{/other_user}","gists_url":"https://api.github.com/users/irkenjs/gists{/gist_id}","starred_url":"https://api.github.com/users/irkenjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irkenjs/subscriptions","organizations_url":"https://api.github.com/users/irkenjs/orgs","repos_url":"https://api.github.com/users/irkenjs/repos","events_url":"https://api.github.com/users/irkenjs/events{/privacy}","received_events_url":"https://api.github.com/users/irkenjs/received_events","type":"Organization","site_admin":false},"repo":{"id":32599463,"name":"bs2-serialport","full_name":"irkenjs/bs2-serialport","owner":{"login":"irkenjs","id":12467570,"avatar_url":"https://avatars.githubusercontent.com/u/12467570?v=3","gravatar_id":"","url":"https://api.github.com/users/irkenjs","html_url":"https://github.com/irkenjs","followers_url":"https://api.github.com/users/irkenjs/followers","following_url":"https://api.github.com/users/irkenjs/following{/other_user}","gists_url":"https://api.github.com/users/irkenjs/gists{/gist_id}","starred_url":"https://api.github.com/users/irkenjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irkenjs/subscriptions","organizations_url":"https://api.github.com/users/irkenjs/orgs","repos_url":"https://api.github.com/users/irkenjs/repos","events_url":"https://api.github.com/users/irkenjs/events{/privacy}","received_events_url":"https://api.github.com/users/irkenjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/irkenjs/bs2-serialport","description":"bs2 wrapper for node-serialport","fork":false,"url":"https://api.github.com/repos/irkenjs/bs2-serialport","forks_url":"https://api.github.com/repos/irkenjs/bs2-serialport/forks","keys_url":"https://api.github.com/repos/irkenjs/bs2-serialport/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irkenjs/bs2-serialport/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irkenjs/bs2-serialport/teams","hooks_url":"https://api.github.com/repos/irkenjs/bs2-serialport/hooks","issue_events_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/events{/number}","events_url":"https://api.github.com/repos/irkenjs/bs2-serialport/events","assignees_url":"https://api.github.com/repos/irkenjs/bs2-serialport/assignees{/user}","branches_url":"https://api.github.com/repos/irkenjs/bs2-serialport/branches{/branch}","tags_url":"https://api.github.com/repos/irkenjs/bs2-serialport/tags","blobs_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/refs{/sha}","trees_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irkenjs/bs2-serialport/statuses/{sha}","languages_url":"https://api.github.com/repos/irkenjs/bs2-serialport/languages","stargazers_url":"https://api.github.com/repos/irkenjs/bs2-serialport/stargazers","contributors_url":"https://api.github.com/repos/irkenjs/bs2-serialport/contributors","subscribers_url":"https://api.github.com/repos/irkenjs/bs2-serialport/subscribers","subscription_url":"https://api.github.com/repos/irkenjs/bs2-serialport/subscription","commits_url":"https://api.github.com/repos/irkenjs/bs2-serialport/commits{/sha}","git_commits_url":"https://api.github.com/repos/irkenjs/bs2-serialport/git/commits{/sha}","comments_url":"https://api.github.com/repos/irkenjs/bs2-serialport/comments{/number}","issue_comment_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/comments{/number}","contents_url":"https://api.github.com/repos/irkenjs/bs2-serialport/contents/{+path}","compare_url":"https://api.github.com/repos/irkenjs/bs2-serialport/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irkenjs/bs2-serialport/merges","archive_url":"https://api.github.com/repos/irkenjs/bs2-serialport/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irkenjs/bs2-serialport/downloads","issues_url":"https://api.github.com/repos/irkenjs/bs2-serialport/issues{/number}","pulls_url":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls{/number}","milestones_url":"https://api.github.com/repos/irkenjs/bs2-serialport/milestones{/number}","notifications_url":"https://api.github.com/repos/irkenjs/bs2-serialport/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irkenjs/bs2-serialport/labels{/name}","releases_url":"https://api.github.com/repos/irkenjs/bs2-serialport/releases{/id}","created_at":"2015-03-20T18:10:13Z","updated_at":"2015-05-16T00:48:44Z","pushed_at":"2015-09-21T21:42:10Z","git_url":"git://github.com/irkenjs/bs2-serialport.git","ssh_url":"git@github.com:irkenjs/bs2-serialport.git","clone_url":"https://github.com/irkenjs/bs2-serialport.git","svn_url":"https://github.com/irkenjs/bs2-serialport","homepage":null,"size":392,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15"},"html":{"href":"https://github.com/irkenjs/bs2-serialport/pull/15"},"issue":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/15"},"comments":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/irkenjs/bs2-serialport/statuses/4d6f3a85558e217453375879d4ff7746f7de2f17"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":11,"additions":279,"deletions":184,"changed_files":3}}