IPWorks IoT 2020 Python Edition

Questions / Feedback?

on_response_complete Event

Fires when a response has been sent to a client.

Syntax

class CoAPResponseCompleteEventParams(object):
  @property
  def request_id() -> str: ...
  @property
  def error_code() -> int: ...
  @property
  def error_description() -> str: ...

# In class CoAP:
@property
def on_response_complete() -> Callable[[CoAPResponseCompleteEventParams], None]: ...
@on_response_complete.setter
def on_response_complete(event_hook: Callable[[CoAPResponseCompleteEventParams], None]) -> None: ...

Remarks

This event fires anytime a response has been sent to a client. If the use_confirmable_messages property is enabled, then the response is considered complete once the client has confirmed that it received the response (or once the retransmission period elapses). If the use_confirmable_messages property is disabled, the response is considered complete immediately (since there is no way to know if the client received it).

The RequestId parameter reflects the class-generated Id of the request for which the response was sent.

The ErrorCode parameter indicates whether the response encountered an error (e.g., transmission timed out). If no error was encountered, it will be 0.

The ErrorDescription parameter provides a description of the error that occurred. It will be empty if no error was encountered.

Note: This event is only used when the class is operating in server mode (i.e., when the listening property is enabled).

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