TI BLE5-Stack API Documentation
2.02.05.00
|
This module implements Real Time Localization System (RTLS) Control module. More...
Modules | |
RTLS Control Structures | |
Files | |
file | rtls_ble.h |
Stack specific BLE structures needed for RTLS Control. | |
file | rtls_ctrl.h |
RTLS Control module interface. | |
file | rtls_ctrl_api.h |
This file contains the RTLS Control API's. | |
file | rtls_host.h |
This file contains the host abstraction layer for a RTLS Host. | |
Data Structures | |
struct | rtlsConfiguration_t |
RTLS Configuration structure. More... | |
struct | rtlsCtrlReq_t |
RTLS Control request. More... | |
struct | rtlsEnableSync_t |
RTLS Enable Sync - This will tell the RTLS Application to start notifying RTLS Control about a specific connection. More... | |
struct | rtlsGetActiveConnInfo_t |
RTLS Get Active Connection Info - get the connection information for a specific handle. More... | |
struct | rtlsPacket_t |
RTLS Packet - Generic structure that will be translated to a specific command. More... | |
struct | rtlsTerminateLinkReq_t |
RTLS terminate link request. More... | |
struct | rtlsUpdateConnIntReq_t |
RTLS update connection interval request. More... | |
Macros | |
#define | BADDR_PAGE_OFFSET 0xFD0 |
#define | BDADDR_OFFSET 0x2E8 |
#define | BDADDR_VALID(bdAddr) |
#define | CHIP_ID_SIZE 6 |
Chip Identifier Size. | |
#define | RTLS_CMD_ADD_DEVICE_ADV_LIST 0x0D |
RTLS Node Manager command. | |
#define | RTLS_CMD_AOA_ENABLE 0x14 |
RTLS Node Manager command. | |
#define | RTLS_CMD_AOA_RESULT_RAW 0x24 |
RTLS Node Manager command. | |
#define | RTLS_CMD_AOA_SET_PARAMS 0x13 |
RTLS Node Manager command. | |
#define | RTLS_CMD_BLE_LOG_STRINGS_MAX 0x32 |
#define | RTLS_CMD_CL_AOA_ENABLE 0x15 |
RTLS Node Manager Command. | |
#define | RTLS_CMD_CL_AOA_RESULT_RAW 0x33 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CLEAR_ADV_LIST 0x10 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CONN_INFO 0x27 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CONN_PARAMS 0x02 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CONNECT 0x03 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CREATE_SYNC 0x09 |
RTLS Node Manager command. | |
#define | RTLS_CMD_CREATE_SYNC_CANCEL 0x0A |
RTLS Node Manager command. | |
#define | RTLS_CMD_GET_ACTIVE_CONN_INFO 0x32 |
RTLS Node Manager command. | |
#define | RTLS_CMD_GET_RTLS_PARAM 0x29 |
RTLS Node Manager command. | |
#define | RTLS_CMD_HEAP_SIZE 0x36 |
RTLS Node Manager command. | |
#define | RTLS_CMD_IDENTIFY 0x00 |
RTLS Node Manager command. | |
#define | RTLS_CMD_PERIODIC_RECEIVE_ENABLE 0x0C |
RTLS Node Manager command. | |
#define | RTLS_CMD_READ_ADV_LIST_SIZE 0x0F |
RTLS Node Manager command. | |
#define | RTLS_CMD_REMOVE_DEVICE_ADV_LIST 0x0E |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED 0x01 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED1 0x06 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED10 0x35 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED2 0x07 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED3 0x08 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED4 0x23 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED5 0x25 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED6 0x26 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED7 0x30 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED8 0x31 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESERVED9 0x34 |
RTLS Node Manager command. | |
#define | RTLS_CMD_RESET_DEVICE 0x20 |
RTLS Node Manager command. | |
#define | RTLS_CMD_SCAN 0x04 |
RTLS Node Manager command. | |
#define | RTLS_CMD_SCAN_STOP 0x05 |
RTLS Node Manager command. | |
#define | RTLS_CMD_SET_RTLS_PARAM 0x28 |
RTLS Node Manager command. | |
#define | RTLS_CMD_TERMINATE_LINK 0x22 |
RTLS Node Manager command. | |
#define | RTLS_CMD_TERMINATE_SYNC 0x0B |
RTLS Node Manager command. | |
#define | RTLS_CONNHANDLE_ALL 0xFFFD |
#define | RTLS_CONNHANDLE_INVALID 0xFFFF |
#define | RTLS_CTRL_ALL_EVENTS (RTLS_QUEUE_EVT) |
RTLS Task configuration. | |
#define | RTLS_CTRL_ASSERT_CAUSE_INVALID_PARAM 0x02 |
RTLS Assert Error code. | |
#define | RTLS_CTRL_ASSERT_CAUSE_NULL_POINTER_EXCEPT 0x03 |
RTLS Assert Error code. | |
#define | RTLS_CTRL_ASSERT_CAUSE_OUT_OF_MEMORY 0x01 |
RTLS Assert Error code. | |
#define | RTLS_CTRL_REV 0x2 |
#define | RTLS_CTRL_TASK_PRIORITY 2 |
RTLS Task configuration variable. | |
#define | RTLS_CTRL_TASK_STACK_SIZE 752 |
RTLS Task configuration variable. | |
#define | RTLS_EVT_ASSERT 0x80 |
RTLS async event. | |
#define | RTLS_EVT_CL_AOA_ENABLE 0x88 |
RTLS async event. | |
#define | RTLS_EVT_CONN_INFO 0x83 |
RTLS async event. | |
#define | RTLS_EVT_DEBUG 0x82 |
RTLS async event. | |
#define | RTLS_EVT_ERROR 0x81 |
RTLS async event. | |
#define | RTLS_EVT_PERIODIC_ADV_RPT 0x86 |
RTLS async event. | |
#define | RTLS_EVT_SYNC_EST 0x84 |
RTLS async event. | |
#define | RTLS_EVT_SYNC_LOST 0x85 |
RTLS async event. | |
#define | RTLS_EVT_TERMINATE_SYNC 0x87 |
RTLS async event. | |
#define | RTLS_FALSE 0 |
FALSE. | |
#define | RTLS_PARAM_2 0x02 |
RTLS Param type RTLS_CMD_SET_RTLS_PARAM command. | |
#define | RTLS_PARAM_3 0x03 |
RTLS Param type RTLS_CMD_SET_RTLS_PARAM command. | |
#define | RTLS_PARAM_CONNECTION_INTERVAL 0x01 |
RTLS Param type RTLS_CMD_SET_RTLS_PARAM command. | |
#define | RTLS_QUEUE_EVT UTIL_QUEUE_EVENT_ID |
Event_Id_30. | |
#define | RTLS_REQ_ADD_DEVICE_ADV_LIST 0x0E |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_AOA_ENABLE 0x07 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_BLE_LOG_STRINGS_MAX 0x9 |
#define | RTLS_REQ_CL_AOA_ENABLE 0x12 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_CLEAR_ADV_LIST 0x11 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_CONN 0x02 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_CREATE_SYNC_CANCEL 0x0B |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_ENABLE_SYNC 0x01 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_GET_ACTIVE_CONN_INFO 0x09 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_PERIODIC_RECEIVE_ENABLE 0x0D |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_READ_ADV_LIST_SIZE 0x10 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_REMOVE_DEVICE_ADV_LIST 0x0F |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_SCAN 0x03 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_SEND_DATA 0x04 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_SET_AOA_PARAMS 0x06 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_SET_CREATE_SYNC_PARAMS 0x0A |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_TERMINATE_LINK 0x05 |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_TERMINATE_SYNC 0x0C |
RTLS Application Command Opcode. | |
#define | RTLS_REQ_UPDATE_CONN_INTERVAL 0x08 |
RTLS Application Command Opcode. | |
#define | RTLS_TRUE 1 |
TRUE. | |
#define | RTLSUTIL_FREE(pFree) |
RTLSUTIL_FREE memory free without icall. More... | |
#define | RTLSUTIL_MALLOC(pAlloc, size) |
RTLSUTIL_MALLOC memory allocation without icall. More... | |
Typedefs | |
typedef void(* | pfnRtlsAppCb) (uint8_t *cmd) |
Application callback function. | |
Enumerations | |
enum | rtlsCapabilities_e { RTLS_CAP_NOT_INITIALIZED = 0x00000000, RTLS_CAP_CM = 0x00000001, RTLS_CAP_AOA_TX = 0x00000002, RTLS_CAP_AOA_RX = 0x00000004, RTLS_CAP_RESERVED1 = 0x00000008, RTLS_CAP_CL_AOA = 0x00000010, RTLS_CAP_RESERVED3 = 0x00000020, RTLS_CAP_RTLS_RESPONDER = 0x00000040, RTLS_CAP_RTLS_COORDINATOR = 0x00000080, RTLS_CAP_RTLS_PASSIVE = 0x00000100, RTLS_CAP_RTLS_CONNECTION_MONITOR = 0x00000200 } |
Enumeration for RTLS Capabilities. | |
enum | rtlsStatus_e { RTLS_SUCCESS, RTLS_FAIL, RTLS_LINK_ESTAB_FAIL, RTLS_LINK_TERMINATED, RTLS_OUT_OF_MEMORY, RTLS_CONFIG_NOT_SUPPORTED, RTLS_ILLEGAL_CMD } |
Enumeration for RTLS Status. | |
Functions | |
void | AssertHandler (uint8 assertCause, uint8 assertSubcause) |
void | RTLSCtrl_connInfoEvt (uint8_t *connInfo, uint16_t connInfoLen) |
RTLSCtrl_connInfoEvt. More... | |
void | RTLSCtrl_connResultEvt (uint16_t connHandle, uint8_t status) |
RTLSCtrl_connResultEvt. More... | |
void | RTLSCtrl_dataSentEvt (uint16_t connHandle, uint8_t status) |
RTLSCtrl_dataSentEvt. More... | |
void * | RTLSCtrl_malloc (uint32_t sz) |
This function will allocate memory, if we were unable to allocate we will report to RTLS Host. More... | |
void | RTLSCtrl_open (rtlsConfiguration_t *rtlsConfig) |
RTLSCtrl_open. More... | |
void | RTLSCTRL_processPeriodicAdvReport (uint8_t opcode, uint16_t syncHandle, int8_t txPower, int8_t rssi, uint8_t cteType, uint8_t dataStatus, uint8_t dataLen, uint8_t *pData) |
void | RTLSCtrl_processSyncEstEvt (uint8_t opcode, uint8_t status, uint16_t syncHandle, uint8_t advSid, uint8_t advAddrType, uint8_t advAddress[6], uint8_t advPhy, uint16_t periodicAdvInt, uint8_t advClockAccuracy) |
RTLSCtrl_processSyncEstEvt. More... | |
void | RTLSCtrl_processSyncLostEvt (uint8_t opcode, uint16_t syncHandle) |
void | RTLSCtrl_processTerminateSyncEvt (void) |
void | RTLSCtrl_rtlsPacketEvt (uint8_t *pPkt) |
RTLSCtrl_rtlsPacketEvt. More... | |
void | RTLSCtrl_scanResultEvt (rtlsStatus_e status, uint8_t *scanResult, uint8_t size) |
RTLSCtrl_scanResultEvt. More... | |
void | RTLSCtrl_sendDebugEvt (uint8_t *debug_string, uint32_t debug_value) |
RTLSCtrl_sendDebugEvt. More... | |
void | RTLSCtrl_sendPeriodicListSize (uint8_t *pEvt) |
RTLSCtrl_sendPeriodicListSize. More... | |
void | RTLSCtrl_syncNotifyEvt (uint16_t connHandle, rtlsStatus_e status, uint32_t timeToNextEvent, int8_t rssi, uint8_t channel) |
RTLSCtrl_syncNotifyEvt. More... | |
void | RTLSHost_openHostIf (pfnRtlsCtrlProcessMsgCb rtlsHostMsgCb) |
This function opens the host interface and registers the application callback. More... | |
uint8_t | RTLSHost_sendMsg (uint8_t cmdId, uint8_t cmdType, uint8_t *pData, uint16_t dataLen) |
This function is an abstraction of sending messages to a RTLS Host. More... | |
Variables | |
uint8_t | maxNumClCteBufs |
Maximum number of buffers for CL AoA. | |
char * | rtlsCmd_BleLogStrings [] |
char * | rtlsReq_BleLogStrings [] |
This module implements Real Time Localization System (RTLS) Control module.
#define BDADDR_VALID | ( | bdAddr | ) |
#define RTLSUTIL_FREE | ( | pFree | ) |
RTLSUTIL_FREE memory free without icall.
#define RTLSUTIL_MALLOC | ( | pAlloc, | |
size | |||
) |
RTLSUTIL_MALLOC memory allocation without icall.
void RTLSCtrl_connInfoEvt | ( | uint8_t * | connInfo, |
uint16_t | connInfoLen | ||
) |
RTLSCtrl_connInfoEvt.
This function sends connection information and parameters to RTLS Control
connInfo | - Connection information |
connInfoLen | - Connection Information length (needed to send the packet over NPI) |
void RTLSCtrl_connResultEvt | ( | uint16_t | connHandle, |
uint8_t | status | ||
) |
RTLSCtrl_connResultEvt.
This function notifies the RTLS Control that a connection has been formed
connHandle | - Connection handle |
status | - Whether the connection was formed successfully |
void RTLSCtrl_dataSentEvt | ( | uint16_t | connHandle, |
uint8_t | status | ||
) |
RTLSCtrl_dataSentEvt.
This function is used by the RTLS Application to report the status of a sent packet This is used to let RTLS Control know whether RTLS data has been successfully transmitted
status | - SUCCESS or FAILURE for sending data to our peer |
connHandle | - Connection handle |
void* RTLSCtrl_malloc | ( | uint32_t | sz | ) |
This function will allocate memory, if we were unable to allocate we will report to RTLS Host.
sz | - size (Allocated pointer has to be cast) |
void RTLSCtrl_open | ( | rtlsConfiguration_t * | rtlsConfig | ) |
RTLSCtrl_open.
Used to create and initialize the RTLS Control task
rtlsConfig | - pointer to the RTLS Application callbacks and configuration |
void RTLSCTRL_processPeriodicAdvReport | ( | uint8_t | opcode, |
uint16_t | syncHandle, | ||
int8_t | txPower, | ||
int8_t | rssi, | ||
uint8_t | cteType, | ||
uint8_t | dataStatus, | ||
uint8_t | dataLen, | ||
uint8_t * | pData | ||
) |
RTLSCTRL_processPeriodicAdvReport
Process prtiodic advertising report event
opcode | - Command opcode |
syncHandle | - Handle identifying the periodic advertising train |
txPower | - Tx Power information |
rssi | - RSSI value for the received packet |
cteType | - Constant Tone Extension type |
dataStatus | - Data status |
dataLen | - Length of the Data field |
pData | - Data received from a Periodic Advertising packet |
void RTLSCtrl_processSyncEstEvt | ( | uint8_t | opcode, |
uint8_t | status, | ||
uint16_t | syncHandle, | ||
uint8_t | advSid, | ||
uint8_t | advAddrType, | ||
uint8_t | advAddress[6], | ||
uint8_t | advPhy, | ||
uint16_t | periodicAdvInt, | ||
uint8_t | advClockAccuracy | ||
) |
RTLSCtrl_processSyncEstEvt.
Process sync establish event
opcode | - Command opcode |
status | - Periodic advertising sync HCI status |
syncHandle | - Handle identifying the periodic advertising train |
advSid | - Value of the Advertising SID |
advAddrType | - Advertiser address type |
advAddress | - Advertiser address |
advPhy | - Advertiser PHY |
periodicAdvInt | - Periodic advertising interval |
advClockAccuracy | - Accuracy of the periodic advertiser's clock |
void RTLSCtrl_processSyncLostEvt | ( | uint8_t | opcode, |
uint16_t | syncHandle | ||
) |
RTLSCtrl_processSyncLostEvt
Process sync lost event
opcode | - Command opcode |
syncHandle | - Handle identifying the periodic advertising train |
void RTLSCtrl_processTerminateSyncEvt | ( | void | ) |
RTLSCtrl_processTerminateSyncEvt
Process terminate sync command complete event
None |
void RTLSCtrl_rtlsPacketEvt | ( | uint8_t * | pPkt | ) |
RTLSCtrl_rtlsPacketEvt.
This function is used by the RTLS Application to notify RTLS Control that a RTLS packet has been received
pPkt | - The RTLS packet to parse |
void RTLSCtrl_scanResultEvt | ( | rtlsStatus_e | status, |
uint8_t * | scanResult, | ||
uint8_t | size | ||
) |
RTLSCtrl_scanResultEvt.
This function notifies the RTLS Control that a connection has been formed
scanResult | - Pointer to scan results array |
size | - Size of scanResults array |
status | - scanResults status |
void RTLSCtrl_sendDebugEvt | ( | uint8_t * | debug_string, |
uint32_t | debug_value | ||
) |
RTLSCtrl_sendDebugEvt.
Send debug info
debug_string | - 32 bytes debug string |
debug_value | - 32 bits debug value |
void RTLSCtrl_sendPeriodicListSize | ( | uint8_t * | pEvt | ) |
RTLSCtrl_sendPeriodicListSize.
Send periodic advertisers list size
pEvt | - Read list size structure |
void RTLSCtrl_syncNotifyEvt | ( | uint16_t | connHandle, |
rtlsStatus_e | status, | ||
uint32_t | timeToNextEvent, | ||
int8_t | rssi, | ||
uint8_t | channel | ||
) |
RTLSCtrl_syncNotifyEvt.
Synchronization function provided to the Application by RTLS Control This is the function that the application will be calling when a sync event is in place e.g BLE Connection Event
connHandle | - connection handle |
timeToNextEvent | - the time until the next sync event |
rssi | - rssi measurement against the RTLS Responder |
channel | - the channel on which the syncEvent was received |
status |
void RTLSHost_openHostIf | ( | pfnRtlsCtrlProcessMsgCb | rtlsHostMsgCb | ) |
This function opens the host interface and registers the application callback.
rtlsHostMsgCb | - Callback to use when a message arrives |
uint8_t RTLSHost_sendMsg | ( | uint8_t | cmdId, |
uint8_t | cmdType, | ||
uint8_t * | pData, | ||
uint16_t | dataLen | ||
) |
This function is an abstraction of sending messages to a RTLS Host.
cmdId | - RTLS Cmd Id |
cmdType | - Async/Sync message |
pData | - Pointer to message data |
dataLen | - Length of data in pData |