Skip to content

Commit 54027b0

Browse files
committed
Write docstring for PTC class
1 parent a09ec04 commit 54027b0

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

docs/agents/cryomech_cpa.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,4 @@ Supporting APIs
9191

9292
.. autoclass:: socs.agents.cryomech_cpa.agent.PTC
9393
:members:
94+
:show-inheritance:

socs/agents/cryomech_cpa/drivers.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@
1616

1717

1818
class PTC(TCPInterface):
19+
"""Interface class for connecting to the pulse tube compressor.
20+
21+
Parameters
22+
----------
23+
ip_address : str
24+
IP address of the device.
25+
port : int
26+
Associated port for TCP communication. Default is 502.
27+
timeout : float
28+
Duration in seconds that operations wait before giving up. Default is
29+
10 seconds.
30+
fake_errors : bool
31+
Flag that generates random fake errors if True. Does not generate
32+
errors if False. Defaults to False.
33+
34+
Attributes
35+
----------
36+
comm : socket.socket
37+
Socket object that forms the connection to the compressor.
38+
39+
"""
40+
1941
def __init__(self, ip_address, port=502, timeout=10, fake_errors=False):
2042
self.fake_errors = fake_errors
2143

@@ -28,7 +50,7 @@ def __init__(self, ip_address, port=502, timeout=10, fake_errors=False):
2850

2951
def get_data(self):
3052
"""
31-
Gets the raw data from the ptc and returns it in a usable format.
53+
Gets the raw data from the PTC and returns it in a usable format.
3254
"""
3355
self.send(self.buildRegistersQuery())
3456
data = self.recv()

0 commit comments

Comments
 (0)