-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCoAP_Opt_num_Registry.java
More file actions
50 lines (44 loc) · 1.35 KB
/
CoAP_Opt_num_Registry.java
File metadata and controls
50 lines (44 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package dummy;
public class CoAP_Opt_num_Registry {
//section 12.2. CoAP Option Numbers Registry
public static final int RESERVED_Zero = 0;
public static final int If_Match = 1;
public static final int URI_HOST = 3;
public static final int ETAG = 4;
public static final int IF_NONE_Match = 5;
public static final int URI_PORT = 7;
public static final int LOCATION_PATH = 8;
public static final int URI_PATH = 11;
public static final int Content_Format = 12;
public static final int MAX_AGE = 14;
public static final int URI_QUERY = 15;
public static final int Accept = 17;
public static final int LOCATION_QUERY = 20;
public static final int PROXY_URI = 35;
public static final int TOKEN = 13;
public static String toString(int optionNumber) {
switch (optionNumber) {
case RESERVED_Zero:
return "Reserved (0)";
case URI_HOST:
return "Uri-Host";
case ETAG:
return "ETag";
case MAX_AGE:
return "Max-Age";
case PROXY_URI:
return "Proxy-Uri";
case LOCATION_PATH:
return "Location-Path";
case URI_PORT:
return "Uri-Port";
case LOCATION_QUERY:
return "Location-Query";
case URI_PATH:
return "Uri-Path";
case URI_QUERY:
return "Uri-Query";
}
return String.format("Unknown option [number %d]", optionNumber);
}
}