TI BLE5-Stack API Documentation  9.14.00
handover.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  @file handover.h
4 
5  @brief This file contains handover APIs.
6 
7  Group: WCS, BTS
8  $Target Device: DEVICES $
9 
10  ******************************************************************************
11  $License: TI_TEXT 2024 $
12  ******************************************************************************
13  $Release Name: PACKAGE NAME $
14  $Release Date: PACKAGE RELEASE DATE $
15  *****************************************************************************/
16 
17 #ifndef HANDOVER_H
18 #define HANDOVER_H
19 
20 /*******************************************************************************
21  * INCLUDES
22  */
23 #include "ti/ble/controller/ll/ll.h"
25 
26 /*******************************************************************************
27  * MACROS
28  */
29 
30 /*******************************************************************************
31  * CONSTANTS
32  */
33 
34 /*******************************************************************************
35  * TYPEDEFS
36  */
37 // Invalid connection handle, used for no connection handle
38 #define HANDOVER_CONNHANDLE_INVALID LL_CONNHANDLE_INVALID
39 
40 // Handover Data Size defines
41 #define HANDOVER_HOST_DATA_SIZE 0
42 #define HANDOVER_INVALID_DATA_SIZE 0xFFFFFFFF
43 
44 #define HANDOVER_DEFAULT_MAX_FAILED_CONN_EVENTS 6
45 
46 #define HANDOVER_CONN_ESTABLISH_WITH_HANDOVER LL_STATUS_ESTABLISH_WITH_HANDOVER
47 
48 #define HANDOVER_TX_BURST_RATIO_DEFAULT_VAL 30
49 // Defines for serving node modes
50 #define HANDOVER_SN_MODE_DISCONNECT_IMMED 0
51 #define HANDOVER_SN_MODE_WAIT_CN_STATUS 1
52 
53 /************************************
54  * Serving Node *
55  ************************************/
56 
57 /*
58 * @brief Host Handover Start SN Callback
59 *
60 * @note
61 * This callback will trigger with a success status once it will finish filling
62 * the handover data. Otherwise, this callback will be called with an error code
63 *
64 * @param status - the stack status (SUCCESS, bleInvalidRange, bleNotConnected)
65 *
66 * @return None
67 */
68 typedef void(*pfnHandoverStartSNCB_t)(uint16_t connHandle, uint32_t status);
69 
73 typedef struct
74 {
77 
81 typedef struct
82 {
83  uint16_t connHandle;
84  uint32_t handoverDataSize;
85  uint8_t *pHandoverData;
86  uint32_t rfu;
87  uint8_t handoverSnMode;
88  uint16_t minGattHandle;
89  uint16_t maxGattHandle;
91 
92 /************************************
93  * Candidate Node *
94  ************************************/
95 
96 /*
97 * @brief Host Handover Start CN Callback
98 *
99 * @note
100 * This callback will trigger with a success sta tus if the candidate was able
101 * to follow the new connection. Otherwise, a failure status will be returned
102 *
103 * @param status - the stack status (SUCCESS, FAILURE)
104 *
105 * @return None
106 */
107 typedef void(*pfnHandoverStartCNCB_t)(uint16_t connHandle, uint32_t status);
108 
112 typedef struct
113 {
116 
120 typedef struct
121 {
122  uint8_t *pHandoverData;
123  uint8_t appTaskId;
124  uint32_t timeDeltaInUs;
126  uint16_t rfu;
128  uint8_t txBurstRatio;
132 
133 /*******************************************************************************
134  * LOCAL VARIABLES
135  */
136 
137 /*******************************************************************************
138  * GLOBAL VARIABLES
139  */
140 
141 /*******************************************************************************
142  * FUNCTIONS
143  */
144 
145 /************************************
146  * Serving Node APIs *
147  ************************************/
148 
159 uint8_t Handover_InitSNParams(handoverSNParams_t *pParams);
160 
171 uint8_t Handover_RegisterSNCBs(const handoverSNCBs_t *pCBs);
172 
173 
187 uint32_t Handover_GetSNDataSize(handoverSNParams_t *pParams);
188 
211 uint8_t Handover_StartSN(handoverSNParams_t *pParams);
212 
228 uint8_t Handover_CloseSN( handoverSNParams_t *pParams, uint16_t handoverStatus );
229 
230 /************************************
231  * Candidate Node APIs *
232  ************************************/
233 
244 uint8_t Handover_RegisterCNCBs(const handoverCNCBs_t *pCBs);
245 
256 uint8_t Handover_InitCNParams(handoverCNParams_t *pParams);
257 
278 uint8_t Handover_StartCN( handoverCNParams_t *pParams );
279 
280 /*******************************************************************************
281  * @fn Handover_ApplyCnData
282  *
283  * @brief This function is used to trigger all the handover modules
284  * upon receiving connection establish event
285  *
286  * @param connHandle - Connection handle
287  *
288  * @return None
289  */
290 void Handover_ApplyCnData(uint16_t connHandle);
291 
292 #endif /* HANDOVER_H */
uint8_t Handover_CloseSN(handoverSNParams_t *pParams, uint16_t handoverStatus)
Host Handover Serving Node Configuration parameters.
Definition: handover.h:81
pfnHandoverStartCNCB_t pfnHandoverStartCNCB
Definition: handover.h:114
uint32_t maxFailedConnEvents
Definition: handover.h:127
uint8_t Handover_StartSN(handoverSNParams_t *pParams)
Common Defines.
uint8_t Handover_StartCN(handoverCNParams_t *pParams)
uint32_t timeDeltaMaxErrInUs
The maximum deviation time in us.
Definition: handover.h:125
uint8_t Handover_RegisterCNCBs(const handoverCNCBs_t *pCBs)
void(* pfnHandoverStartSNCB_t)(uint16_t connHandle, uint32_t status)
Definition: handover.h:68
uint8_t handoverSnMode
0 - Terminate the connection immediately on the serving node side, 1 - wait for the candidate respons...
Definition: handover.h:87
uint8_t * pHandoverData
The handover data given by the serving node.
Definition: handover.h:122
uint32_t handoverDataSize
The stack handover data size.
Definition: handover.h:84
uint32_t timeDeltaInUs
The time in us it took for the data to be transferred from the serving node to the candidate node...
Definition: handover.h:124
Host Handover Candidate Node Configuration parameters.
Definition: handover.h:120
uint8_t appTaskId
Application task ID.
Definition: handover.h:123
uint8_t Handover_InitCNParams(handoverCNParams_t *pParams)
uint8_t * pHandoverData
Pointer to the buffer the application allocated.
Definition: handover.h:85
Host Handover SN callbacks.
Definition: handover.h:73
uint16_t connHandle
Connection handle.
Definition: handover.h:83
uint32_t rfu
Reserved for future use.
Definition: handover.h:86
pfnHandoverStartSNCB_t pfnHandoverStartSNCB
Definition: handover.h:75
uint16_t maxGattHandle
Maximum GATT handle.
Definition: handover.h:89
void Handover_ApplyCnData(uint16_t connHandle)
uint8_t Handover_RegisterSNCBs(const handoverSNCBs_t *pCBs)
uint16_t rfu
Reserved for future use.
Definition: handover.h:126
uint32_t Handover_GetSNDataSize(handoverSNParams_t *pParams)
uint16_t minGattHandle
Minimum GATT handle.
Definition: handover.h:88
void(* pfnHandoverStartCNCB_t)(uint16_t connHandle, uint32_t status)
Definition: handover.h:107
uint8_t Handover_InitSNParams(handoverSNParams_t *pParams)
Host Handover CN callbacks.
Definition: handover.h:112
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale