[riot-notifications] [RIOT-OS/RIOT] net/gcoap: add/publish link format attributes for a resource (#11765)

Leandro Lanzieri notifications at github.com
Fri Jul 26 18:28:58 CEST 2019


leandrolanzieri approved this pull request.

I retested this and works really nice. I'm glad we are having this feature. Just two minor details, feel free to squash. ACK.

> +/**
+ * @brief   Context information required to write a resource link
+ */
+typedef struct {
+    unsigned content_format;            /**< link format */
+    size_t link_pos;                    /**< position of link within listener */
+    uint16_t flags;                     /**< encoder switches; see GCOAP_LINK_FLAG_*
+                                             constants */
+} coap_link_encoder_ctx_t;
+
+/**
+ * @brief   Handler function to write a resource link
+ *
+ * @param[in] resource      Resource for link
+ * @param[out] buf          Buffer on which to write; may be null
+ * @param[in] maxlen        Remaining length for bufer

```suggestion
 * @param[in] maxlen        Remaining length for @p buf
```

> @@ -715,6 +759,22 @@ uint8_t gcoap_op_state(void);
  */
 int gcoap_get_resource_list(void *buf, size_t maxlen, uint8_t cf);
 
+/**
+ * @brief   Writes a resource in CoAP Link Format to a provided buffer.

```suggestion
 * @brief   Writes a resource in CoRE Link Format to a provided buffer.
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11765#pullrequestreview-267250542
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190726/0536e196/attachment.htm>


More information about the notifications mailing list