ResponseOptionNumber Property

The option's number.

Syntax

ANSI (Cross Platform)
int GetResponseOptionNumber(int iResponseOptionIndex);
int SetResponseOptionNumber(int iResponseOptionIndex, int iResponseOptionNumber); Unicode (Windows) INT GetResponseOptionNumber(INT iResponseOptionIndex);
INT SetResponseOptionNumber(INT iResponseOptionIndex, INT iResponseOptionNumber);
- (int)responseOptionNumber:(int)responseOptionIndex;
- (void)setResponseOptionNumber:(int)responseOptionIndex:(int)newResponseOptionNumber;
#define PID_COAP_RESPONSEOPTIONNUMBER 28

IPWORKSIOT_EXTERNAL void* IPWORKSIOT_CALL IPWorksIoT_CoAP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSIOT_EXTERNAL int IPWORKSIOT_CALL IPWorksIoT_CoAP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
IPWORKSIOT_EXTERNAL int IPWORKSIOT_CALL IPWorksIoT_CoAP_CheckIndex(void *lpObj, int propid, int arridx);

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 ResponseOptionValueType 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 ResponseOptionIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ResponseOptionCount property.

This property is not available at design time.

Data Type

Integer

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