{"action":"created","issue":{"url":"https://api.github.com/repos/labrad/pylabrad/issues/126","labels_url":"https://api.github.com/repos/labrad/pylabrad/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/labrad/pylabrad/issues/126/comments","events_url":"https://api.github.com/repos/labrad/pylabrad/issues/126/events","html_url":"https://github.com/labrad/pylabrad/issues/126","id":91954092,"number":126,"title":"Registering a non-standard identification function","user":{"login":"zibrov-zlobin","id":3323701,"avatar_url":"https://avatars.githubusercontent.com/u/3323701?v=3","gravatar_id":"","url":"https://api.github.com/users/zibrov-zlobin","html_url":"https://github.com/zibrov-zlobin","followers_url":"https://api.github.com/users/zibrov-zlobin/followers","following_url":"https://api.github.com/users/zibrov-zlobin/following{/other_user}","gists_url":"https://api.github.com/users/zibrov-zlobin/gists{/gist_id}","starred_url":"https://api.github.com/users/zibrov-zlobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zibrov-zlobin/subscriptions","organizations_url":"https://api.github.com/users/zibrov-zlobin/orgs","repos_url":"https://api.github.com/users/zibrov-zlobin/repos","events_url":"https://api.github.com/users/zibrov-zlobin/events{/privacy}","received_events_url":"https://api.github.com/users/zibrov-zlobin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-30T01:45:13Z","updated_at":"2015-06-30T20:31:25Z","closed_at":null,"body":"We have an Amatek Lock-in. Instead of the standard \"*IDN?\" command the identification command is : \"ID\". \r\nThe \"gpib_device_manager.py\" has a method `register_ident_function()` that has the setting defined as `setting = ['s','w']`.\r\nAs I understand, I should be able to register a new function by connecting to the server and invoking this method. \r\n```python\r\nimport labrad\r\ncxn  = labrad.connect()\r\ncxn.gpib_device_manager.register_ident_function(\"AMATEK Lock-in Server, GPIB0::12::INST\")=[]\r\n```\r\nwhere \"AMATEK Lock-in Server\" is the name of the device server running and connected to the LabRAD manager.\r\nbut where do I provide the new call signatures? And why isnt' the float ('w') required in the setting? \r\nis this  function registration supposed to be added as a client in the device server? \r\n\r\nI guess I don't understand the `@setting` decorator and the datatypes. Any method that has a \"setting=\" is expecting a list? e.g.\r\n```python\r\n@setting(101,'FuncName', setting=['s','w'])\r\ndef method1(self,c,setting):\r\n    pass\r\n```\r\ndoes it mean that to invoke the method I would do: `method1(c,[\"bla\",\"45.0\"])` ?"},"comment":{"url":"https://api.github.com/repos/labrad/pylabrad/issues/comments/117332771","html_url":"https://github.com/labrad/pylabrad/issues/126#issuecomment-117332771","issue_url":"https://api.github.com/repos/labrad/pylabrad/issues/126","id":117332771,"user":{"login":"maffoo","id":129268,"avatar_url":"https://avatars.githubusercontent.com/u/129268?v=3","gravatar_id":"","url":"https://api.github.com/users/maffoo","html_url":"https://github.com/maffoo","followers_url":"https://api.github.com/users/maffoo/followers","following_url":"https://api.github.com/users/maffoo/following{/other_user}","gists_url":"https://api.github.com/users/maffoo/gists{/gist_id}","starred_url":"https://api.github.com/users/maffoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maffoo/subscriptions","organizations_url":"https://api.github.com/users/maffoo/orgs","repos_url":"https://api.github.com/users/maffoo/repos","events_url":"https://api.github.com/users/maffoo/events{/privacy}","received_events_url":"https://api.github.com/users/maffoo/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T20:31:25Z","updated_at":"2015-06-30T20:31:25Z","body":"The idea here is that you need to write a new server to manage the gpib communication with your amatek lock-in devices. Your server registers with the gpib_device_manager that it can handle certain devices, but the gpib_device_manager itself handles identifying all the available gpib devices, and then notifying registered servers when it has found them. For non-standard cases, your server can implement its own identification logic as a setting that the gpib_device_manager will call when it finds devices devices that do not respond to `*IDN?` queries, for example. The best way to make this work is to have your server subclass `labrad.gpib.GPIBManagedServer`. The documentation for implementing such a server, and for how the interaction with the gpib_device_manager works, needs to be improved. Also, we should probably pull the gpib stuff out of labrad and into its own labrad-gpib package along with the gpib_device_manager in the servers repo, because the gpib stuff is not really usable without the device manager and vice versa. \r\n\r\n"}}