SumeetSingh19 commented on code in PR #1426:
URL: https://github.com/apache/mynewt-nimble/pull/1426#discussion_r1149123945


##########
nimble/host/src/ble_att_clt.c:
##########
@@ -907,6 +907,59 @@ ble_att_clt_tx_notify(uint16_t conn_handle, uint16_t 
handle,
     return rc;
 }
 
+/*****************************************************************************
+* $multi handle value notification                                           *
+*****************************************************************************/
+
+int
+ble_att_clt_tx_multi_notify(uint16_t conn_handle, uint16_t * att_handles,
+                            struct os_mbuf ** notif_values, uint16_t 
num_handles)
+{
+#if !NIMBLE_BLE_ATT_CLT_MULTI_NOTIFY
+    return BLE_HS_ENOTSUP;
+#endif
+
+    struct os_mbuf * txom;
+    int rc;
+    int i;
+
+    if (ble_att_cmd_get(BLE_ATT_OP_MULTI_NOTIFY_REQ, 0, &txom) == NULL) {
+        rc = BLE_HS_ENOMEM;
+        goto err;
+    }
+
+    for (i = 0; i < num_handles; i++) {
+        /* Handle */
+        rc = os_mbuf_copyinto(txom, OS_MBUF_PKTLEN(txom),
+                              &att_handles[i], sizeof(att_handles[i]));
+        if (rc != 0) {
+            rc = BLE_HS_ENOMEM;
+            goto err;
+        }
+        /* Length */
+        rc = os_mbuf_copyinto(txom, OS_MBUF_PKTLEN(txom),
+                              &(OS_MBUF_PKTLEN(notif_values[i])),
+                              sizeof(OS_MBUF_PKTLEN(notif_values[i])));
+        if (rc != 0) {
+            rc = BLE_HS_ENOMEM;
+            goto err;
+        }
+        /* Value */
+        rc = os_mbuf_copyinto(txom, OS_MBUF_PKTLEN(txom),

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to