IPWorks IoT 2020 Python Edition

Questions / Feedback?

fetch_messages Method

Receive currently buffered messages and return to sleep.

Syntax

def fetch_messages() -> None: ...

Remarks

Request any messages currently being buffered by the server for the current sleep period and return to sleep after they have been received.

Any available buffered messages will be sent to the client by the MQTTSN Gateway and the sleep interval will be reset.

This method sends a PINGREQ method with the client_id, requesting buffered messages which will be sent if available (see on_message_in). When the server has sent all messages, it will sent a PINGRESP message, causing the client to re-enter sleep mode. Once the PINGRESP is received, the duration the client may sleep restarts.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Python Edition - Version 20.0 [Build 8265]