RequestOptionNumber Property
The option's number.
Syntax
ANSI (Cross Platform) int GetRequestOptionNumber(int iRequestOptionIndex);
int SetRequestOptionNumber(int iRequestOptionIndex, int iRequestOptionNumber); Unicode (Windows) INT GetRequestOptionNumber(INT iRequestOptionIndex);
INT SetRequestOptionNumber(INT iRequestOptionIndex, INT iRequestOptionNumber);
- (int)requestOptionNumber:(int)requestOptionIndex; - (void)setRequestOptionNumber:(int)requestOptionIndex:(int)newRequestOptionNumber;
#define PID_COAP_REQUESTOPTIONNUMBER 17 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 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.
This property is not available at design time.
Data Type
Integer