XDK API  3.6.0
Documentation
Data Structures | Macros | Typedefs | Functions | Variables
GridEyeService.c File Reference
#include "XdkCommonInfo.h"
#include "BCDS_Retcode.h"
#include "FreeRTOS.h"
#include "timers.h"
#include "semphr.h"
#include "task.h"
#include "GridEyeService.h"
#include "BleTypes.h"
#include "BCDS_Ble.h"
#include "BCDS_BlePeripheral.h"
#include "attserver.h"
+ Include dependency graph for GridEyeService.c:

Data Structures

struct  GridEye_Characteristic_S
 structure to hold the characteristic properties of GridEye communication service More...
 

Macros

#define BCDS_MODULE_ID   XDK_COMMON_ID_GRIDEYESERVICE
 
#define BLE_OS_DELAY_UPON_CONNECT   (UINT32_C(250))
 

Typedefs

typedef struct
GridEye_Characteristic_S 
GridEye_Characteristic_T
 Typedef to represent the characteristic properties of GridEye communication service. More...
 

Functions

void BleGap_Add128bitsServiceUUID (const U8 *uuid)
 
Retcode_T GridEyeService_Init (GridEyeService_DataReceivedCallBack readCallback, GriEyeService_SendEventCallback sendCallback)
 Initializes the GridEye Service. More...
 
Retcode_T GridEyeService_Register (void)
 This contains the implementation to register the GridEye Service to the BLE stack. More...
 
Retcode_T GridEyeService_SendData (U8 *payload, U8 payloadLen)
 
static void GridEyeService_ServiceCallback (AttServerCallbackParms *attData)
 This is the GridEye BLE sensor service callback, register at the time of BLE initialization. This application level callback gets triggered on various BLE event such as, Attribute events. More...
 
void GridEyeService_UpdateConnectionStatus (bool connectionStatus)
 This function notifies the BLE connection status. More...
 

Variables

static TickType_t BleLastWakeTimeUponConnect = 0UL
 
static uint16_t ConnectionHandle
 
static
GridEyeService_DataReceivedCallBack 
DataReadCallBack = NULL
 
static GridEye_Characteristic_T GridEyeBleNotifyCharProperties
 
static GridEye_Characteristic_T GridEyeBleRxCharProperties
 
static GridEye_Characteristic_T GridEyeBleTxCharProperties
 
static uint8_t GridEyeCharacteristicWrite [100]
 
static AttServiceAttribute GridEyeServiceAttribute
 
const uint8_t GridEyeServiceUUID [16] = { 0xB7, 0x5C, 0x49, 0xD2, 0x04, 0xA3, 0x40, 0x71, 0xA0, 0xB5, 0x35, 0x85, 0x3E, 0xB0, 0x83, 0x07 }
 
static bool IsFirstSendPending = false
 
static
GriEyeService_SendEventCallback 
SendCallBack = NULL
 

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_COMMON_ID_GRIDEYESERVICE
#define BLE_OS_DELAY_UPON_CONNECT   (UINT32_C(250))

Typedef Documentation

Function Documentation

void BleGap_Add128bitsServiceUUID ( const U8 uuid)

+ Here is the caller graph for this function:

Retcode_T GridEyeService_Init ( GridEyeService_DataReceivedCallBack  readCallback,
GriEyeService_SendEventCallback  sendCallback 
)

Initializes the GridEye Service with a readCallback and a sendCallback to be implemented by the application.

Parameters
[in]readCallbackApplication Callback that will be called on data reception for any data reception
[in]sendCallbackApplication Callback that will be notified about the data send status.
Returns
RETCODE_OK on success, or an error code otherwise. Refer Retcode_General_E and Ble_Retcode_E for other values.
See also
GridEyeService_SendData
Retcode_T GridEyeService_Register ( void  )
Return values
RETCODE_OKif success error otherwise

+ Here is the call graph for this function:

Retcode_T GridEyeService_SendData ( U8 payload,
U8  payloadLen 
)

+ Here is the call graph for this function:

static void GridEyeService_ServiceCallback ( AttServerCallbackParms *  attData)
static
Parameters
[in]attDataContains the type of actionEvent triggered by BLE

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void GridEyeService_UpdateConnectionStatus ( bool  connectionStatus)

This function notifies the BLE connection status

Parameters
[in]connectionStatusBLE connection status

+ Here is the call graph for this function:

Variable Documentation

TickType_t BleLastWakeTimeUponConnect = 0UL
static
uint16_t ConnectionHandle
static
GridEyeService_DataReceivedCallBack DataReadCallBack = NULL
static
GridEye_Characteristic_T GridEyeBleNotifyCharProperties
static
Initial value:
= {
{ 0xB9, 0x5C, 0x49, 0xD2, 0x04, 0xA3, 0x40, 0x71, 0xA0, 0xB5, 0x35, 0x85, 0x3E, 0xB0, 0x83, 0x07 },
{ 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0 } }
GridEye_Characteristic_T GridEyeBleRxCharProperties
static
Initial value:
= {
{ 0xBA, 0x5C, 0x49, 0xD2, 0x04, 0xA3, 0x40, 0x71, 0xA0, 0xB5, 0x35, 0x85, 0x3E, 0xB0, 0x83, 0x07 },
{ 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0 } }
GridEye_Characteristic_T GridEyeBleTxCharProperties
static
Initial value:
= {
{ 0xB8, 0x5C, 0x49, 0xD2, 0x04, 0xA3, 0x40, 0x71, 0xA0, 0xB5, 0x35, 0x85, 0x3E, 0xB0, 0x83, 0x07 },
{ 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0, { 0 } },
{ 0, 0, 0, { 0 }, { 0 }, 0, 0, 0, 0 } }
uint8_t GridEyeCharacteristicWrite[100]
static
AttServiceAttribute GridEyeServiceAttribute
static
const uint8_t GridEyeServiceUUID[16] = { 0xB7, 0x5C, 0x49, 0xD2, 0x04, 0xA3, 0x40, 0x71, 0xA0, 0xB5, 0x35, 0x85, 0x3E, 0xB0, 0x83, 0x07 }
bool IsFirstSendPending = false
static
GriEyeService_SendEventCallback SendCallBack = NULL
static

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:40 by doxygen 1.8.8