![]()  | 
  ![]()  | 
| 
    TI BLE-Stack for Bluetooth 4.2 API Documentation
    3.01.00.07
    
   | 
 
This module implements the Link Database Module. More...
Modules | |
| LinkDB Callbacks | |
| LinkDB Constants | |
| LinkDB Data Structures | |
Files | |
| file | linkdb.h | 
| LinkDB layer interface.  | |
Macros | |
| #define | linkDB_Authenticated(connectionHandle) linkDB_State( (connectionHandle), LINK_AUTHENTICATED ) | 
| Check to see if the physical link is authenticated.  More... | |
| #define | linkDB_Bonded(connectionHandle) linkDB_State( (connectionHandle), LINK_BOUND ) | 
| Check to see if the physical link is bonded.  More... | |
| #define | linkDB_Encrypted(connectionHandle) linkDB_State( (connectionHandle), LINK_ENCRYPTED ) | 
| Check to see if the physical link is encrypted.  More... | |
| #define | linkDB_Up(connectionHandle) linkDB_State( (connectionHandle), LINK_CONNECTED ) | 
| Check to see if a physical link is up (connected).  More... | |
Functions | |
| uint8 | linkDB_Add (uint8 taskID, uint16 connectionHandle, uint8 stateFlags, uint8 addrType, uint8 *pAddr, uint8 *pAddrPriv, uint8 connRole, uint16 connInterval, uint16 MTU) | 
| Adds a record to the link database.  More... | |
| uint8 | linkDB_Authen (uint16 connectionHandle, uint8 keySize, uint8 mitmRequired) | 
| Check to see if the physical link is encrypted and authenticated.  More... | |
| linkDBItem_t * | linkDB_Find (uint16 connectionHandle) | 
| Find the link.  More... | |
| linkDBItem_t * | linkDB_FindFirst (uint8 taskID) | 
| Find the first link that matches the taskID.  More... | |
| uint8 | linkDB_GetInfo (uint16 connectionHandle, linkDBInfo_t *pInfo) | 
| Get information about a link.  More... | |
| NODOC void | linkDB_Init (void) | 
| Initialize the Link Database.  | |
| uint16 | linkDB_MTU (uint16 connectionHandle) | 
| This function is used to get the MTU size of a link.  More... | |
| uint8 | linkDB_NumActive (void) | 
| Return the number of active connections.  More... | |
| uint8 | linkDB_NumConns (void) | 
| return the maximum number of connections supported.  More... | |
| void | linkDB_PerformFunc (pfnPerformFuncCB_t cb) | 
| Perform a function of each connection in the link database.  More... | |
| uint8 | linkDB_Register (pfnLinkDBCB_t pFunc) | 
| Register with linkDB.  More... | |
| uint8 | linkDB_Remove (uint16 connectionHandle) | 
| Remove a record from the link database.  More... | |
| uint8 | linkDB_Role (uint16 connectionHandle) | 
| Get the role of a physical link.  More... | |
| void | linkDB_SecurityModeSCOnly (uint8 state) | 
| Set a device into Secure Connection Only Mode.  More... | |
| uint8 | linkDB_State (uint16 connectionHandle, uint8 state) | 
| Check to see if a physical link is in a specific state.  More... | |
| uint8 | linkDB_Update (uint16 connectionHandle, uint8 newState, uint8 add) | 
| Update the stateFlags of a link record.  More... | |
| uint8 | linkDB_UpdateMTU (uint16 connectionHandle, uint16 newMtu) | 
| update the MTU size of a link or record.  More... | |
This module implements the Link Database Module.
| #define linkDB_Authenticated | ( | connectionHandle | ) | linkDB_State( (connectionHandle), LINK_AUTHENTICATED ) | 
Check to see if the physical link is authenticated.
| connectionHandle | - controller link connection handle. | 
| #define linkDB_Bonded | ( | connectionHandle | ) | linkDB_State( (connectionHandle), LINK_BOUND ) | 
Check to see if the physical link is bonded.
| connectionHandle | - controller link connection handle. | 
| #define linkDB_Encrypted | ( | connectionHandle | ) | linkDB_State( (connectionHandle), LINK_ENCRYPTED ) | 
Check to see if the physical link is encrypted.
| connectionHandle | - controller link connection handle. | 
| #define linkDB_Up | ( | connectionHandle | ) | linkDB_State( (connectionHandle), LINK_CONNECTED ) | 
Check to see if a physical link is up (connected).
| connectionHandle | - controller link connection handle. | 
| uint8 linkDB_Add | ( | uint8 | taskID, | 
| uint16 | connectionHandle, | ||
| uint8 | stateFlags, | ||
| uint8 | addrType, | ||
| uint8 * | pAddr, | ||
| uint8 * | pAddrPriv, | ||
| uint8 | connRole, | ||
| uint16 | connInterval, | ||
| uint16 | MTU | ||
| ) | 
Adds a record to the link database.
| taskID | - Application task ID | 
| connectionHandle | - new record connection handle | 
| stateFlags | - LinkDB Connection State Flags | 
| addrType | - Device Address Type | 
| pAddr | - new address | 
| pAddrPriv | - private address (only if addrType is 0x02 or 0x03) | 
| connRole | - GAP Profile Roles | 
| connInterval | - connection's communications interval (n * 1.23 ms) | 
| MTU | - connection's MTU size | 
| uint8 linkDB_Authen | ( | uint16 | connectionHandle, | 
| uint8 | keySize, | ||
| uint8 | mitmRequired | ||
| ) | 
Check to see if the physical link is encrypted and authenticated.
| connectionHandle | - controller link connection handle. | 
| keySize | - size of encryption keys. | 
| mitmRequired | - TRUE (yes) or FALSE (no). | 
| linkDBItem_t* linkDB_Find | ( | uint16 | connectionHandle | ) | 
Find the link.
Uses the connection handle to search the link database.
| connectionHandle | - controller link connection handle. | 
| linkDBItem_t* linkDB_FindFirst | ( | uint8 | taskID | ) | 
Find the first link that matches the taskID.
| taskID | - taskID of app | 
| uint8 linkDB_GetInfo | ( | uint16 | connectionHandle, | 
| linkDBInfo_t * | pInfo | ||
| ) | 
Get information about a link.
Copies relevant link info into pInfo. Uses the connection handle to search the link database.
| connectionHandle | - controller link connection handle. | 
| pInfo | - address of link info item to copy information | 
| uint16 linkDB_MTU | ( | uint16 | connectionHandle | ) | 
This function is used to get the MTU size of a link.
| connectionHandle | - controller link connection handle. | 
| uint8 linkDB_NumActive | ( | void | ) | 
Return the number of active connections.
| uint8 linkDB_NumConns | ( | void | ) | 
return the maximum number of connections supported.
| void linkDB_PerformFunc | ( | pfnPerformFuncCB_t | cb | ) | 
Perform a function of each connection in the link database.
| cb | - connection callback function. | 
| uint8 linkDB_Register | ( | pfnLinkDBCB_t | pFunc | ) | 
Register with linkDB.
Register with this function to receive a callback when status changes on a connection. If the stateflag == 0, then the connection has been disconnected.
| pFunc | - function pointer to callback function | 
| uint8 linkDB_Remove | ( | uint16 | connectionHandle | ) | 
Remove a record from the link database.
| connectionHandle | - new record connection handle | 
| uint8 linkDB_Role | ( | uint16 | connectionHandle | ) | 
Get the role of a physical link.
| connectionHandle | - controller link connection handle. | 
| void linkDB_SecurityModeSCOnly | ( | uint8 | state | ) | 
Set a device into Secure Connection Only Mode.
| state | - TRUE for Secure Connections Only Mode.  FALSE to disable Secure Connections Only Mode.  | 
| uint8 linkDB_State | ( | uint16 | connectionHandle, | 
| uint8 | state | ||
| ) | 
Check to see if a physical link is in a specific state.
| connectionHandle | - controller link connection handle. | 
| state | - LinkDB Connection State Flags state to look for. | 
| uint8 linkDB_Update | ( | uint16 | connectionHandle, | 
| uint8 | newState, | ||
| uint8 | add | ||
| ) | 
Update the stateFlags of a link record.
| connectionHandle | - maximum number of connections. | 
| newState | - LinkDB Connection State Flags. This value is OR'd in to this field. | 
| add | - TRUE to set state into flags, FALSE to remove. | 
| uint8 linkDB_UpdateMTU | ( | uint16 | connectionHandle, | 
| uint16 | newMtu | ||
| ) | 
update the MTU size of a link or record.
| connectionHandle | - controller link connection handle. | 
| newMtu | - new MTU size. |