TI BLE5-Stack API Documentation  1.01.08.00
Modules | Files | Macros | Typedefs | Functions
GAP GATT Server

This module implements the GAP Attribute Server. More...

Modules

 GAP GATT Server Parameters
 

Files

file  gapgattserver.h
 

Macros

#define GAP_DEVICE_NAME_LEN   21
 Length of Device Name Attribute value excluding null-terminate char.
 
#define GAP_PRIVACY_DISABLED   0x00
 Central Address Resolution: Privacy is Disabled.
 
#define GAP_PRIVACY_ENABLED   0x01
 Central Address Resolution: Privacy is Enabled.
 
#define GAP_RPA_ONLY_MODE   0x00
 Only Resolvable Private Addresses Shall Be Used.
 

Typedefs

typedef void(* ggsAttrValueChange_t) (uint16 connHandle, uint8 attrId)
 Callback to notify when attribute value is changed over the air.
 

Functions

bStatus_t GGS_AddService (uint32 services)
 
bStatus_t GGS_DelService (uint32 services)
 
bStatus_t GGS_GetParameter (uint8 param, void *value)
 
uint16 GGS_GetParamValue (void)
 
void GGS_RegisterAppCBs (ggsAppCBs_t *appCallbacks)
 
bStatus_t GGS_SetParameter (uint8 param, uint8 len, void *value)
 
void GGS_SetParamValue (uint16 value)
 

Detailed Description

This module implements the GAP Attribute Server.

Function Documentation

§ GGS_AddService()

bStatus_t GGS_AddService ( uint32  services)

Add function for the GAP GATT Service.

Parameters
servicesservices to add. This is a bit map and can contain more than one service.
Returns
SUCCESS : Service added successfully.
INVALIDPARAMETER : Invalid service field.
FAILURE : Not enough attribute handles available.
bleMemAllocError : Memory allocation error occurred.

§ GGS_DelService()

bStatus_t GGS_DelService ( uint32  services)

Delete function for the GAP GATT Service.

Parameters
servicesservices to delete. This is a bit map and can contain more than one service.
Returns
SUCCESS : Service deleted successfully.
FAILURE : Service not found.

§ GGS_GetParameter()

bStatus_t GGS_GetParameter ( uint8  param,
void *  value 
)

Get a GAP GATT Server parameter.

Parameters
paramProfile parameter ID
valuepointer to data to use. This is dependent on the parameter ID and will be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16_t pointer)
Returns
bStatus_t

§ GGS_GetParamValue()

uint16 GGS_GetParamValue ( void  )

Get a GGS Parameter value.

Returns
GGS Parameter value

§ GGS_RegisterAppCBs()

void GGS_RegisterAppCBs ( ggsAppCBs_t *  appCallbacks)

Registers the application callback function.

Note
Callback registration is needed only when the Device Name is made writable. The application will be notified when the Device Name is changed over the air.
Parameters
appCallbackspointer to application callbacks.

§ GGS_SetParameter()

bStatus_t GGS_SetParameter ( uint8  param,
uint8  len,
void *  value 
)

Set a GAP GATT Server parameter.

Parameters
paramProfile parameter ID
lenlength of data to write
valuepointer to data to write. This is dependent on the parameter ID and will be cast to the appropriate data type (example: data type of uint16_t will be cast to uint16 pointer)
Returns
bStatus_t

§ GGS_SetParamValue()

void GGS_SetParamValue ( uint16  value)

Set a GGS Parameter value.

Use this function to change the default GGS parameter values.

Parameters
valuenew GGS param value
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale