diff options
author | Hernan Grecco <hernan.grecco@gmail.com> | 2015-01-27 09:45:07 -0300 |
---|---|---|
committer | Hernan Grecco <hernan.grecco@gmail.com> | 2015-01-27 09:45:07 -0300 |
commit | d5b5913bc13e92a9dd37c14213f67347cc4ce11c (patch) | |
tree | b3123c3be7820c5503373f21e99383edb534d00e | |
parent | 117cf590ad5572eb987fa698b007ac07cb1de851 (diff) |
Added support for Rohde and Schwarz Device via Passport
See #115
-rw-r--r-- | pyvisa/constants.py | 3 | ||||
-rw-r--r-- | pyvisa/resources/messagebased.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pyvisa/constants.py b/pyvisa/constants.py index bb61bd5..9fc8f1c 100644 --- a/pyvisa/constants.py +++ b/pyvisa/constants.py @@ -670,6 +670,9 @@ class InterfaceType(enum.IntEnum): #: Firewire device. firewire = VI_INTF_FIREWIRE + #: Rohde and Schwarz Device via Passport + rsnrp = 33024 + class AddressState(enum.IntEnum): diff --git a/pyvisa/resources/messagebased.py b/pyvisa/resources/messagebased.py index 89c71e4..8832e7e 100644 --- a/pyvisa/resources/messagebased.py +++ b/pyvisa/resources/messagebased.py @@ -509,3 +509,7 @@ class MessageBasedResource(Resource): self.set_visa_attribute(constants.VI_ATTR_TERMCHAR, ord(new_termination[-1])) yield self.set_visa_attribute(constants.VI_ATTR_TERMCHAR, term) + + +# Rohde and Schwarz Device via Passport. Not sure which Resource should be. +MessageBasedResource.register(constants.InterfaceType.rsnrp, 'INSTR')(MessageBasedResource) |