TI BLE-Stack for Bluetooth 4.2 API Documentation
3.01.00.07
|
GATTServApp layer interface.
Go to the source code of this file.
Data Structures | |
struct | _serviceCBsList |
Service callbacks list item. More... | |
struct | gattCharCfg_t |
Structure for Client Characteristic Configuration. More... | |
struct | gattCharFormat_t |
GATT Structure for Characteristic Presentation Format Value. More... | |
struct | gattClientCharCfgUpdatedEvent_t |
GATT_CLIENT_CHAR_CFG_UPDATED_EVENT message format. More... | |
struct | gattEventHdr_t |
GATT Server App event header format. More... | |
struct | gattServiceCBs_t |
GATT Structure for service callback functions. More... | |
struct | gattServiceCBsInfo_t |
GATT Structure to keep CBs information for each service being registered. More... | |
struct | prepareWrites_t |
Structure to keep Prepare Write Requests for each Client. More... | |
Macros | |
#define | GATT_ALL_SERVICES 0xFFFFFFFF |
All profile services bit fields. | |
#define | GATT_CCC_TBL(pValue) ( (gattCharCfg_t *)(*((PTR_TYPE)(pValue))) ) |
Client Characteristic Configuration table (from CCC attribute value pointer) | |
#define | GATT_CFG_NO_OPERATION 0x0000 |
No operation. | |
#define | GATT_CLIENT_CFG_INDICATE 0x0002 |
The Characteristic Value shall be indicated. | |
#define | GATT_CLIENT_CFG_NOTIFY 0x0001 |
The Characteristic Value shall be notified. | |
#define | GATT_CLIENT_CHAR_CFG_UPDATED_EVENT 0x00 |
Sent when a Client Characteristic Configuration is updated. This event is sent as an OSAL message defined as gattCharCfgUpdatedEvent_t. | |
#define | GATT_EXT_PROP_RELIABLE_WRITE 0x0001 |
Permits reliable writes of the Characteristic Value. | |
#define | GATT_EXT_PROP_WRITABLE_AUX 0x0002 |
Permits writes to the characteristic descriptor. | |
#define | GATT_FORMAT_2BIT 0x02 |
Unsigned 2 bit integer. | |
#define | GATT_FORMAT_BOOL 0x01 |
Unsigned 1 bit; 0 = false, 1 = true. | |
#define | GATT_FORMAT_DUINT16 0x18 |
IEEE-20601 format. | |
#define | GATT_FORMAT_FLOAT 0x17 |
IEEE-11073 32 bit FLOAT. | |
#define | GATT_FORMAT_FLOAT32 0x14 |
IEEE-754 32 bit floating point. | |
#define | GATT_FORMAT_FLOAT64 0x15 |
IEEE-754 64 bit floating point. | |
#define | GATT_FORMAT_NIBBLE 0x03 |
Unsigned 4 bit integer. | |
#define | GATT_FORMAT_SFLOAT 0x16 |
IEEE-11073 16 bit SFLOAT. | |
#define | GATT_FORMAT_SINT12 0x0d |
Signed 12 bit integer. | |
#define | GATT_FORMAT_SINT128 0x13 |
Signed 128 bit integer. | |
#define | GATT_FORMAT_SINT16 0x0e |
Signed 16 bit integer. | |
#define | GATT_FORMAT_SINT24 0x0f |
Signed 24 bit integer. | |
#define | GATT_FORMAT_SINT32 0x10 |
Signed 32 bit integer. | |
#define | GATT_FORMAT_SINT48 0x11 |
Signed 48 bit integer. | |
#define | GATT_FORMAT_SINT64 0x12 |
Signed 64 bit integer. | |
#define | GATT_FORMAT_SINT8 0x0c |
Signed 8 bit integer. | |
#define | GATT_FORMAT_STRUCT 0x1b |
Opaque structure. | |
#define | GATT_FORMAT_UINT12 0x05 |
Unsigned 12 bit integer. | |
#define | GATT_FORMAT_UINT128 0x0b |
Unsigned 128 bit integer. | |
#define | GATT_FORMAT_UINT16 0x06 |
Unsigned 16 bit integer. | |
#define | GATT_FORMAT_UINT24 0x07 |
Unsigned 24 bit integer. | |
#define | GATT_FORMAT_UINT32 0x08 |
Unsigned 32 bit integer. | |
#define | GATT_FORMAT_UINT48 0x09 |
Unsigned 48 bit integer. | |
#define | GATT_FORMAT_UINT64 0x0a |
Unsigned 64 bit integer. | |
#define | GATT_FORMAT_UINT8 0x04 |
Unsigned 8 bit integer. | |
#define | GATT_FORMAT_UTF16S 0x1a |
UTF-16 string. | |
#define | GATT_FORMAT_UTF8S 0x19 |
UTF-8 string. | |
#define | GATT_INCLUDED_HANDLE(attrs, i) ( *((uint16 *)((attrs)[(i)].pValue)) ) |
The handle of the first included service (i = 1) is the value of the second attribute. | |
#define | GATT_LOCAL_READ 0xFF |
GATT local read. | |
#define | GATT_LOCAL_WRITE 0xFE |
GATT local write. | |
#define | GATT_NS_BT_DESC_UNKNOWN 0x0000 |
The description is unknown. | |
#define | GATT_NS_BT_SIG 0x01 |
Bluetooth SIG namespace. | |
#define | GATT_NS_NONE 0x00 |
No namespace. | |
#define | GATT_NUM_ATTRS(attrs) ( sizeof( attrs ) / sizeof( gattAttribute_t ) ) |
The number of attribute records in a given attribute table. | |
#define | GATT_PARAM_NUM_PREPARE_WRITES 0 |
RW uint8. | |
#define | GATT_PROP_AUTHEN 0x40 |
Permits signed writes to the Characteristic Value. | |
#define | GATT_PROP_BCAST 0x01 |
Permits broadcasts of the Characteristic Value. | |
#define | GATT_PROP_EXTENDED 0x80 |
Additional characteristic properties are defined in the Characteristic Extended Properties Descriptor. | |
#define | GATT_PROP_INDICATE 0x20 |
Permits indications of a Characteristic Value with acknowledgement. | |
#define | GATT_PROP_NOTIFY 0x10 |
Permits notifications of a Characteristic Value without acknowledgement. | |
#define | GATT_PROP_READ 0x02 |
Permits reads of the Characteristic Value. | |
#define | GATT_PROP_WRITE 0x08 |
Permits writes of the Characteristic Value with response. | |
#define | GATT_PROP_WRITE_NO_RSP 0x04 |
Permits writes of the Characteristic Value without response. | |
#define | GATT_SERV_CFG_BCAST 0x0001 |
The Characteristic Value shall be broadcast when the server is in the broadcast procedure if advertising data resources are available. | |
#define | GATT_SERVICE 0x00000001 |
GATT Services bit fields. | |
#define | GATT_SERVICE_HANDLE(attrs) ( (attrs)[0].handle ) |
The handle of a service is the handle of the first attribute. | |
Typedefs | |
typedef bStatus_t(* | pfnGATTAuthorizeAttrCB_t) (uint16 connHandle, gattAttribute_t *pAttr, uint8 opcode) |
Callback function prototype to authorize a Read or Write operation on a given attribute. More... | |
typedef bStatus_t(* | pfnGATTReadAttrCB_t) (uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint16 *pLen, uint16 offset, uint16 maxLen, uint8 method) |
Callback function prototype to read an attribute value. More... | |
typedef bStatus_t(* | pfnGATTWriteAttrCB_t) (uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint16 len, uint16 offset, uint8 method) |
Callback function prototype to write an attribute value. More... | |
typedef struct _serviceCBsList | serviceCBsList_t |
Service callbacks list item. | |
Functions | |
bStatus_t | GATTServApp_AddService (uint32 services) |
Add function for the GATT Service. More... | |
bStatus_t | GATTServApp_DelService (uint32 services) |
Delete function for the GATT Service. More... | |
bStatus_t | GATTServApp_DeregisterService (uint16 handle, gattAttribute_t **p2pAttrs) |
Deregister a service's attribute list and callback functions from the GATT Server Application. More... | |
gattAttribute_t * | GATTServApp_FindAttr (gattAttribute_t *pAttrTbl, uint16 numAttrs, uint8 *pValue) |
Find the attribute record within a service attribute table for a given attribute value pointer. More... | |
bStatus_t | GATTServApp_GetParameter (uint8 param, void *pValue) |
Get a GATT Server parameter. More... | |
uint16 | GATTServApp_GetParamValue (void) |
Get a GATT Server Application Parameter value. More... | |
void | GATTServApp_InitCharCfg (uint16 connHandle, gattCharCfg_t *charCfgTbl) |
Initialize the client characteristic configuration table. More... | |
bStatus_t | GATTServApp_ProcessCCCWriteReq (uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint16 len, uint16 offset, uint16 validCfg) |
Process the client characteristic configuration write request for a given client. More... | |
bStatus_t | GATTServApp_ProcessCharCfg (gattCharCfg_t *charCfgTbl, uint8 *pValue, uint8 authenticated, gattAttribute_t *attrTbl, uint16 numAttrs, uint8 taskId, pfnGATTReadAttrCB_t pfnReadAttrCB) |
Process Client Characteristic Configuration change. More... | |
uint8 | GATTServApp_ReadAttr (uint16 connHandle, gattAttribute_t *pAttr, uint16 service, uint8 *pValue, uint16 *pLen, uint16 offset, uint16 maxLen, uint8 method) |
Read an attribute. If the format of the attribute value is unknown to GATT Server, use the callback function provided by the Service. More... | |
uint16 | GATTServApp_ReadCharCfg (uint16 connHandle, gattCharCfg_t *charCfgTbl) |
Read the client characteristic configuration for a given client. More... | |
bStatus_t | GATTServApp_ReadRsp (uint16 connHandle, uint8 *pValue, uint16 pLen, uint16 offset) |
If a service returns blePending to the read attribute call back invoked from GATTServApp, the service can later respond to with the value to be read using this API. More... | |
void | GATTServApp_RegisterForMsg (uint8 taskID) |
Register your task ID to receive event messages from the GATT Server Application. More... | |
bStatus_t | GATTServApp_RegisterService (gattAttribute_t *pAttrs, uint16 numAttrs, uint8 encKeySize, CONST gattServiceCBs_t *pServiceCBs) |
Register a service's attribute list and callback functions with the GATT Server Application. More... | |
void | GATTServApp_SendCCCUpdatedEvent (uint16 connHandle, uint16 attrHandle, uint16 value) |
Build and send the GATT_CLIENT_CHAR_CFG_UPDATED_EVENT to the application. More... | |
bStatus_t | GATTServApp_SendServiceChangedInd (uint16 connHandle, uint8 taskId) |
Send out a Service Changed Indication. More... | |
bStatus_t | GATTServApp_SetParameter (uint8 param, uint8 len, void *pValue) |
Set a GATT Server parameter. More... | |
void | GATTServApp_SetParamValue (uint16 value) |
Set a GATT Server Application Parameter value. Use this function to change the default GATT parameter values. More... | |
bStatus_t | GATTServApp_UpdateCharCfg (uint16 connHandle, uint16 attrHandle, uint16 value) |
Update the Client Characteristic Configuration for a given Client. More... | |
uint8 | GATTServApp_WriteAttr (uint16 connHandle, uint16 handle, uint8 *pValue, uint16 len, uint16 offset, uint8 method) |
Write attribute data. More... | |
uint8 | GATTServApp_WriteCharCfg (uint16 connHandle, gattCharCfg_t *charCfgTbl, uint16 value) |
Write the client characteristic configuration for a given client. More... | |
Variables | |
prepareWrites_t * | prepareWritesTbl |
Server Prepare Write table (one entry per each physical link) | |
serviceCBsList_t * | serviceCBsList |
Callbacks for services. | |