TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Data Structures | Macros | Typedefs | Functions
gatt.h File Reference

Detailed Description

GATT layer interface.

Go to the source code of this file.

Data Structures

struct  attAttribute_t
 GATT Attribute format. More...
 
struct  gattAttrType_t
 GATT Attribute Type format. More...
 
struct  gattFindByTypeValueReq_t
 GATT Find By Type Value Request format. More...
 
union  gattMsg_t
 GATT Message format. More...
 
struct  gattMsgEvent_t
 GATT GATT_MSG_EVENT message format. More...
 
struct  gattReadByTypeReq_t
 GATT Read By Type Request format. More...
 
struct  gattReliableWritesReq_t
 GATT Reliable Writes Request format. Do not change the order of the members. More...
 
struct  gattService_t
 GATT Service format. More...
 
struct  gattWriteLongReq_t
 GATT Write Long Request format. Do not change the order of the members. More...
 

Macros

#define GATT_ATTR_HANDLE_SIZE   0x02
 Number of octets attribute handle.
 
#define GATT_BASE_METHOD   0x40
 GATT Base Method.
 
#define GATT_INVALID_HANDLE   0x0000
 Invalid attribute handle.
 
#define GATT_MAX_ATTR_SIZE   512
 GATT Maximum length of an attribute value.
 
#define GATT_MAX_ENCRYPT_KEY_SIZE   16
 GATT Maximum Encryption Key Size.
 
#define GATT_MAX_HANDLE   0xFFFF
 Maximum attribute handle.
 
#define GATT_MAX_MTU   0xFFFF
 Maximum MTU size.
 
#define GATT_MAX_NUM_PREPARE_WRITES   5
 GATT Maximum number of attributes that Attribute Server can prepare for writing per Attribute Client.
 
#define GATT_MIN_ENCRYPT_KEY_SIZE   7
 GATT Minimum Encryption Key Size.
 
#define GATT_MIN_HANDLE   0x0001
 Minimum attribute handle.
 
#define GATT_PERMIT_AUTHEN_READ   0x04
 Read requires Authentication.
 
#define GATT_PERMIT_AUTHEN_WRITE   0x08
 Write requires Authentication.
 
#define GATT_PERMIT_AUTHOR_READ   0x10
 Read requires Authorization.
 
#define GATT_PERMIT_AUTHOR_WRITE   0x20
 Write requires Authorization.
 
#define GATT_PERMIT_ENCRYPT_READ   0x40
 Read requires Encryption.
 
#define GATT_PERMIT_ENCRYPT_WRITE   0x80
 Write requires Encryption.
 
#define GATT_PERMIT_READ   0x01
 Attribute is Readable.
 
#define GATT_PERMIT_WRITE   0x02
 Attribute is Writable.
 

Typedefs

typedef struct attAttribute_t gattAttribute_t
 GATT Attribute format. More...
 

Functions

void * GATT_bm_alloc (uint16 connHandle, uint8 opcode, uint16 size, uint16 *pSizeAlloc)
 GATT implementation of the allocator functionality. More...
 
void GATT_bm_free (gattMsg_t *pMsg, uint8 opcode)
 GATT implementation of the de-allocator functionality. More...
 
bStatus_t GATT_DeregisterService (uint16 handle, gattService_t *pService)
 Deregister a service attribute list with the GATT Server. More...
 
