From 07c5c3026f357987eb99a9ba068ebd882998a29d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 26 Apr 2015 08:57:32 +0200 Subject: update doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/bus.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bus.py b/src/bus.py index 91ea5da..4b3f9fd 100644 --- a/src/bus.py +++ b/src/bus.py @@ -148,7 +148,7 @@ class Bus: @param callback Function to call when a message is received, the input parameters will be the read message and - `user_data` from the function's [Bus.read] parameter + `user_data` from the function's [`Bus.read`] parameter with the same name. The message must have been parsed or copied when `callback` returns as it may be over overridden after that time. `callback` should @@ -156,6 +156,12 @@ class Bus: 0: stop listening 1: continue listening -1: an error has occurred + However, the function [`Bus.read`] will invoke + `callback` with `message` set to `None` one time + directly after it has started listening on the bus. + This is to the the program now it can safely continue + with any action that requires that the programs is + listening on the bus. NB! The received message will not be decoded from UTF-8 @param user_data See description of `callback` ''' -- cgit v1.2.3-70-g09d2