This group contains modules related to generic attribute profile layer.
More...
|
static void | cgmservice_cb (uint8 event, uint8 *valueP, uint8 *len, uint8 *result) |
| The callback function in the application layer when the GATT service layer receives read/write operation to one of the CGM service characteristic. More...
|
|
bStatus_t | CGM_AddService (uint32 services) |
| Initializes the CGM service by registering GATT attributes with the GATT server. More...
|
|
void | CGM_Register (CGMServiceCB_t pfnServiceCB) |
| Register a callback function with the CGM Service. More...
|
|
static uint8 | CGM_ReadAttrCB (uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen) |
| The callback function when an attribute is being read by a collector. More...
|
|
static bStatus_t | CGM_WriteAttrCB (uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 len, uint16 offset) |
| The CGM service layer callback function when an attribute is being written to by the collector. More...
|
|
This group contains modules related to generic attribute profile layer.
@}
@{
bStatus_t CGM_AddService |
( |
uint32 |
services | ) |
|
Initializes the CGM service by registering GATT attributes with the GATT server.
- Parameters
-
services | - services to add. This is a bit map and can contain more than one service. |
- Returns
- Success or Failure
static uint8 CGM_ReadAttrCB |
( |
uint16 |
connHandle, |
|
|
gattAttribute_t * |
pAttr, |
|
|
uint8 * |
pValue, |
|
|
uint8 * |
pLen, |
|
|
uint16 |
offset, |
|
|
uint8 |
maxLen |
|
) |
| |
|
static |
The callback function when an attribute is being read by a collector.
- Parameters
-
connHandle | - connection message was received on |
pAttr | - pointer to attribute |
pValue | - pointer to data to be read |
pLen | - length of data to be read |
offset | - offset of the first octet to be read |
maxLen | - maximum length of data to be read |
- Returns
- Success or Failure
Register a callback function with the CGM Service.
- Parameters
-
pfnServiceCB | - Callback function. |
- Returns
- None.
static bStatus_t CGM_WriteAttrCB |
( |
uint16 |
connHandle, |
|
|
gattAttribute_t * |
pAttr, |
|
|
uint8 * |
pValue, |
|
|
uint8 |
len, |
|
|
uint16 |
offset |
|
) |
| |
|
static |
The CGM service layer callback function when an attribute is being written to by the collector.
- Parameters
-
connHandle | - connection message was received on |
pAttr | - pointer to attribute |
pValue | - pointer to data to be written |
len | - length of data |
offset | - offset of the first octet to be written |
- Returns
- Success or Failure
static void cgmservice_cb |
( |
uint8 |
event, |
|
|
uint8 * |
valueP, |
|
|
uint8 * |
len, |
|
|
uint8 * |
result |
|
) |
| |
|
static |
The callback function in the application layer when the GATT service layer receives read/write operation to one of the CGM service characteristic.
- Parameters
-
event | - service event. Enumeration can be found in cgmservice.h |
valueP | - data value past from the GATT layer to the Application Layer, or vice versa. |
result | - the address to the memory to pass the processing result back to the GATT layer |
len | - pointer to the length of the data residing in valueP |
- Returns
- none
gattAttribute_t CGMAttrTbl[] |
|
static |
This variable is used to define the attributes of the CGM service
CONST gattServiceCBs_t CGMCBs |
Initial value:=
{
NULL
}
static uint8 CGM_ReadAttrCB(uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen)
The callback function when an attribute is being read by a collector.
Definition: cgmservice.c:421
static bStatus_t CGM_WriteAttrCB(uint16 connHandle, gattAttribute_t *pAttr, uint8 *pValue, uint8 len, uint16 offset)
The CGM service layer callback function when an attribute is being written to by the collector...
Definition: cgmservice.c:475
Service Callbacks
The variable to register the CGM service callback function.