Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 8396c6b

Browse files
committedNov 5, 2018
Documentation for uplink_raw_callback function
1 parent d1b83c0 commit 8396c6b

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
 

‎DOCUMENTATION.md

+19
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* [close](#close)
77
* [set_uplink_callback](#set_uplink_callback)
88
* [uplink_callback](#uplink_callback)
9+
* [set_uplink_callback_raw](#set_uplink_callback_raw)
10+
* [uplink_callback_raw](#uplink_callback_raw)
911
* [set_connect_callback](#set_connect_callback)
1012
* [connect_callback](#connect_callback)
1113
* [set_downlink_callback](#set_downlink_callback)
@@ -89,6 +91,23 @@ The callback function must be declared in the script following this structure:
8991
* `msg`: **UplinkMessage object** the message received by the client.
9092
* `client`: **MQTTClient object** the client from which the callback is executed.
9193

94+
#### set_uplink_callback_raw
95+
96+
Add a callback function, to be called when an uplink message is received.
97+
This function provides compatibility with existing paho.mqtt.client implementations.
98+
99+
```python
100+
client.set_uplink_callback_raw(uplink_callback_raw)
101+
```
102+
103+
##### uplink_callback_raw
104+
105+
The callback function must be declared in the script following this structure:
106+
107+
* `uplink_callback_raw(msg, client)`
108+
* `msg`: **paho.mqtt.client.MQTTMessage object** the message received by the client.
109+
* `client`: **MQTTClient object** the client from which the callback is executed.
110+
92111
#### set_connect_callback
93112

94113
Add a connection callback function to be executed when the client connects to the broker.

‎README.rst

+24
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,30 @@ structure:
129129
- ``client``: **MQTTClient object** the client from which the
130130
callback is executed.
131131

132+
set_uplink_callback_raw
133+
^^^^^^^^^^^^^^^^^^^^^^^
134+
135+
Add a callback function, to be called when an uplink message is
136+
received. This function provides compatibility with existing
137+
paho.mqtt.client implementations.
138+
139+
.. code:: python
140+
141+
client.set_uplink_callback_raw(uplink_callback_raw)
142+
143+
uplink_callback_raw
144+
'''''''''''''''''''
145+
146+
The callback function must be declared in the script following this
147+
structure:
148+
149+
- ``uplink_callback_raw(msg, client)``
150+
151+
- ``msg``: **paho.mqtt.client.MQTTMessage object** the message
152+
received by the client.
153+
- ``client``: **MQTTClient object** the client from which the
154+
callback is executed.
155+
132156
set_connect_callback
133157
^^^^^^^^^^^^^^^^^^^^
134158

0 commit comments

Comments
 (0)