diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-01 11:26:39 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-01 11:26:39 -0500 |
commit | 9f1c2db9d296dc17f86e1f22634a14063b1d0a72 (patch) | |
tree | 1b50709ed0ef78888bcb61e2b0e97ec6916589a8 /hardware/scope/__init__.py | |
parent | 642c6f937a2826cb92b8f83b5b61a4c17d551e2c (diff) | |
download | qolab-9f1c2db9d296dc17f86e1f22634a14063b1d0a72.tar.gz qolab-9f1c2db9d296dc17f86e1f22634a14063b1d0a72.zip |
improve hardware definitions
Diffstat (limited to 'hardware/scope/__init__.py')
-rw-r--r-- | hardware/scope/__init__.py | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/hardware/scope/__init__.py b/hardware/scope/__init__.py index e6b6573..23462a7 100644 --- a/hardware/scope/__init__.py +++ b/hardware/scope/__init__.py @@ -2,21 +2,30 @@ Provide basic class to operate scope Created by Eugeniy E. Mikhailov 2021/11/29 """ -import scpi +from hardware.scpi import SCPIinstr -class Scope(scpi.SCPIinstr): - """ - Do not instantiate directly, use - rm = pyvisa.ResourceManager() - Scope(rm.open_resource('TCPIP::192.168.0.2::INSTR')) - """ +class Scope: # Minimal set of methods to be implemented by a scope. # Should work with minimal arguments list # but might be faster if parameters provided: less IO requests + def __init__(self): + self.numberOfChannels = 0 + def getTrace(self, chNum, availableNpnts=None, maxRequiredPoints=None): warnings.warn( 'this function is not implemented' ) +class ScopeSCPI(SCPIinstr, Scope): + """ + Do not instantiate directly, use + rm = pyvisa.ResourceManager() + ScopeSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR')) + """ + pass + def __init__(self, resource): + SCPIinstr.__init__(self, resource) + Scope.__init__(self) + from .sds1104x import SDS1104X |