-
Notifications
You must be signed in to change notification settings - Fork 2
Specification
Inho Oh edited this page Jul 26, 2017
·
10 revisions
- ACL: Access Control List
- SACL: Signed Access Control List
- ACE: Access Control Entry
- SRM: Secure Resource Manager
- BS: Bootstrap Server
- BC: Bootstrapping Credential
- BP: Bootstrapping Parameters
- icv: Spec version of the core specification this device is implemented to. (e.g. ocf.1.1.0)
- dmv: Data Model Version. Spec version of the Resource Specification to which this device data model is implemented. (e.g. ocf.res.1.0.0, ocf.sh.1.0.0)
- OTM: Ownership Transfer Methods
- doxm: Device Owner Transfer Method
- OBT: Onboarding Tool
- RD: Resource Directory
- rt: Resource Type
- if: Interface
- p: Policy
- bm: bitmask corresponds to a specific Policyt rule.
- Bit 0 (discoverable flag)
- Bit 1 (observable flag)
- di: Device ID
- wk: Wellknown
- RAML: RESTful API Modeling Language
- SSV: String with Space Separated Values
- BSP: Blank(i.e. space) separated list of values encoded within a string.
- CSV: Comma separated list of values encoded within a string.
- oic.if.baseline (baseline) - RETRIEVE, UPDATE
- oic.if.ll (links list) - RETRIEVE
- oic.if.b (batch) - RETRIEVE, UPDATE
- oic.if.r (read-only) - RETRIEVE
- oic.if.rw (read-write) - RETRIEVE, UPDATE
- oic.if.a (actuator)- CREATE, RETRIEVE, UPDATE
- oic.if.s (sensor) - RETRIEVE
- RETRIEVE: GET
- CREATE: POST or PUT
- UPDATE: POST
- DELETE: DELETE
- KeepAlive
- '/oic/ping' (rt=oic.wk.ping, if=oic.if.rw) - Ping
- prop: 'in' (integer) - Interval
- '/oic/ping' (rt=oic.wk.ping, if=oic.if.rw) - Ping
- Versioning is implemented through the "CoAP Options"
- CoAP Content-Formats (RFC7252 Section 12.3 Table 9)
- ID 0: text/plain
- ID 50: application/json
- ID 60: application/cbor
- ID 10000: application/vnd.ocf+cbor
- Content-Format ID policy (RFC7252 Section 12.3 Table 10)
- 0~255: Expert Review
- 256~9999: IETF Review or IESG Approval
- 10000~64999: First Come First Served
- 65000~65535: Experimental use (no operational use)
- CoAP Option Numbers (RFC7252 Section 5.10 Table 4)
- Number 12: "Content-Format", Format=uint, Length=2bytes
- Number 17: "Accept", Format=uint, Length=2bytes
- Number 2049: "Accept Version", Format=uint, Length=2bytes
- Number 2053: "Content-Format Version", Format=uint, Length=2bytes
- Option Number policy (RFC7252 Section 12.2 Table 8)
- 0~255: IETF Review or IESG Approval
- 256~2047: Specification Required
- 2048~64999: Expert Review
- 65000~65535: Experimental use (no operational use)
- Odd numbers indicate a critical option, while even numbers indicate an elective option.
- Version Representation (uint, Length=2bytes(16bits))
- Major:Minor:Sub = 5:5:6
- OCF 1.0.0 = 0b00001 00000 000000 = 0x0800 = 2048
- OCF 1.1.0 = 0b00001 00001 000000 = 0x0840 = 2112
- OK: OIC 1.1 Client <----> OIC 1.1 Server
- GET /oic/res with application/cbor
- Accept (17) = 60
- Response /oic/res per OIC 1.1
- Content-Format (12) = 60
- GET /oic/res with application/cbor
- OK: OIC 1.1 Clinet <----> OCF 1.0 Server
- GET /oic/res with application/cbor
- Accept (17) = 60
- Response /oic/res per OIC 1.1
- Content-Format (12) = 60
- GET /oic/res with application/cbor
- OK: OCF 1.0 Client <----> OCF 1.0 Server
- GET /oic/res with application/vnd.ocf+cbor
- Accept (17) = 10000
- Accept-Version (2049) = 2048 (OCF 1.0.0)
- Response /oic/res per OCF 1.0
- Content-Format (12) = 10000
- Content-Format Version (2053) = 2048 (OCF 1.0.0)
- GET /oic/res with application/vnd.ocf+cbor
- retry with fallback case
- Try 1) OCF 1.0 Client <----> OIC 1.1 Server
- GET /oic/res with application/vnd.ocf+cbor
- Accept (17) = 10000
- Accept-Version (2049) = 2048 (OCF 1.0.0)
- Response with error
- (error code ???)
- GET /oic/res with application/vnd.ocf+cbor
- Try 2) OCF 1.0 Client <----> OIC 1.1 Server
- GET /oic/res with application/cbor
- Accept (17) = 60
- Response with OIC 1.1
- Content-Format (12) = 60
- GET /oic/res with application/cbor
- Try 1) OCF 1.0 Client <----> OIC 1.1 Server