add
This commit is contained in:
parent
a3a7cf4676
commit
4471e8338c
Binary file not shown.
|
@ -2,11 +2,11 @@
|
|||
if [ -e "./demo.zip" ] ; then
|
||||
rm ./demo.zip
|
||||
fi
|
||||
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
cp index.py tmp/
|
||||
cd tmp
|
||||
pip3 install -t . iotedge_driver_link_sdk==0.0.2.beta #打包驱动SDK
|
||||
pip3 install -t . iotedge_driver_link_sdk==0.0.2 #打包驱动SDK
|
||||
zip -r demo.zip .
|
||||
cd ..
|
||||
cp tmp/demo.zip .
|
||||
|
|
|
@ -398,11 +398,14 @@ def _on_message(message):
|
|||
sub_dev = _connect_map[identify]
|
||||
if isinstance(topic, str) and topic.startswith("/$system/") and topic.find("/rrpc/request/") > 0:
|
||||
if sub_dev.rrpc:
|
||||
_logger.debug("rrpc request: {}".format(str(message)))
|
||||
resp = sub_dev.rrpc(topic, msg)
|
||||
if not resp:
|
||||
if resp:
|
||||
_logger.debug("rrpc response: {}".format(str(resp)))
|
||||
topic = topic.replace(
|
||||
"/rrpc/request/", "/rrpc/response/", 1)
|
||||
sub_dev.publish(topic, resp)
|
||||
return
|
||||
|
||||
if sub_dev.callback:
|
||||
sub_dev.callback(topic, msg)
|
||||
|
|
Loading…
Reference in New Issue