5.10 Option定义

CoAP的那些选项在表5-1中总结,并且在后面的子章节中描述。

在表中,C,U和N这几列分别代表临界(Critical),不安全(UnSafe)和不缓存(NoCacheKey)。由于NoCacheKey仅仅用于安全转发(Safe-to-Forward)选项(没有标记为Unsafe),这一列被填满了横杠。

+-----+---+---+---+---+----------------+--------+--------+----------+
| No. | C | U | N | R |         Name        | Format | Length |  Default |
+-----+---+---+---+---+----------------+--------+--------+----------+
|   1 | x |   |   | x | If-Match       | opaque | 0-8    | (none)   |
|   3 | x | x | - |   | Uri-Host       | string | 1-255  | (see     |
|     |   |   |   |   |                |        |        | below)   |
|   4 |   |   |   | x | ETag           | opaque | 1-8    | (none)   |
|   5 | x |   |   |   | If-None-Match  | empty  | 0      | (none)   |
|   7 | x | x | - |   | Uri-Port       | uint   | 0-2    | (see     |
|     |   |   |   |   |                |        |        | below)   |
|   8 |   |   |   | x | Location-Path  | string | 0-255  | (none)   |
|  11 | x | x | - | x | Uri-Path       | string | 0-255  | (none)   |
|  12 |   |   |   |   | Content-Format | uint   | 0-2    | (none)   |
|  14 |   | x | - |   | Max-Age        | uint   | 0-4    | 60       |
|  15 | x | x | - | x | Uri-Query      | string | 0-255  | (none)   |
|  17 | x |   |   |   | Accept         | uint   | 0-2    | (none)   |
|  20 |   |   |   | x | Location-Query | string | 0-255  | (none)   |
|  35 | x | x | - |   | Proxy-Uri      | string | 1-1034 | (none)   |
|  39 | x | x | - |   | Proxy-Scheme   | string | 1-255  | (none)   |
|  60 |   |   | x |   | Size1          | uint   | 0-4    | (none)   |
+-----+---+---+---+---+----------------+--------+--------+----------+
C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable
表4 选项表

最后更新于

这有帮助吗?