High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
rgrover1
Date:
Fri Jun 19 15:52:59 2015 +0100
Parent:
655:4dce7c6d2eb3
Child:
657:3b868e4cae74
Commit message:
Synchronized with git rev 5f0668ee
Author: Rohit Grover
rename GattCharacteristicCallbackParams.h -> GattCallbackParamTypes.h

Changed in this revision

public/GattCallbackParamTypes.h Show annotated file Show diff for this revision Revisions of this file
public/GattCharacteristic.h Show annotated file Show diff for this revision Revisions of this file
public/GattCharacteristicCallbackParams.h Show diff for this revision Revisions of this file
public/GattClient.h Show annotated file Show diff for this revision Revisions of this file
public/GattServer.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/public/GattCallbackParamTypes.h	Fri Jun 19 15:52:59 2015 +0100
@@ -0,0 +1,78 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2006-2013 ARM Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __GATT_CALLBACK_PARAM_TYPES_H__
+#define __GATT_CALLBACK_PARAM_TYPES_H__
+
+struct GattWriteCallbackParams {
+    enum WriteOp_t {
+        OP_INVALID               = 0x00,  /**< Invalid Operation. */
+        OP_WRITE_REQ             = 0x01,  /**< Write Request. */
+        OP_WRITE_CMD             = 0x02,  /**< Write Command. */
+        OP_SIGN_WRITE_CMD        = 0x03,  /**< Signed Write Command. */
+        OP_PREP_WRITE_REQ        = 0x04,  /**< Prepare Write Request. */
+        OP_EXEC_WRITE_REQ_CANCEL = 0x05,  /**< Execute Write Request: Cancel all prepared writes. */
+        OP_EXEC_WRITE_REQ_NOW    = 0x06,  /**< Execute Write Request: Immediately execute all prepared writes. */
+    };
+
+    GattAttribute::Handle_t  handle;
+    WriteOp_t                writeOp; /**< Type of write operation, */
+    uint16_t                 offset;  /**< Offset for the write operation. */
+    uint16_t                 len;
+    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
+};
+
+struct GattReadCallbackParams {
+    GattAttribute::Handle_t  handle;
+    uint16_t                 offset;  /**< Offset for the read operation. */
+    uint16_t                 len;
+    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
+};
+
+enum GattAuthCallbackReply_t {
+    AUTH_CALLBACK_REPLY_SUCCESS =                       0x00,    /**< Success. */
+    AUTH_CALLBACK_REPLY_ATTERR_INVALID_HANDLE =         0x0101,  /**< ATT Error: Invalid Attribute Handle. */
+    AUTH_CALLBACK_REPLY_ATTERR_READ_NOT_PERMITTED =     0x0102,  /**< ATT Error: Read not permitted. */
+    AUTH_CALLBACK_REPLY_ATTERR_WRITE_NOT_PERMITTED =    0x0103,  /**< ATT Error: Write not permitted. */
+    AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHENTICATION =   0x0105,  /**< ATT Error: Authenticated link required. */
+    AUTH_CALLBACK_REPLY_ATTERR_INVALID_OFFSET =         0x0107,  /**< ATT Error: Offset specified was past the end of the attribute. */
+    AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION =    0x0108,  /**< ATT Error: Used in ATT as Insufficient Authorisation. */
+    AUTH_CALLBACK_REPLY_ATTERR_PREPARE_QUEUE_FULL =     0x0109,  /**< ATT Error: Used in ATT as Prepare Queue Full. */
+    AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_FOUND =    0x010A,  /**< ATT Error: Used in ATT as Attribute not found. */
+    AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_LONG =     0x010B,  /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */
+    AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D,  /**< ATT Error: Invalid value size. */
+    AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES =        0x0111,  /**< ATT Error: Encrypted link required. */
+};
+
+struct GattWriteAuthCallbackParams {
+    GattAttribute::Handle_t  handle;
+    uint16_t                 offset; /**< Offset for the write operation. */
+    uint16_t                 len;    /**< Length of the incoming data. */
+    const uint8_t           *data;   /**< Incoming data, variable length. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
+};
+
+struct GattReadAuthCallbackParams {
+    GattAttribute::Handle_t  handle;
+    uint16_t                 offset; /**< Offset for the read operation. */
+    uint16_t                 len;    /**< Optional: new length of the outgoing data. */
+    uint8_t                 *data;   /**< Optional: new outgoing data. Leave at NULL if data is unchanged. */
+    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
+                                                  * request is to proceed; false otherwise. */
+};
+
+#endif /*__GATT_CALLBACK_PARAM_TYPES_H__*/
\ No newline at end of file
--- a/public/GattCharacteristic.h	Fri Jun 19 15:52:59 2015 +0100
+++ b/public/GattCharacteristic.h	Fri Jun 19 15:52:59 2015 +0100
@@ -19,7 +19,7 @@
 
 #include "Gap.h"
 #include "GattAttribute.h"
