Skip to content

Commit a85de67

Browse files
committed
add docstrings for lss callbacks
1 parent 603a4be commit a85de67

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/durand/services/lss.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,18 @@ def __init__(self, node: "Node"):
4747
node.nmt.state_callbacks.add(self.on_nmt_state_update)
4848

4949
def set_baudrate_change_callback(self, cb: Callable[[int, float], None]):
50+
"""Defines a callback function to change bitrate. The delay is obtained from
51+
the `activate_bit_timing` command.
52+
This callback is called after the delay specified in the command and should
53+
change the bitrate of the network after waiting for the delay again.
54+
:param cb: callback function with signature (baudrate, delay)
55+
"""
5056
self._change_baudrate_cb = cb
5157

5258
def set_store_configuration_callback(self, cb: Callable[[int, int], None]):
59+
"""Defines a callback function to store new bitrate and node id persistently.
60+
:param cb: callback function with signature (baudrate, node_id)
61+
"""
5362
self._store_configuration_cb = cb
5463

5564
def on_nmt_state_update(self, state: StateEnum):

0 commit comments

Comments
 (0)