requestOptionNumber (property)

The option's number.

Syntax

- (int)requestOptionNumber:(int)requestOptionIndex;
- (void)setRequestOptionNumber:(int)requestOptionIndex:(int)newRequestOptionNumber;
public func requestOptionNumber(requestOptionIndex: Int32) throws -> Int32
public func setRequestOptionNumber(requestOptionIndex: Int32, newRequestOptionNumber: Int32) throws -> Void

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 RequestOptionValueType 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 RequestOptionIndex parameter specifies the index of the item in the array. The size of the array is controlled by the RequestOptionCount property.

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