{"action":"created","comment":{"url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments/208723743","pull_request_review_id":144591754,"id":208723743,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODcyMzc0Mw==","diff_hunk":"@@ -269,6 +269,168 @@ The vendor specific details are embedded in the cams\n .. inheritance-diagram:: ophyd.areadetector.cam.CamBase ophyd.areadetector.cam.AdscDetectorCam ophyd.areadetector.cam.Andor3DetectorCam ophyd.areadetector.cam.AndorDetectorCam ophyd.areadetector.cam.BrukerDetectorCam ophyd.areadetector.cam.FirewireLinDetectorCam ophyd.areadetector.cam.FirewireWinDetectorCam ophyd.areadetector.cam.LightFieldDetectorCam ophyd.areadetector.cam.Mar345DetectorCam ophyd.areadetector.cam.MarCCDDetectorCam ophyd.areadetector.cam.PSLDetectorCam ophyd.areadetector.cam.PcoDetectorCam ophyd.areadetector.cam.PcoDetectorIO ophyd.areadetector.cam.PcoDetectorSimIO ophyd.areadetector.cam.PerkinElmerDetectorCam ophyd.areadetector.cam.PilatusDetectorCam ophyd.areadetector.cam.PixiradDetectorCam ophyd.areadetector.cam.PointGreyDetectorCam ophyd.areadetector.cam.ProsilicaDetectorCam ophyd.areadetector.cam.PvcamDetectorCam ophyd.areadetector.cam.RoperDetectorCam ophyd.areadetector.cam.SimDetectorCam ophyd.areadetector.cam.URLDetectorCam\n    :parts: 1\n \n+Custom Devices\n+==============\n+For custom hardware based on area-detector it may be necesary to add a custom\n+device class (for custom plugins see section below). The new class should\n+inherit from ``ophyd.areadetector.base.ADbase`` and should have the following\n+PV structure:\n+\n+.. code-block:: python\n+\n+    PV = Areadetector_device_PV_prefix:(Plugin_suffix or attribute_suffix)\n+\n+As an example, for the builtin areadetector 'stats' class this looks like:\n+\n+.. code-block:: python\n+\n+    Areadetector_device_PV_suffix:Stats\n+\n+And for the builtin areadetector 'color mode' attribute it looks like:\n+\n+.. code-block:: python\n+\n+    Areadetector_device_PV_suffix:ColorMode_RBV\n+\n+where ``Areadetector_device_PV_suffix`` is the PV name for the Area detector\n+device, ``plugin_suffix = Stats`` is the 'stats' Plugin suffix and\n+``attribute_suffix = ColorMode_RBV`` is the'color mode' attribute suffix.\n+\n+In order to create the class then the following code is required (where ``XXX``\n+is the name of the device):\n+\n+.. code-block:: python\n+\n+    from ophyd.areadetector.base import ADComponent as ADCpt, ad_group,\n+                                        EpicsSignalWithRBV\n+    from ophyd.signal import EpicsSignal, EpicsSignalRO\n+    from ophyd.device import DynamicDeviceComponent as DDCpt\n+    from ophyd.detectors import DetectorBase\n+\n+    Class XXX('optional trigger mixin, 'DetectorBase):\n+        '''An areadetector device class for ......'''\n+        _suffix_re = '\"Areadetector_suffix\"\\d:'\n+\n+        # ADD ATTRIBUTES AS COMPONENTS HERE USING THE SYNTAX\n+        attribute_name = Cpt(Type, attribute_suffix)\n+            # where 'Type' is EpicsSignal, EpicsSignalRO, EpicsSignalWithRBV,..\n+\n+        # ADD ATTRIBUTE GROUPS AS COMPONENTS USING THE SYNTAX\n+        group_name = DDCpt(ad_group(Type,\n+                                    (attribute_1_name, attribute_1_suffix),\n+                                    (attribute_2_name, attribute_2_suffix),\n+                                    ...................\n+                                    (attribute_n_name, attribute_n_suffix))\n+\n+        # ADD ATTRIBUTE PLUGINS AS COMPONENTS USING THE SYNTAX\n+        plugin_name = Cpt(PluginClass, suffix = Plugin_suffix+':')\n+\n+\n+.. note::\n+    1. DetectorBase can be swapped out for any other Areadetector Device\n+    class that inherits from DetectorBase. Also an optional trigger_mixin\n+    class can be specifed (trigger_mixin classes must be listed first).\n+\n+    2. Component (Cpt) can be replaced with ADComponent(ADCpt) if this is a\n+    builtin areadetector component as this includes the possibility of using\n+    the Areadetector documentation.\n+\n+    3. PluginClass can be PluginBase, CamBase or any plugin/cam class that\n+    inherits from either of these.\n+\n+\n+\n+The Areadetector device should then be instantiated using:\n+\n+.. code-block:: python\n+\n+    ADdevice_name = Some_Areadetector_Device_Class(Areadetector_device_PV_suffix,\n+                                                  name = 'ADdevice_name')\n+\n+\n+Custom Plugins or Cameras\n+=========================\n+For custom hardware based on area-detector it may be necesary to add a custom\n+plugin or camera class, this section will cover what is required. Both\n+'plugins' and 'cameras' act in the same way, but have slightly different 'base'\n+attributes, hence they have different 'base classes'. New Plugin classes should\n+inherit from ``ophyd.areadetector.base.PluginBase`` while new Camera classes\n+should inherit from ``ophyd.areadetector.cam.CamBase``. Both should have the\n+following PV structure (replace 'plugin' with 'cam' for cameras):\n+\n+.. code-block:: python\n+\n+    PV = Areadetector_device_PV_prefix:Plugin_suffix:attribute_suffix","path":"doc/source/area-detector.rst","position":95,"original_position":95,"commit_id":"81530e529c84ff40fd055d066cea29b71acfa0cf","original_commit_id":"81530e529c84ff40fd055d066cea29b71acfa0cf","user":{"login":"danielballan","id":2279598,"node_id":"MDQ6VXNlcjIyNzk1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2279598?v=4","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"body":"needs quotes","created_at":"2018-08-08T20:27:14Z","updated_at":"2018-08-08T20:34:18Z","html_url":"https://github.com/NSLS-II/ophyd/pull/595#discussion_r208723743","pull_request_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments/208723743"},"html":{"href":"https://github.com/NSLS-II/ophyd/pull/595#discussion_r208723743"},"pull_request":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595"}}},"pull_request":{"url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595","id":207019987,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MDE5OTg3","html_url":"https://github.com/NSLS-II/ophyd/pull/595","diff_url":"https://github.com/NSLS-II/ophyd/pull/595.diff","patch_url":"https://github.com/NSLS-II/ophyd/pull/595.patch","issue_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/595","number":595,"state":"open","locked":false,"title":"Adplugin docs update","user":{"login":"awalter-bnl","id":25772709,"node_id":"MDQ6VXNlcjI1NzcyNzA5","avatar_url":"https://avatars3.githubusercontent.com/u/25772709?v=4","gravatar_id":"","url":"https://api.github.com/users/awalter-bnl","html_url":"https://github.com/awalter-bnl","followers_url":"https://api.github.com/users/awalter-bnl/followers","following_url":"https://api.github.com/users/awalter-bnl/following{/other_user}","gists_url":"https://api.github.com/users/awalter-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/awalter-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalter-bnl/subscriptions","organizations_url":"https://api.github.com/users/awalter-bnl/orgs","repos_url":"https://api.github.com/users/awalter-bnl/repos","events_url":"https://api.github.com/users/awalter-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/awalter-bnl/received_events","type":"User","site_admin":false},"body":"I have added sections on creating custom AD device and plugin classes. This is based on my experience writing a new plugin class and reading through the docs/ code. There may be things I have wrong please check that it makes sense prior to merging.","created_at":"2018-08-08T14:06:03Z","updated_at":"2018-08-08T20:34:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4c64219f45519a577ae2be1a153015268f20d0b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595/commits","review_comments_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595/comments","review_comment_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/595/comments","statuses_url":"https://api.github.com/repos/NSLS-II/ophyd/statuses/81530e529c84ff40fd055d066cea29b71acfa0cf","head":{"label":"awalter-bnl:ADplugin_docs","ref":"ADplugin_docs","sha":"81530e529c84ff40fd055d066cea29b71acfa0cf","user":{"login":"awalter-bnl","id":25772709,"node_id":"MDQ6VXNlcjI1NzcyNzA5","avatar_url":"https://avatars3.githubusercontent.com/u/25772709?v=4","gravatar_id":"","url":"https://api.github.com/users/awalter-bnl","html_url":"https://github.com/awalter-bnl","followers_url":"https://api.github.com/users/awalter-bnl/followers","following_url":"https://api.github.com/users/awalter-bnl/following{/other_user}","gists_url":"https://api.github.com/users/awalter-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/awalter-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalter-bnl/subscriptions","organizations_url":"https://api.github.com/users/awalter-bnl/orgs","repos_url":"https://api.github.com/users/awalter-bnl/repos","events_url":"https://api.github.com/users/awalter-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/awalter-bnl/received_events","type":"User","site_admin":false},"repo":{"id":134284792,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQyODQ3OTI=","name":"ophyd","full_name":"awalter-bnl/ophyd","owner":{"login":"awalter-bnl","id":25772709,"node_id":"MDQ6VXNlcjI1NzcyNzA5","avatar_url":"https://avatars3.githubusercontent.com/u/25772709?v=4","gravatar_id":"","url":"https://api.github.com/users/awalter-bnl","html_url":"https://github.com/awalter-bnl","followers_url":"https://api.github.com/users/awalter-bnl/followers","following_url":"https://api.github.com/users/awalter-bnl/following{/other_user}","gists_url":"https://api.github.com/users/awalter-bnl/gists{/gist_id}","starred_url":"https://api.github.com/users/awalter-bnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalter-bnl/subscriptions","organizations_url":"https://api.github.com/users/awalter-bnl/orgs","repos_url":"https://api.github.com/users/awalter-bnl/repos","events_url":"https://api.github.com/users/awalter-bnl/events{/privacy}","received_events_url":"https://api.github.com/users/awalter-bnl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/awalter-bnl/ophyd","description":"Python/EPICS-based device abstraction","fork":true,"url":"https://api.github.com/repos/awalter-bnl/ophyd","forks_url":"https://api.github.com/repos/awalter-bnl/ophyd/forks","keys_url":"https://api.github.com/repos/awalter-bnl/ophyd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awalter-bnl/ophyd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awalter-bnl/ophyd/teams","hooks_url":"https://api.github.com/repos/awalter-bnl/ophyd/hooks","issue_events_url":"https://api.github.com/repos/awalter-bnl/ophyd/issues/events{/number}","events_url":"https://api.github.com/repos/awalter-bnl/ophyd/events","assignees_url":"https://api.github.com/repos/awalter-bnl/ophyd/assignees{/user}","branches_url":"https://api.github.com/repos/awalter-bnl/ophyd/branches{/branch}","tags_url":"https://api.github.com/repos/awalter-bnl/ophyd/tags","blobs_url":"https://api.github.com/repos/awalter-bnl/ophyd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awalter-bnl/ophyd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awalter-bnl/ophyd/git/refs{/sha}","trees_url":"https://api.github.com/repos/awalter-bnl/ophyd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awalter-bnl/ophyd/statuses/{sha}","languages_url":"https://api.github.com/repos/awalter-bnl/ophyd/languages","stargazers_url":"https://api.github.com/repos/awalter-bnl/ophyd/stargazers","contributors_url":"https://api.github.com/repos/awalter-bnl/ophyd/contributors","subscribers_url":"https://api.github.com/repos/awalter-bnl/ophyd/subscribers","subscription_url":"https://api.github.com/repos/awalter-bnl/ophyd/subscription","commits_url":"https://api.github.com/repos/awalter-bnl/ophyd/commits{/sha}","git_commits_url":"https://api.github.com/repos/awalter-bnl/ophyd/git/commits{/sha}","comments_url":"https://api.github.com/repos/awalter-bnl/ophyd/comments{/number}","issue_comment_url":"https://api.github.com/repos/awalter-bnl/ophyd/issues/comments{/number}","contents_url":"https://api.github.com/repos/awalter-bnl/ophyd/contents/{+path}","compare_url":"https://api.github.com/repos/awalter-bnl/ophyd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awalter-bnl/ophyd/merges","archive_url":"https://api.github.com/repos/awalter-bnl/ophyd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awalter-bnl/ophyd/downloads","issues_url":"https://api.github.com/repos/awalter-bnl/ophyd/issues{/number}","pulls_url":"https://api.github.com/repos/awalter-bnl/ophyd/pulls{/number}","milestones_url":"https://api.github.com/repos/awalter-bnl/ophyd/milestones{/number}","notifications_url":"https://api.github.com/repos/awalter-bnl/ophyd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awalter-bnl/ophyd/labels{/name}","releases_url":"https://api.github.com/repos/awalter-bnl/ophyd/releases{/id}","deployments_url":"https://api.github.com/repos/awalter-bnl/ophyd/deployments","created_at":"2018-05-21T15:03:50Z","updated_at":"2018-06-19T14:45:21Z","pushed_at":"2018-08-08T17:21:09Z","git_url":"git://github.com/awalter-bnl/ophyd.git","ssh_url":"git@github.com:awalter-bnl/ophyd.git","clone_url":"https://github.com/awalter-bnl/ophyd.git","svn_url":"https://github.com/awalter-bnl/ophyd","homepage":"http://nsls-ii.github.io/ophyd","size":2495,"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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NSLS-II:master","ref":"master","sha":"c5fa9538749ac3f7e1a805200b2dcf9d84ed6973","user":{"login":"NSLS-II","id":8700262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3MDAyNjI=","avatar_url":"https://avatars3.githubusercontent.com/u/8700262?v=4","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"repo":{"id":26235440,"node_id":"MDEwOlJlcG9zaXRvcnkyNjIzNTQ0MA==","name":"ophyd","full_name":"NSLS-II/ophyd","owner":{"login":"NSLS-II","id":8700262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3MDAyNjI=","avatar_url":"https://avatars3.githubusercontent.com/u/8700262?v=4","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSLS-II/ophyd","description":"Python/EPICS-based device abstraction","fork":false,"url":"https://api.github.com/repos/NSLS-II/ophyd","forks_url":"https://api.github.com/repos/NSLS-II/ophyd/forks","keys_url":"https://api.github.com/repos/NSLS-II/ophyd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSLS-II/ophyd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSLS-II/ophyd/teams","hooks_url":"https://api.github.com/repos/NSLS-II/ophyd/hooks","issue_events_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/events{/number}","events_url":"https://api.github.com/repos/NSLS-II/ophyd/events","assignees_url":"https://api.github.com/repos/NSLS-II/ophyd/assignees{/user}","branches_url":"https://api.github.com/repos/NSLS-II/ophyd/branches{/branch}","tags_url":"https://api.github.com/repos/NSLS-II/ophyd/tags","blobs_url":"https://api.github.com/repos/NSLS-II/ophyd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSLS-II/ophyd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSLS-II/ophyd/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSLS-II/ophyd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSLS-II/ophyd/statuses/{sha}","languages_url":"https://api.github.com/repos/NSLS-II/ophyd/languages","stargazers_url":"https://api.github.com/repos/NSLS-II/ophyd/stargazers","contributors_url":"https://api.github.com/repos/NSLS-II/ophyd/contributors","subscribers_url":"https://api.github.com/repos/NSLS-II/ophyd/subscribers","subscription_url":"https://api.github.com/repos/NSLS-II/ophyd/subscription","commits_url":"https://api.github.com/repos/NSLS-II/ophyd/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSLS-II/ophyd/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSLS-II/ophyd/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSLS-II/ophyd/contents/{+path}","compare_url":"https://api.github.com/repos/NSLS-II/ophyd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSLS-II/ophyd/merges","archive_url":"https://api.github.com/repos/NSLS-II/ophyd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSLS-II/ophyd/downloads","issues_url":"https://api.github.com/repos/NSLS-II/ophyd/issues{/number}","pulls_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls{/number}","milestones_url":"https://api.github.com/repos/NSLS-II/ophyd/milestones{/number}","notifications_url":"https://api.github.com/repos/NSLS-II/ophyd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSLS-II/ophyd/labels{/name}","releases_url":"https://api.github.com/repos/NSLS-II/ophyd/releases{/id}","deployments_url":"https://api.github.com/repos/NSLS-II/ophyd/deployments","created_at":"2014-11-05T19:20:01Z","updated_at":"2018-08-08T11:22:15Z","pushed_at":"2018-08-08T17:21:10Z","git_url":"git://github.com/NSLS-II/ophyd.git","ssh_url":"git@github.com:NSLS-II/ophyd.git","clone_url":"https://github.com/NSLS-II/ophyd.git","svn_url":"https://github.com/NSLS-II/ophyd","homepage":"http://nsls-ii.github.io/ophyd","size":2442,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":28,"open_issues":65,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595"},"html":{"href":"https://github.com/NSLS-II/ophyd/pull/595"},"issue":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/595"},"comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/595/comments"},"review_comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595/comments"},"review_comment":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/595/commits"},"statuses":{"href":"https://api.github.com/repos/NSLS-II/ophyd/statuses/81530e529c84ff40fd055d066cea29b71acfa0cf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"danielballan"}}