{"action":"created","comment":{"url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments/44907524","id":44907524,"diff_hunk":"@@ -125,38 +173,428 @@ def handle_packet_loss(self, packet_id, loss_type, main_event_loop):\n         :param MainEventLoop main_event_loop: main Event loop for further\n         Event scheduling.\n         \"\"\"\n-        pass\n+        logger.debug(\"Flow %s lost packet %d due via PacketLossType %d\",\n+                     self.flow_id, packet_id, loss_type)\n \n     @abstractmethod\n-    def handle_packet_success(self, packet_id):\n+    def handle_packet_success(self, packet, statistics, curr_time):\n         \"\"\"\n         A handler for dealing with packets that successfully completed a\n         round trip. This will adjust window sizes and make other state\n-        changes, depending on the TCP congestion algorithm.\n-        :param packet_id: ID of packet that completed a round trip\n+        changes, depending on the TCP congestion algorithm. It will also\n+        update common metadata and statistics.\n+\n+        The sending of additional Packets (e.g. if the window size is grown)\n+        must be handled elsewhere, since this can be subclass-dependent.\n+        :param Packet packet: The AckPacket that completed a round trip.\n+        :param Statistics statistics: The Statistics to update.\n+        :param float curr_time: The current simulation time (in seconds).\n         \"\"\"\n-        pass\n+        assert isinstance(packet, AckPacket)","path":"network_simulator/flow.py","position":163,"original_position":163,"commit_id":"823bbd8ecc6661ceeca9df7331db31e4088e491b","original_commit_id":"823bbd8ecc6661ceeca9df7331db31e4088e491b","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"body":"That is intended. Flows should only handle AckPackets; DataPackets are handled at-Host and the Host itself generates an ACK and sends it back. So if this condition is not met, the simulation should fail.\r\n\r\nEven if it does fail, though, the AssertionError will trigger Statistics to be outputted (after we update MainEventLoop).","created_at":"2015-11-16T10:25:56Z","updated_at":"2015-11-16T10:25:56Z","html_url":"https://github.com/lakshbhasin/network_simulator/pull/14#discussion_r44907524","pull_request_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments/44907524"},"html":{"href":"https://github.com/lakshbhasin/network_simulator/pull/14#discussion_r44907524"},"pull_request":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14","id":50720610,"html_url":"https://github.com/lakshbhasin/network_simulator/pull/14","diff_url":"https://github.com/lakshbhasin/network_simulator/pull/14.diff","patch_url":"https://github.com/lakshbhasin/network_simulator/pull/14.patch","issue_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/14","number":14,"state":"open","locked":false,"title":"Laksh flow subclasses","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"body":"Initial PR for TCP FAST, TCP Reno, and the Dummy Flow implementation. Note that this PR also contains bug fixes for FlowCompleteEvent and timeouts, as well as other refactoring.","created_at":"2015-11-14T09:56:54Z","updated_at":"2015-11-16T10:25:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a7308537dd5e4453ee4e4cb0f07b3c179d60031","assignee":{"login":"sharonyang","id":6145451,"avatar_url":"https://avatars.githubusercontent.com/u/6145451?v=3","gravatar_id":"","url":"https://api.github.com/users/sharonyang","html_url":"https://github.com/sharonyang","followers_url":"https://api.github.com/users/sharonyang/followers","following_url":"https://api.github.com/users/sharonyang/following{/other_user}","gists_url":"https://api.github.com/users/sharonyang/gists{/gist_id}","starred_url":"https://api.github.com/users/sharonyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharonyang/subscriptions","organizations_url":"https://api.github.com/users/sharonyang/orgs","repos_url":"https://api.github.com/users/sharonyang/repos","events_url":"https://api.github.com/users/sharonyang/events{/privacy}","received_events_url":"https://api.github.com/users/sharonyang/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14/commits","review_comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14/comments","review_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/14/comments","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/823bbd8ecc6661ceeca9df7331db31e4088e491b","head":{"label":"lakshbhasin:laksh-flow-subclasses","ref":"laksh-flow-subclasses","sha":"823bbd8ecc6661ceeca9df7331db31e4088e491b","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"repo":{"id":44171299,"name":"network_simulator","full_name":"lakshbhasin/network_simulator","owner":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakshbhasin/network_simulator","description":"A network simulator for the project portion of CS 143","fork":false,"url":"https://api.github.com/repos/lakshbhasin/network_simulator","forks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/forks","keys_url":"https://api.github.com/repos/lakshbhasin/network_simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakshbhasin/network_simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakshbhasin/network_simulator/teams","hooks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/hooks","issue_events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/events{/number}","events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/events","assignees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/assignees{/user}","branches_url":"https://api.github.com/repos/lakshbhasin/network_simulator/branches{/branch}","tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/tags","blobs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/lakshbhasin/network_simulator/languages","stargazers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/stargazers","contributors_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contributors","subscribers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscribers","subscription_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscription","commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contents/{+path}","compare_url":"https://api.github.com/repos/lakshbhasin/network_simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakshbhasin/network_simulator/merges","archive_url":"https://api.github.com/repos/lakshbhasin/network_simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakshbhasin/network_simulator/downloads","issues_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues{/number}","pulls_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/lakshbhasin/network_simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/lakshbhasin/network_simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakshbhasin/network_simulator/labels{/name}","releases_url":"https://api.github.com/repos/lakshbhasin/network_simulator/releases{/id}","created_at":"2015-10-13T11:21:24Z","updated_at":"2015-10-25T21:16:11Z","pushed_at":"2015-11-16T09:23:59Z","git_url":"git://github.com/lakshbhasin/network_simulator.git","ssh_url":"git@github.com:lakshbhasin/network_simulator.git","clone_url":"https://github.com/lakshbhasin/network_simulator.git","svn_url":"https://github.com/lakshbhasin/network_simulator","homepage":null,"size":400,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"lakshbhasin:master","ref":"master","sha":"653b526943cdf5d1a3c5cf7a2f9a3d02385adb2d","user":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"repo":{"id":44171299,"name":"network_simulator","full_name":"lakshbhasin/network_simulator","owner":{"login":"lakshbhasin","id":1183879,"avatar_url":"https://avatars.githubusercontent.com/u/1183879?v=3","gravatar_id":"","url":"https://api.github.com/users/lakshbhasin","html_url":"https://github.com/lakshbhasin","followers_url":"https://api.github.com/users/lakshbhasin/followers","following_url":"https://api.github.com/users/lakshbhasin/following{/other_user}","gists_url":"https://api.github.com/users/lakshbhasin/gists{/gist_id}","starred_url":"https://api.github.com/users/lakshbhasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lakshbhasin/subscriptions","organizations_url":"https://api.github.com/users/lakshbhasin/orgs","repos_url":"https://api.github.com/users/lakshbhasin/repos","events_url":"https://api.github.com/users/lakshbhasin/events{/privacy}","received_events_url":"https://api.github.com/users/lakshbhasin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lakshbhasin/network_simulator","description":"A network simulator for the project portion of CS 143","fork":false,"url":"https://api.github.com/repos/lakshbhasin/network_simulator","forks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/forks","keys_url":"https://api.github.com/repos/lakshbhasin/network_simulator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lakshbhasin/network_simulator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lakshbhasin/network_simulator/teams","hooks_url":"https://api.github.com/repos/lakshbhasin/network_simulator/hooks","issue_events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/events{/number}","events_url":"https://api.github.com/repos/lakshbhasin/network_simulator/events","assignees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/assignees{/user}","branches_url":"https://api.github.com/repos/lakshbhasin/network_simulator/branches{/branch}","tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/tags","blobs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/refs{/sha}","trees_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/{sha}","languages_url":"https://api.github.com/repos/lakshbhasin/network_simulator/languages","stargazers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/stargazers","contributors_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contributors","subscribers_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscribers","subscription_url":"https://api.github.com/repos/lakshbhasin/network_simulator/subscription","commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/commits{/sha}","git_commits_url":"https://api.github.com/repos/lakshbhasin/network_simulator/git/commits{/sha}","comments_url":"https://api.github.com/repos/lakshbhasin/network_simulator/comments{/number}","issue_comment_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/comments{/number}","contents_url":"https://api.github.com/repos/lakshbhasin/network_simulator/contents/{+path}","compare_url":"https://api.github.com/repos/lakshbhasin/network_simulator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lakshbhasin/network_simulator/merges","archive_url":"https://api.github.com/repos/lakshbhasin/network_simulator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lakshbhasin/network_simulator/downloads","issues_url":"https://api.github.com/repos/lakshbhasin/network_simulator/issues{/number}","pulls_url":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls{/number}","milestones_url":"https://api.github.com/repos/lakshbhasin/network_simulator/milestones{/number}","notifications_url":"https://api.github.com/repos/lakshbhasin/network_simulator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lakshbhasin/network_simulator/labels{/name}","releases_url":"https://api.github.com/repos/lakshbhasin/network_simulator/releases{/id}","created_at":"2015-10-13T11:21:24Z","updated_at":"2015-10-25T21:16:11Z","pushed_at":"2015-11-16T09:23:59Z","git_url":"git://github.com/lakshbhasin/network_simulator.git","ssh_url":"git@github.com:lakshbhasin/network_simulator.git","clone_url":"https://github.com/lakshbhasin/network_simulator.git","svn_url":"https://github.com/lakshbhasin/network_simulator","homepage":null,"size":400,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14"},"html":{"href":"https://github.com/lakshbhasin/network_simulator/pull/14"},"issue":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/14"},"comments":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/lakshbhasin/network_simulator/statuses/823bbd8ecc6661ceeca9df7331db31e4088e491b"}}}}