[ https://issues.apache.org/jira/browse/MYNEWT-647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Collins updated MYNEWT-647: --------------------------------------- Description: h4. Current Scheme h5. Requests The NMP op is indicated by the OIC op: NMP read <=> OIC get NMP write <=> OIC put The NMP group and ID are indicated as CoAP URI Query options: * {{gr=<group>}} * {{id=<id>}} The remaining NMP header fields, seq and flags, are not present. The NMP payload is the entire CoAP request body. This is identical to the body of a plain NMP request. h5. Responses The NMP header is not present. The NMP op is indicated in the payload (see below), but other header fields cannot be inferred. Payload consists of a single CBOR key-value pair. For read responses, the key is "r"; for write responses, the key is "w". The value is a second CBOR map containing the actual NMP response fields. Errors encountered during processing of NMP requests are reported via OIC error responses (bad request, internal server error). h4. Proposed Scheme h5. Requests * The OIC op is always the same: put. * No URI Query CoAP options. * The NMP header is included in the payload as a key-value pair (key="_h"). This pair is in the root map of the request and is a sibling of the other request fields. The value of this pair is the big-endian eight-byte NMP header with a length field of 0. h5. Responses * As with requets, the NMP header is included in the payload as a key-value pair (key="_h"). * No "r" or "w" field. The response fields are inserted into the root map as a sibling of the "_h" pair. * Errors encountered during processing of NMP requests are reported identically to other NMP responses (embedded NMP response). h5. Notes * Keys that start with an underscore are reserved to the OIC manager protocol (e.g., "_h"). NMP requests and responses must not name any of their fields with a leading underscore. was: h4. Current Scheme h5. Requests The NMP op is indicated by the OIC op: NMP read <=> OIC get NMP write <=> OIC put The NMP group and ID are indicated as CoAP URI Query options: * {{gr=<group>}} * {{id=<id>}} The remaining NMP header fields, seq and flags, are not present. The payload is the CBOR encoding the the request body. This is identical to the body of a plain NMP request. h5. Responses The NMP header is not present. The NMP op is indicated in the payload (see below), but other header fields cannot be inferred. Payload consists of a single CBOR key-value pair. For read responses, the key is "r"; for write responses, the key is "w". The value is a second CBOR map containing the actual NMP response fields. Errors encountered during processing of NMP requests are reported via OIC error responses (bad request, internal server error). h4. Proposed Scheme h5. Requests * The OIC op is always the same: put. * No URI Query CoAP options. * The NMP header is included in the payload as a key-value pair (key="_h"). This pair is in the root map of the request and is a sibling of the other request fields. The value of this pair is the big-endian eight-byte NMP header with a length field of 0. h5. Responses * As with requets, the NMP header is included in the payload as a key-value pair (key="_h"). * No "r" or "w" field. The response fields are inserted into the root map as a sibling of the "_h" pair. * Errors encountered during processing of NMP requests are reported identically to other NMP responses (embedded NMP response). h5. Notes * Keys that start with an underscore are reserved to the OIC manager protocol (e.g., "_h"). NMP requests and responses must not name any of their fields with a leading underscore. > Changes to NMP over OIC scheme > ------------------------------ > > Key: MYNEWT-647 > URL: https://issues.apache.org/jira/browse/MYNEWT-647 > Project: Mynewt > Issue Type: Bug > Components: Newtmgr > Reporter: Christopher Collins > Assignee: Christopher Collins > Fix For: v1_0_0_rel > > > h4. Current Scheme > h5. Requests > The NMP op is indicated by the OIC op: > NMP read <=> OIC get > NMP write <=> OIC put > The NMP group and ID are indicated as CoAP URI Query options: > * {{gr=<group>}} > * {{id=<id>}} > The remaining NMP header fields, seq and flags, are not present. > The NMP payload is the entire CoAP request body. This is identical to the > body of a plain NMP request. > h5. Responses > The NMP header is not present. The NMP op is indicated in the payload (see > below), but other header fields cannot be inferred. > Payload consists of a single CBOR key-value pair. For read responses, the > key is "r"; for write responses, the key is "w". The value is a second CBOR > map containing the actual NMP response fields. > Errors encountered during processing of NMP requests are reported via OIC > error responses (bad request, internal server error). > h4. Proposed Scheme > h5. Requests > * The OIC op is always the same: put. > * No URI Query CoAP options. > * The NMP header is included in the payload as a key-value pair (key="_h"). > This pair is in the root map of the request and is a sibling of the other > request fields. The value of this pair is the big-endian eight-byte NMP > header with a length field of 0. > h5. Responses > * As with requets, the NMP header is included in the payload as a key-value > pair (key="_h"). > * No "r" or "w" field. The response fields are inserted into the root map as > a sibling of the "_h" pair. > * Errors encountered during processing of NMP requests are reported > identically to other NMP responses (embedded NMP response). > h5. Notes > * Keys that start with an underscore are reserved to the OIC manager protocol > (e.g., "_h"). NMP requests and responses must not name any of their fields > with a leading underscore. -- This message was sent by Atlassian JIRA (v6.3.15#6346)