XDK API  3.6.0
Documentation
Files | Data Structures | Typedefs | Enumerations | Functions | Variables
ServalPalBLE

PAL adaptation for application to talk LWM2M over Bluetooth peripheral. More...

+ Collaboration diagram for ServalPalBLE:

Files

file  BCDS_ServalPalBle.h
 

Data Structures

struct  ServalPalBle_RxData_S
 Structure to represent Bluetooth peripheral received packets. More...
 

Typedefs

typedef enum ServalPalBle_Event_E ServalPalBle_Event_T
 Typedef to represent the Bluetooth peripheral event that the PAL needs to be notified. More...
 
typedef struct
ServalPalBle_RxData_S 
ServalPalBle_RxData_T
 Typedef to represent Bluetooth peripheral received packet. More...
 
typedef Retcode_T(* ServalPalBle_SendDataFunction_T )(uint8_t *payload, uint8_t payloadLen)
 Typedef to send data to the client. More...
 

Enumerations

enum  ServalPalBle_Event_E
 Enumeration to represent the Bluetooth peripheral events that the PAL needs to be notified. More...
 

Functions

Retcode_T ServalPalBle_Init (ServalPalBle_SendDataFunction_T sendDataFunction)
 BLE specific initialization. More...
 
bool ServalPalBle_IsConnected (void)
 checks if a Bluetooth connection is established More...
 
bool ServalPalBle_IsInit (void)
 checks if this module is initialized More...
 
void ServalPalBle_NotifyBleEvent (ServalPalBle_Event_T Event, void *data)
 This function acts as a notify call for the BLE events. Based on the events received, the event data is made use in PAL. For example, this function will de-validate the socket if the BLE remote device disconnects. More...
 

Variables

const ServalPalOps_Udp_T *const ServalPalOps_UdpBLE
 

Detailed Description


Data Structure Documentation

struct ServalPalBle_RxData_S

Data Fields

uint8_t DataLength
 
uint8_t * ReceiveBuffer
 

Field Documentation

uint8_t DataLength

Length of the received data packet

uint8_t* ReceiveBuffer

Pointer to the received packet data buffer

Typedef Documentation

typedef Retcode_T(* ServalPalBle_SendDataFunction_T)(uint8_t *payload, uint8_t payloadLen)
Parameters
[in]payloadThe payload to be sent
[in]payloadLenThe length of the payload to be sent
Returns
RETCODE_OK on success, or an error code otherwise.
Note
This must be a non blocking call. The status of the actual send needs to be provided via ServalPalBle_NotifyBleEvent

Enumeration Type Documentation

Enumerator
SERVALPALBLE_CONNECTED 

When the Bluetooth peripheral is connected

SERVALPALBLE_DISCONNECTED 

When the Bluetooth peripheral is disconnected

SERVALPALBLE_SEND_STATUS 

The status of a single packet send trigger via Bluetooth peripheral

SERVALPALBLE_RX_DATA 

For ever single packet received via Bluetooth peripheral

SERVALPALBLE_EVENT_MAX 

Defines boundary of Bluetooth peripheral events

Function Documentation

Retcode_T ServalPalBle_Init ( ServalPalBle_SendDataFunction_T  sendDataFunction)
Parameters
[in]sendDataFunctionThe function to be triggered for sending independent packets via Bluetooth peripheral.
Returns
RETCODE_OK initialization of Ble was successful
RETCODE_INVALID_PARAM sendDataFunction is NULL
RETCODE_OUT_OF_RESOURCES Mutex creation was failed
In case of any other error refer ServalPalBle_Init error codes.
bool ServalPalBle_IsConnected ( void  )
Returns
obvious
bool ServalPalBle_IsInit ( void  )
Returns
obvious
void ServalPalBle_NotifyBleEvent ( ServalPalBle_Event_T  Event,
void *  data 
)
Parameters
[in]EventThe Bluetooth peripheral event that the PAL needs to be notified.
[in]dataThe data corresponding to the Event parameter

| event | data |

| SERVALPALBLE_CONNECTED | unused | | SERVALPALBLE_DISCONNECTED | unused | | SERVALPALBLE_SEND_STATUS | Retcode_T |

| SERVALPALBLE_RX_DATA | ServalPalBle_RxData_T |

Variable Documentation

const ServalPalOps_Udp_T* const ServalPalOps_UdpBLE

predefined table item


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:52 by doxygen 1.8.8