|
bStatus_t | GATT_InitServer (void) |
| Initialize the Generic Attribute Profile Server. More...
|
|
bStatus_t | GATT_RegisterService (gattService_t *pService) |
| Register a service attribute list with the GATT Server. A service is composed of characteristics or references to other services. Each characteristic contains a value and may contain optional information about the value. There are two types of services: primary service and secondary service. More...
|
|
bStatus_t | GATT_DeregisterService (uint16 handle, gattService_t *pService) |
| Deregister a service attribute list with the GATT Server. More...
|
|
void | GATT_RegisterForReq (uint8 taskId) |
| Register to receive incoming ATT Requests. More...
|
|
bStatus_t | GATT_VerifyReadPermissions (uint16 connHandle, gattAttribute_t *pAttr, uint16 service) |
| Verify the permissions of an attribute for reading. More...
|
|
bStatus_t | GATT_VerifyWritePermissions (uint16 connHandle, gattAttribute_t *pAttr, uint16 service, attWriteReq_t *pReq) |
| Verify the permissions of an attribute for writing. More...
|
|
uint8 | GATT_ServiceChangedInd (uint16 connHandle, uint8 taskId) |
| Send out a Service Changed Indication. More...
|
|
gattAttribute_t * | GATT_FindHandleUUID (uint16 startHandle, uint16 endHandle, const uint8 *pUUID, uint16 len, uint16 *pHandle) |
| Find the attribute record for a given handle and UUID. More...
|
|
gattAttribute_t * | GATT_FindHandle (uint16 handle, uint16 *pHandle) |
| Find the attribute record for a given handle. More...
|
|
gattAttribute_t * | GATT_FindNextAttr (gattAttribute_t *pAttr, uint16 endHandle, uint16 service, uint16 *pLastHandle) |
| Find the next attribute of the same type for a given attribute. More...
|
|
uint16 | GATT_ServiceNumAttrs (uint16 handle) |
| Get the number of attributes for a given service. More...
|
|
uint8 | GATT_ServiceEncKeySize (uint16 handle) |
| Get the minimum encryption key size required by a given service. More...
|
|
bStatus_t | GATT_SendRsp (uint16 connHandle, uint8 method, gattMsg_t *pRsp) |
| Send an ATT Response message out. More...
|
|
Register a service attribute list with the GATT Server. A service is composed of characteristics or references to other services. Each characteristic contains a value and may contain optional information about the value. There are two types of services: primary service and secondary service.
A service definition begins with a service declaration and ends before the next service declaration or the maximum Attribute Handle.
A characteristic definition begins with a characteristic declaration and ends before the next characteristic or service declaration or maximum Attribute Handle.
The attribute server will only keep a pointer to the attribute list, so the calling application will have to maintain the code and RAM associated with this list.
- Parameters
-
pService | - pointer to service attribute list to be registered |
- Returns
- SUCCESS: Service registered successfully.
INVALIDPARAMETER: Invalid service field.
FAILURE: Not enough attribute handles available.
bleMemAllocError: Memory allocation error occurred.
bleInvalidRange: Encryption key size's out of range.