bStatus_t GATT_DiscAllCharDescs (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
 Discovery All Characteristic Descriptors. More...
 
bStatus_t GATT_DiscAllChars (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
 Discover all Characteristics. More...
 
bStatus_t GATT_DiscAllPrimaryServices (uint16 connHandle, uint8 taskId)
 Discovery All Primary Services. More...
 
bStatus_t GATT_DiscCharsByUUID (uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId)
 Discovery Characteristics by UUID. More...
 
bStatus_t GATT_DiscPrimaryServiceByUUID (uint16 connHandle, uint8 *pUUID, uint8 len, uint8 taskId)
 Discovery Primary Service by UUID. More...
 
bStatus_t GATT_ExchangeMTU (uint16 connHandle, attExchangeMTUReq_t *pReq, uint8 taskId)
 Exchange MTU Request. More...
 
bStatus_t GATT_ExecuteWriteReq (uint16 connHandle, attExecuteWriteReq_t *pReq, uint8 taskId)
 ATT_ExecuteWriteReq More...
 
gattAttribute_tGATT_FindHandle (uint16 handle, uint16 *pHandle)
 Find the attribute record for a given handle. More...
 
gattAttribute_tGATT_FindHandleUUID (uint16 startHandle, uint16 endHandle, const uint8 *pUUID, uint16 len, uint16 *pHandle)
 Find the attribute record for a given handle and UUID. More...
 
bStatus_t GATT_FindIncludedServices (uint16 connHandle, uint16 startHandle, uint16 endHandle, uint8 taskId)
 This sub-procedure is used by a client to find include service declarations within a service definition on a server. The service specified is identified by the service handle range. More...
 
gattAttribute_tGATT_FindNextAttr (gattAttribute_t *pAttr, uint16 endHandle, uint16 service, uint16 *pLastHandle)
 Find the next attribute of the same type for a given attribute. More...
 
bStatus_t GATT_Indication (uint16 connHandle, attHandleValueInd_t *pInd, uint8 authenticated, uint8 taskId)
 Send a GATT Indication. More...
 
bStatus_t GATT_InitClient (void)
 Initialize the Generic Attribute Profile Client. More...
 
bStatus_t GATT_InitServer (void)
 Initialize the Generic Attribute Profile Server. More...
 
bStatus_t GATT_Notification (uint16 connHandle, attHandleValueNoti_t *pNoti, uint8 authenticated)
 Send a GATT Notification. More...
 
bStatus_t GATT_NotifyEvent (uint16 connHandle, uint8 status, uint8 method, gattMsg_t *pMsg)
 Send an event to upper layer application/protocol. More...
 
bStatus_t GATT_PrepareWriteReq (uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
 Request the server to prepare to write the value of an attribute. More...
 
bStatus_t GATT_ReadCharDesc (uint16 connHandle, attReadReq_t *pReq, uint8 taskId)
 Read Characteristic Descriptor. More...
 
bStatus_t GATT_ReadCharValue (uint16 connHandle, attReadReq_t *pReq, uint8 taskId)
 Read Characteristic Value. More...
 
bStatus_t GATT_ReadLongCharDesc (uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId)
 Read Long Characteristic Descriptor. More...
 
bStatus_t GATT_ReadLongCharValue (uint16 connHandle, attReadBlobReq_t *pReq, uint8 taskId)
 Read Long Characteristic Value. More...
 
bStatus_t GATT_ReadMultiCharValues (uint16 connHandle, attReadMultiReq_t *pReq, uint8 taskId)
 Read Multiple Characteristic Values. More...
 
bStatus_t GATT_ReadUsingCharUUID (uint16 connHandle, attReadByTypeReq_t *pReq, uint8 taskId)
 Read Using Characteristic UUID. More...
 
void GATT_RegisterForInd (uint8 taskId)
 Register to receive incoming ATT Indications or Notifications of attribute values. More...
 
void GATT_RegisterForMsgs (uint8 taskID)
 GATT Register for Messages. More...
 
void GATT_RegisterForReq (uint8 taskId)
 Register to receive incoming ATT Requests. More...
 
bStatus_t GATT_RegisterService (gattService_t *pService)
 Register a service attribute list with the GATT Server. More...
 
bStatus_t GATT_ReliableWrites (uint16 connHandle, attPrepareWriteReq_t *pReqs, uint8 numReqs, uint8 flags, uint8 taskId)
 Do a Reliable Write. More...
 
bStatus_t GATT_SendRsp (uint16 connHandle, uint8 method, gattMsg_t *pRsp)
 Send an ATT Response message out. More...
 
uint8 GATT_ServiceChangedInd (uint16 connHandle, uint8 taskId)
 Send out a Service Changed Indication. More...
 
uint8 GATT_ServiceEncKeySize (uint16 handle)
 Get the minimum encryption key size required by a given service. More...
 
uint16 GATT_ServiceNumAttrs (uint16 handle)
 Get the number of attributes for a given service. More...
 
bStatus_t GATT_SignedWriteNoRsp (uint16 connHandle, attWriteReq_t *pReq)
 Signed Write No Response. More...
 
void GATT_UpdateMTU (uint16 connHandle, uint16 mtuSize)
 Update ATT_MTU size for a given connection. More...
 
bStatus_t GATT_VerifyReadPermissions (uint16 connHandle, uint8 permissions, uint16 service)
 Verify the permissions of an attribute for reading. More...
 
bStatus_t GATT_VerifyWritePermissions (uint16 connHandle, uint8 permissions, uint16 service, attWriteReq_t *pReq)
 Verify the permissions of an attribute for writing. More...
 
bStatus_t GATT_WriteCharDesc (uint16 connHandle, attWriteReq_t *pReq, uint8 taskId)
 Write Characteristic Descriptor. More...
 
bStatus_t GATT_WriteCharValue (uint16 connHandle, attWriteReq_t *pReq, uint8 taskId)
 Write Characteristic Value. More...
 
bStatus_t GATT_WriteLongCharDesc (uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
 Write Long Characteristic Descriptor. More...
 
bStatus_t GATT_WriteLongCharValue (uint16 connHandle, attPrepareWriteReq_t *pReq, uint8 taskId)
 Write Long Characteristic Value. More...
 
bStatus_t GATT_WriteNoRsp (uint16 connHandle, attWriteReq_t *pReq)
 Write No Response. More...
 
Copyright 2017, Texas Instruments Incorporated