Skip to content

Commit

Permalink
Document agent API in action class docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jlashner committed Oct 23, 2024
1 parent ec84008 commit 9b6052a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
5 changes: 4 additions & 1 deletion docs/agents/lakeshore240.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ client that sets Channel 1 of a 240 to read a diode::
Agent API
---------

.. autoclass:: socs.agents.lakeshore240.agent.LS240_Agent
.. autoclass:: socs.agents.lakeshore240.agent.UploadCalCurve
:members:

.. autoclass:: socs.agents.lakeshore240.agent.SetValues
:members:

Supporting APIs
Expand Down
29 changes: 22 additions & 7 deletions socs/agents/lakeshore240/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ def process(self, module: Module) -> None:

@dataclass
class UploadCalCurve(LS240Action):
"""upload_cal_curve(channel, filename)
"""
**OCS Task**
Action class to Upload a calibration curve to a channel. This is an OCS
Task that can be run through a client as follows::
**Task** - Upload a calibration curve to a channel.
>> client.upload_cal_curve(channel=channel, filename=filename)
Args
------
Expand All @@ -40,7 +44,6 @@ class UploadCalCurve(LS240Action):
filename (str):
Filename for calibration curve.
"""

channel: int
filename: str

Expand All @@ -53,10 +56,22 @@ def process(self, module: Module) -> None:

@dataclass
class SetValues(LS240Action):
"""set_values(channel, sensor=None, auto_range=None, range=None,\
current_reversal=None, units=None, enabled=None, name=None)
**Task** - Set sensor parameters for a Lakeshore240 Channel.
"""
**OCS TASK**
Action class for setting sensor parameters for a Lakeshore240 Channel.
This can be called through an OCS client using::
>> client.set_values(
channel=channel,
sensor=sensor,
auto_range=auto_range,
range=range,
current_reversal=current_reversal,
units=units,
enabled=enabled,
name=name,
)
Args
---------
Expand Down

0 comments on commit 9b6052a

Please sign in to comment.