-#include "GattCharacteristicCallbackParams.h"
+#include "GattCallbackParamTypes.h"
 #include "FunctionPointerWithContext.h"
 
 class GattCharacteristic {
--- a/public/GattCharacteristicCallbackParams.h	Fri Jun 19 15:52:59 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __GATT_CALLBACK_PARAM_TYPES_H__
-#define __GATT_CALLBACK_PARAM_TYPES_H__
-
-struct GattWriteCallbackParams {
-    enum WriteOp_t {
-        OP_INVALID               = 0x00,  /**< Invalid Operation. */
-        OP_WRITE_REQ             = 0x01,  /**< Write Request. */
-        OP_WRITE_CMD             = 0x02,  /**< Write Command. */
-        OP_SIGN_WRITE_CMD        = 0x03,  /**< Signed Write Command. */
-        OP_PREP_WRITE_REQ        = 0x04,  /**< Prepare Write Request. */
-        OP_EXEC_WRITE_REQ_CANCEL = 0x05,  /**< Execute Write Request: Cancel all prepared writes. */
-        OP_EXEC_WRITE_REQ_NOW    = 0x06,  /**< Execute Write Request: Immediately execute all prepared writes. */
-    };
-
-    GattAttribute::Handle_t  handle;
-    WriteOp_t                writeOp; /**< Type of write operation, */
-    uint16_t                 offset;  /**< Offset for the write operation. */
-    uint16_t                 len;
-    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
-};
-
-struct GattReadCallbackParams {
-    GattAttribute::Handle_t  handle;
-    uint16_t                 offset;  /**< Offset for the read operation. */
-    uint16_t                 len;
-    const uint8_t           *data;    /* @note: data might not persist beyond the callback; make a local copy if needed. */
-};
-
-enum GattAuthCallbackReply_t {
-    AUTH_CALLBACK_REPLY_SUCCESS =                       0x00,    /**< Success. */
-    AUTH_CALLBACK_REPLY_ATTERR_INVALID_HANDLE =         0x0101,  /**< ATT Error: Invalid Attribute Handle. */
-    AUTH_CALLBACK_REPLY_ATTERR_READ_NOT_PERMITTED =     0x0102,  /**< ATT Error: Read not permitted. */
-    AUTH_CALLBACK_REPLY_ATTERR_WRITE_NOT_PERMITTED =    0x0103,  /**< ATT Error: Write not permitted. */
-    AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHENTICATION =   0x0105,  /**< ATT Error: Authenticated link required. */
-    AUTH_CALLBACK_REPLY_ATTERR_INVALID_OFFSET =         0x0107,  /**< ATT Error: Offset specified was past the end of the attribute. */
-    AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION =    0x0108,  /**< ATT Error: Used in ATT as Insufficient Authorisation. */
-    AUTH_CALLBACK_REPLY_ATTERR_PREPARE_QUEUE_FULL =     0x0109,  /**< ATT Error: Used in ATT as Prepare Queue Full. */
-    AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_FOUND =    0x010A,  /**< ATT Error: Used in ATT as Attribute not found. */
-    AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_LONG =     0x010B,  /**< ATT Error: Attribute cannot be read or written using read/write blob requests. */
-    AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D,  /**< ATT Error: Invalid value size. */
-    AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES =        0x0111,  /**< ATT Error: Encrypted link required. */
-};
-
-struct GattWriteAuthCallbackParams {
-    GattAttribute::Handle_t  handle;
-    uint16_t                 offset; /**< Offset for the write operation. */
-    uint16_t                 len;    /**< Length of the incoming data. */
-    const uint8_t           *data;   /**< Incoming data, variable length. */
-    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
-                                                  * request is to proceed; false otherwise. */
-};
-
-struct GattReadAuthCallbackParams {
-    GattAttribute::Handle_t  handle;
-    uint16_t                 offset; /**< Offset for the read operation. */
-    uint16_t                 len;    /**< Optional: new length of the outgoing data. */
-    uint8_t                 *data;   /**< Optional: new outgoing data. Leave at NULL if data is unchanged. */
-    GattAuthCallbackReply_t  authorizationReply; /* This is the out parameter which needs to be set to true by the callback if the
-                                                  * request is to proceed; false otherwise. */
-};
-
-#endif /*__GATT_CALLBACK_PARAM_TYPES_H__*/
\ No newline at end of file
--- a/public/GattClient.h	Fri Jun 19 15:52:59 2015 +0100
+++ b/public/GattClient.h	Fri Jun 19 15:52:59 2015 +0100
@@ -21,7 +21,7 @@
 #include "GattAttribute.h"
 #include "ServiceDiscovery.h"
 
-#include "GattCharacteristicCallbackParams.h"
+#include "GattCallbackParamTypes.h"
 
 class GattClient {
 public:
--- a/public/GattServer.h	Fri Jun 19 15:52:59 2015 +0100
+++ b/public/GattServer.h	Fri Jun 19 15:52:59 2015 +0100
@@ -21,7 +21,7 @@
 #include "GattService.h"
 #include "GattAttribute.h"
 #include "GattServerEvents.h"
-#include "GattCharacteristicCallbackParams.h"
+#include "GattCallbackParamTypes.h"
 #include "CallChainOfFunctionPointersWithContext.h"
 
 class GattServer {