Skip to content

Commit

Permalink
docs: add some more docstrings to DMM, nicked from the Confluence page
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-marshall-amp committed Jul 19, 2024
1 parent fd9b8e8 commit dfdf87f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/fixate/drivers/dmm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""
dmm is the digital multimeter driver.
Use dmm.open to connect to a connected digital multi meter
Functions are dictacted by the metaclass in helper.py
Use dmm.open to connect to a connected digital multimeter.
Functions are dictated by the abstract superclass ``DMM`` in helper.py
dmm.measure(*mode, **mode_params)
dmm.reset()
::
dmm.measure(*mode, **mode_params)
dmm.reset()
"""
import pyvisa

Expand All @@ -18,6 +20,9 @@


def open() -> DMM:
"""
Connect to a digital multimeter.
"""
for DMM in (Fluke8846A, Keithley6500):
instrument = find_instrument_by_id(DMM.REGEX_ID)
if instrument is not None:
Expand Down
20 changes: 20 additions & 0 deletions src/fixate/drivers/dmm/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,44 @@ def measurement(self, delay=None):
raise NotImplementedError

def voltage_ac(self, _range=None):
"""
Sets the DMM in AC voltage measurement mode and puts it in the range given
by the argument _range. Signals expected to be measured must be < _range.
"""
raise NotImplementedError

def voltage_dc(self, _range=None, auto_impedance=False):
"""
Sets the DMM in DC voltage measurement mode and puts it in the range given
by the argument _range. Signals expected to be measured must be < _range.
"""
raise NotImplementedError

def current_ac(self, _range):
raise NotImplementedError

def current_dc(self, _range):
"""
Sets the DMM in DC current measurement mode and puts it in the range given
by the argument _range. Signals expected to be measured must be < _range.
"""
raise NotImplementedError

def resistance(self, _range=None):
"""
Sets the DMM in 2-wire resistance measurement mode and puts it in the range
given by the argument _range. Signals expected to be measured must be < _range.
"""
raise NotImplementedError

def frequency(self, _range=None):
raise NotImplementedError

def fresistance(self, _range=None):
"""
Sets the DMM in 4-wire resistance measurement mode and puts it in the range
given by the argument _range. Signals expected to be measured must be < _range.
"""
raise NotImplementedError

def period(self, _range=None):
Expand Down

0 comments on commit dfdf87f

Please sign in to comment.