IPWorks IoT 2020 Python Edition

Questions / Feedback?

response_option_number Property

The option's number.

Syntax

def get_response_option_number(response_option_index: int) -> int: ...
def set_response_option_number(response_option_index: int, value: int) -> None: ...

Default Value

0

Remarks

The option's number.

The property reflects the option's number, which must be a value in the range 0 to 65535 (inclusive). Setting this property to a recognized option number (see table below) will automatically set the response_option_value_type property to the correct value (it should be set manually otherwise).

The following table provides a (non-exhaustive) list of some of the more common option numbers; refer to the IANA's CoAP Option Numbers registry for a full list.

Number Option
1 If-Match
3 Uri-Host
4 ETag
5 If-None-Match
6 Observe
7 Uri-Port
8 Location-Path
11 Uri-Path
12 Content-Format
14 Max-Age
15 Uri-Query
17 Accept
20 Location-Query
23 Block2
27 Block1
35 Proxy-Uri
39 Proxy-Scheme
60 Size1

The response_option_index parameter specifies the index of the item in the array. The size of the array is controlled by the response_option_count property.

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