pygpibtoolkit/HP8904.py

Wed, 18 Mar 2009 00:26:27 +0100

author
David Douard <david.douard@logilab.fr>
date
Wed, 18 Mar 2009 00:26:27 +0100
changeset 79
b8eec4f9db52
child 80
89e31bd2524b
permissions
-rw-r--r--

many improvements:
- in gpibcontroler system (it begins to work fine),
- add HP3456A description module,
- add an almost empty HP8904A description module,
- add forgotten files (tests, mockups)

79
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
1 # This program is free software; you can redistribute it and/or modify it under
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
2 # the terms of the GNU General Public License as published by the Free Software
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
3 # Foundation; either version 2 of the License, or (at your option) any later
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
4 # version.
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
5 #
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
6 # This program is distributed in the hope that it will be useful, but WITHOUT
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
7 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
8 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
9 #
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
10 # You should have received a copy of the GNU General Public License along with
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
11 # this program; if not, write to the Free Software Foundation, Inc.,
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
12 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
13 """ Copyright (c) 2007-2009 David Douard (Paris, FRANCE).
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
14 http://www.logilab.org/project/pygpibtoolkit -- mailto:david.douard@logilab.fr
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
15
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
16 """
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
17 import mx.DateTime as dt
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
18
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
19 from pygpibtoolkit.pygpib import Constants, Command
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
20 from pygpibtoolkit.pygpib import Mode, ModeCommand
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
21 from pygpibtoolkit.pygpib import WriteOnlyMode
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
22 from pygpibtoolkit.gpibcontroller import AbstractGPIBDevice, deviceRegister
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
23
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
24
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
25
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
26 class HP8904Device(AbstractGPIBDevice):
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
27 _accepts = ["^(?P<model>HP *8904A).*$",]
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
28 _idn = "ID"
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
29
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
30 def __init__(self, idn, address, controller):
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
31 super(HP8904Device, self).__init__(idn, address, controller)
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
32
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
33
b8eec4f9db52 many improvements:
David Douard <david.douard@logilab.fr>
parents:
diff changeset
34 deviceRegister.register_manager(HP8904Device)

mercurial