Skip to content

Commit 11b9089

Browse files
committed
Better get and set docs
1 parent 6cdb74d commit 11b9089

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

minicps/devices.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
``devices`` module contains:
33
4-
- ``get`` and ``set`` physical layer's API methods
4+
- ``get`` and ``set`` physical process's API methods
55
- ``send`` and ``receive`` network layer's API methods
66
- the user input validation code
77
@@ -197,7 +197,11 @@ def _stop(self):
197197
print "TODO _stop: please override me"
198198

199199
def set(self, what, value):
200-
"""Set aka write a state value.
200+
"""Set (write) a physical process state value.
201+
202+
The ``value`` to be set (Eg: drive an actuator) is identified by the
203+
``what`` tuple, and it is assumed to be already initialize. Indeed
204+
``set`` is not able to create new physical process values.
201205
202206
:param tuple what: field[s] identifier[s]
203207
:param value: value to be setted
@@ -211,7 +215,7 @@ def set(self, what, value):
211215
return self._state._set(what, value)
212216

213217
def get(self, what):
214-
"""Get (read) a ``state`` value.
218+
"""Get (read) a physical process state value.
215219
216220
:param tuple what: field[s] identifier[s]
217221
@@ -224,7 +228,7 @@ def get(self, what):
224228
return self._state._get(what)
225229

226230
def send(self, what, value, address):
227-
"""Send (write) a value to another host.
231+
"""Send (write) a value to another network host.
228232
229233
:param tuple what: field[s] identifier[s]
230234
:param value: value to be setted
@@ -239,7 +243,7 @@ def send(self, what, value, address):
239243
return self._protocol._send(what, value, address)
240244

241245
def recieve(self, what, address):
242-
"""Receive (read) a value from another host.
246+
"""Receive (read) a value from another network host.
243247
244248
:param tuple what: field[s] identifier[s]
245249
:param str address: ``ip[:port]``

0 commit comments

Comments
 (0)