{"action":"created","comment":{"url":"https://api.github.com/repos/ska-sa/corr2/pulls/comments/40909734","id":40909734,"diff_hunk":"@@ -150,36 +157,63 @@ def __init__(self, host, katcp_port=7147, boffile=None, connect=True, config=Non\n             self.min_load_time = None\n             self.network_latency_adjust = None\n \n+        self._pfb_of_counts = {}\n+        self._ct_counts = {}\n+        self._qdr_counts = {}\n+\n     @classmethod\n     def from_config_source(cls, hostname, katcp_port, config_source):\n         boffile = config_source['bitstream']\n         return cls(hostname, katcp_port=katcp_port, boffile=boffile,\n                    connect=True, config=config_source)\n \n-    def ct_okay(self, sleeptime=1):\n+    def ct_okay(self, wait_time=1):\n         \"\"\"\n-        Is the corner turner working?\n-        :return: True or False,\n+        Checks if the corner turner working.\n+        :param: wait_time : Float or None : If not None, fetch ct counter,\n+            wait this long, and fetch a second value; Else, use last read value\n+            from cache. Value is not cached if wait_time is None.\n+        :return: bool : True, if corner tuner is okay","path":"src/fhost_fpga.py","position":58,"original_position":58,"commit_id":"72aa2c836a6d0c758dc525a5405596fa814ce703","original_commit_id":"72aa2c836a6d0c758dc525a5405596fa814ce703","user":{"login":"brickZA","id":630432,"avatar_url":"https://avatars.githubusercontent.com/u/630432?v=3","gravatar_id":"","url":"https://api.github.com/users/brickZA","html_url":"https://github.com/brickZA","followers_url":"https://api.github.com/users/brickZA/followers","following_url":"https://api.github.com/users/brickZA/following{/other_user}","gists_url":"https://api.github.com/users/brickZA/gists{/gist_id}","starred_url":"https://api.github.com/users/brickZA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brickZA/subscriptions","organizations_url":"https://api.github.com/users/brickZA/orgs","repos_url":"https://api.github.com/users/brickZA/repos","events_url":"https://api.github.com/users/brickZA/events{/privacy}","received_events_url":"https://api.github.com/users/brickZA/received_events","type":"User","site_admin":false},"body":"I guess the idea is to have no side effect if someone specifies a wait\ntime. Perhaps I'm overthinking things? Removing that logic would make the\ncode simpler too which is always a good thing :)\n\nOn Thu, Oct 1, 2015 at 2:48 PM, paulprozesky <notifications@github.com>\nwrote:\n\n> In src/fhost_fpga.py\n> <https://github.com/ska-sa/corr2/pull/92#discussion_r40908739>:\n>\n> >          \"\"\"\n> > -        Is the corner turner working?\n> > -        :return: True or False,\n> > +        Checks if the corner turner working.\n> > +        :param: wait_time : Float or None : If not None, fetch ct counter,\n> > +            wait this long, and fetch a second value; Else, use last read value\n> > +            from cache. Value is not cached if wait_time is None.\n> > +        :return: bool : True, if corner tuner is okay\n>\n> In addition, why not cache when a wait_time is used? Just always cache the\n> last read value.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/ska-sa/corr2/pull/92/files#r40908739>.\n>\n","created_at":"2015-10-01T12:59:52Z","updated_at":"2015-10-01T12:59:52Z","html_url":"https://github.com/ska-sa/corr2/pull/92#discussion_r40909734","pull_request_url":"https://api.github.com/repos/ska-sa/corr2/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/comments/40909734"},"html":{"href":"https://github.com/ska-sa/corr2/pull/92#discussion_r40909734"},"pull_request":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/ska-sa/corr2/pulls/92","id":46408112,"html_url":"https://github.com/ska-sa/corr2/pull/92","diff_url":"https://github.com/ska-sa/corr2/pull/92.diff","patch_url":"https://github.com/ska-sa/corr2/pull/92.patch","issue_url":"https://api.github.com/repos/ska-sa/corr2/issues/92","number":92,"state":"open","locked":false,"title":"Status polling","user":{"login":"mmphego","id":7910856,"avatar_url":"https://avatars.githubusercontent.com/u/7910856?v=3","gravatar_id":"","url":"https://api.github.com/users/mmphego","html_url":"https://github.com/mmphego","followers_url":"https://api.github.com/users/mmphego/followers","following_url":"https://api.github.com/users/mmphego/following{/other_user}","gists_url":"https://api.github.com/users/mmphego/gists{/gist_id}","starred_url":"https://api.github.com/users/mmphego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmphego/subscriptions","organizations_url":"https://api.github.com/users/mmphego/orgs","repos_url":"https://api.github.com/users/mmphego/repos","events_url":"https://api.github.com/users/mmphego/events{/privacy}","received_events_url":"https://api.github.com/users/mmphego/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-30T14:23:56Z","updated_at":"2015-10-01T12:59:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4780e99ea53e607a7bfb14eedea81c2379072e2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ska-sa/corr2/pulls/92/commits","review_comments_url":"https://api.github.com/repos/ska-sa/corr2/pulls/92/comments","review_comment_url":"https://api.github.com/repos/ska-sa/corr2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ska-sa/corr2/issues/92/comments","statuses_url":"https://api.github.com/repos/ska-sa/corr2/statuses/72aa2c836a6d0c758dc525a5405596fa814ce703","head":{"label":"ska-sa:status-polling","ref":"status-polling","sha":"72aa2c836a6d0c758dc525a5405596fa814ce703","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":16940616,"name":"corr2","full_name":"ska-sa/corr2","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/corr2","description":"","fork":false,"url":"https://api.github.com/repos/ska-sa/corr2","forks_url":"https://api.github.com/repos/ska-sa/corr2/forks","keys_url":"https://api.github.com/repos/ska-sa/corr2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/corr2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/corr2/teams","hooks_url":"https://api.github.com/repos/ska-sa/corr2/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/corr2/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/corr2/events","assignees_url":"https://api.github.com/repos/ska-sa/corr2/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/corr2/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/corr2/tags","blobs_url":"https://api.github.com/repos/ska-sa/corr2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/corr2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/corr2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/corr2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/corr2/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/corr2/languages","stargazers_url":"https://api.github.com/repos/ska-sa/corr2/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/corr2/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/corr2/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/corr2/subscription","commits_url":"https://api.github.com/repos/ska-sa/corr2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/corr2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/corr2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/corr2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/corr2/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/corr2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/corr2/merges","archive_url":"https://api.github.com/repos/ska-sa/corr2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/corr2/downloads","issues_url":"https://api.github.com/repos/ska-sa/corr2/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/corr2/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/corr2/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/corr2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/corr2/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/corr2/releases{/id}","created_at":"2014-02-18T07:30:28Z","updated_at":"2015-07-07T12:29:07Z","pushed_at":"2015-10-01T11:20:09Z","git_url":"git://github.com/ska-sa/corr2.git","ssh_url":"git@github.com:ska-sa/corr2.git","clone_url":"https://github.com/ska-sa/corr2.git","svn_url":"https://github.com/ska-sa/corr2","homepage":null,"size":2771,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"ska-sa:devel","ref":"devel","sha":"bcef427321d2d6c846578b1242a282dadbe9592f","user":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"repo":{"id":16940616,"name":"corr2","full_name":"ska-sa/corr2","owner":{"login":"ska-sa","id":1210238,"avatar_url":"https://avatars.githubusercontent.com/u/1210238?v=3","gravatar_id":"","url":"https://api.github.com/users/ska-sa","html_url":"https://github.com/ska-sa","followers_url":"https://api.github.com/users/ska-sa/followers","following_url":"https://api.github.com/users/ska-sa/following{/other_user}","gists_url":"https://api.github.com/users/ska-sa/gists{/gist_id}","starred_url":"https://api.github.com/users/ska-sa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ska-sa/subscriptions","organizations_url":"https://api.github.com/users/ska-sa/orgs","repos_url":"https://api.github.com/users/ska-sa/repos","events_url":"https://api.github.com/users/ska-sa/events{/privacy}","received_events_url":"https://api.github.com/users/ska-sa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ska-sa/corr2","description":"","fork":false,"url":"https://api.github.com/repos/ska-sa/corr2","forks_url":"https://api.github.com/repos/ska-sa/corr2/forks","keys_url":"https://api.github.com/repos/ska-sa/corr2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ska-sa/corr2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ska-sa/corr2/teams","hooks_url":"https://api.github.com/repos/ska-sa/corr2/hooks","issue_events_url":"https://api.github.com/repos/ska-sa/corr2/issues/events{/number}","events_url":"https://api.github.com/repos/ska-sa/corr2/events","assignees_url":"https://api.github.com/repos/ska-sa/corr2/assignees{/user}","branches_url":"https://api.github.com/repos/ska-sa/corr2/branches{/branch}","tags_url":"https://api.github.com/repos/ska-sa/corr2/tags","blobs_url":"https://api.github.com/repos/ska-sa/corr2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ska-sa/corr2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ska-sa/corr2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ska-sa/corr2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ska-sa/corr2/statuses/{sha}","languages_url":"https://api.github.com/repos/ska-sa/corr2/languages","stargazers_url":"https://api.github.com/repos/ska-sa/corr2/stargazers","contributors_url":"https://api.github.com/repos/ska-sa/corr2/contributors","subscribers_url":"https://api.github.com/repos/ska-sa/corr2/subscribers","subscription_url":"https://api.github.com/repos/ska-sa/corr2/subscription","commits_url":"https://api.github.com/repos/ska-sa/corr2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ska-sa/corr2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ska-sa/corr2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ska-sa/corr2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ska-sa/corr2/contents/{+path}","compare_url":"https://api.github.com/repos/ska-sa/corr2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ska-sa/corr2/merges","archive_url":"https://api.github.com/repos/ska-sa/corr2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ska-sa/corr2/downloads","issues_url":"https://api.github.com/repos/ska-sa/corr2/issues{/number}","pulls_url":"https://api.github.com/repos/ska-sa/corr2/pulls{/number}","milestones_url":"https://api.github.com/repos/ska-sa/corr2/milestones{/number}","notifications_url":"https://api.github.com/repos/ska-sa/corr2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ska-sa/corr2/labels{/name}","releases_url":"https://api.github.com/repos/ska-sa/corr2/releases{/id}","created_at":"2014-02-18T07:30:28Z","updated_at":"2015-07-07T12:29:07Z","pushed_at":"2015-10-01T11:20:09Z","git_url":"git://github.com/ska-sa/corr2.git","ssh_url":"git@github.com:ska-sa/corr2.git","clone_url":"https://github.com/ska-sa/corr2.git","svn_url":"https://github.com/ska-sa/corr2","homepage":null,"size":2771,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/92"},"html":{"href":"https://github.com/ska-sa/corr2/pull/92"},"issue":{"href":"https://api.github.com/repos/ska-sa/corr2/issues/92"},"comments":{"href":"https://api.github.com/repos/ska-sa/corr2/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ska-sa/corr2/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/ska-sa/corr2/statuses/72aa2c836a6d0c758dc525a5405596fa814ce703"}}}}