Skip to content

Commit

Permalink
docs: add clarifying docstring for the start() method
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Dimov <[email protected]>
  • Loading branch information
valentin-dimov committed Nov 16, 2023
1 parent 06474a4 commit fb8dea7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ProbeModule:

def __init__(self, session: RuntimeSession, module_id="probe"):
"""
Construct a probe module and connect it to EVerest.
Construct a probe module and connect it to EVerest. This does not mark the module as ready yet.
- session: runtime session information (path to EVerest installation and location of run config file)
- module_id: the module ID to register with EVerest. By default, this will be "probe".
- start: whether to start the module immediately. Set to false if you need to add implementations or subscriptions before starting.
Expand All @@ -28,6 +28,10 @@ def __init__(self, session: RuntimeSession, module_id="probe"):
self._started = False

def start(self):
"""
Send the "ready" signal for the probe module.
You should do this after implementing all commands needed in your test.
"""
if self._started:
raise RuntimeError("Called start(), but ProbeModule is started already!")
self._started = True
Expand Down

0 comments on commit fb8dea7

Please sign in to comment.