Classes | Macros | Typedefs | Enumerations
ras_common.h File Reference
`#include <stdint.h>`
`#include "ble_hci_ext.h"`

Go to the source code of this file.

## Classes
struct | ras_ctr_data_operand_t
struct | ras_cmp_data_rsp_operand_t
struct | ras_ctr_lost_data_seg_operand_t
struct | ras_filter_data_operand_t
struct | ras_ctr_pt_operation_t
struct | ras_ctr_pt_rsp_t

## Macros
#define | OPEN_RAS_LOG 0
#define | RAS_LOG_INFO(...)
#define | RAS_CONNECTION_MAX (4)
#define | RAS_MAX_PROC_NUM_PER_LINK (2)
#define | RAS_CCCD_LEN (0x02)
#define | RAS_FEATURE_CHAR_LEN (4)
#define | RAS_RANGING_COUNTER_BIT_MASK (0x0FFF)
#define | RAS_CFG_ID_BIT_MASK (0xF000)
#define | RAS_ANT_PATH_BIT_MASK (0x0F)
#define | RAS_CTRL_PT_OPCODE_LEN (1)
#define | RAS_CTRL_PT_OPERAND_MAX_LEN (4)
#define | RAS_CTRL_PT_CHAR_MAX_LEN (RAS_CTRL_PT_OPCODE_LEN + RAS_CTRL_PT_OPERAND_MAX_LEN)
#define | RAS_CTRL_PT_OPCODE_OFFSET (0)
#define | RAS_CTRL_PT_OPERAND_OFFSET (1)
#define | RAS_MODE_TYPE_BIT_MASK (0xC000)
#define | RAS_MODE_TYPE_BIT_OFFSET (14)
#define | RAS_MODE0_DATA_BIT_MASK (0x000F)
#define | RAS_MODE1_DATA_BIT_MASK (0x007F)
#define | RAS_MODE2_DATA_BIT_MASK (0x007F)
#define | RAS_MODE3_DATA_BIT_MASK (0x3FFF)
#define | RAS_PCT_FORMAT_BIT_MASK (0x01)
#define | RAS_ERROR_PROC_ALREADY_IN_PROGRESS (0xFE)
#define | RAS_SEGMENT_HEADER_LEN (1)
#define | RAS_SEGMENT_HEADER_FIRST_SEG_BITMASK (0x01)
#define | RAS_SEGMENT_HEADER_LAST_SEG_BITMASK (0x02)
#define | RAS_SEGMENT_HEADER_ROLL_SEG_COUNT_BITMASK (0xFC)
#define | RAS_ROLLING_SEGMENT_COUNTER_MIN (0x00)
#define | RAS_ROLLING_SEGMENT_COUNTER_MAX (0x3F)
#define | RAS_RANGING_HEADER_LEN (4)
#define | RAS_ANTENNA_PATH_1_MASK (0x01)
#define | RAS_ANTENNA_PATH_2_MASK (0x02)
#define | RAS_ANTENNA_PATH_3_MASK (0x04)
#define | RAS_ANTENNA_PATH_4_MASK (0x08)
#define | RAS_PCT_FORMAT_MASK (0x40)
#define | RAS_SUBEVENT_HEADER_LEN (8)
#define | RAS_SUBEVENT_HEADER_START_ACL_CON_EVENT_OFFSET (0)
#define | RAS_SUBEVENT_HEADER_FREQ_COMPENSATION_OFFSET (2)
#define | RAS_SUBEVENT_HEADER_RANGING_DONE_STATUS_OFFSET (4)
#define | RAS_SUBEVENT_HEADER_SUBEVENT_DONE_STATUS_OFFSET (5)
#define | RAS_SUBEVENT_HEADER_REF_POWER_LEVEL_OFFSET (6)
#define | RAS_SUBEVENT_HEADER_NUM_STEPS_REPORTED_OFFSET (7)

## Typedefs
typedef cs_subevent_result_all_t | ras_subevt_data_t

## Enumerations
enum | ras_fea_bit_mask_t { RAS_FEA_RT_RA_DATA_BIT_MASK = 0x0001, RAS_FEA_RETR_LOST_RA_DATA_SEG_BIT_MASK = 0x0002, RAS_FEA_ABORT_OPERATION_BIT_MASK = 0x0004, RAS_FEA_FILTER_RA_DATA_BIT_MASK = 0x0008, RAS_FEA_ALL_BIT_MASK = 0x001F }
enum | ras_mode_type_t { RAS_MODE_0 = 0x00, RAS_MODE_1 = 0x01, RAS_MODE_2 = 0x02, RAS_MODE_3 = 0x03, RAS_MODE_NUM = 0x04 }
enum | ras_mode0_data_bit_t { MODE0_PACKET_QUALITY = 0x01 << 0, MODE0_PACKET_RSSI = 0x01 << 1, MODE0_PACKET_ANT = 0x01 << 2, MODE0_MEA_FREQ_OFFSET = 0x01 << 3 }
enum | ras_mode1_data_bit_t { MODE1_PACKET_QUALITY = 0x01 << 0, MODE1_PACKET_NADM = 0x01 << 1, MODE1_PACKET_RSSI = 0x01 << 2, MODE1_TOD_TOA = 0x01 << 3, MODE1_PACKET_ANT = 0x01 << 4, MODE1_PACKET_PCT1 = 0x01 << 5, MODE1_PACKET_PCT2 = 0x01 << 6 }
enum | ras_mode2_data_bit_t { MODE2_ANT_PERM_IDX = 0x01 << 0, MODE2_TON_PCT = 0x01 << 1, MODE2_TON_QUALITY_IND = 0x01 << 2, MODE2_ANT_PATH_1 = 0x01 << 3, MODE2_ANT_PATH_2 = 0x01 << 4, MODE2_ANT_PATH_3 = 0x01 << 5, MODE2_ANT_PATH_4 = 0x01 << 6 }
enum | ras_mode3_data_bit_t { MODE3_PACKET_QUALITY = 0x01 << 0, MODE3_PACKET_NADM = 0x01 << 1, MODE3_PACKET_RSSI = 0x01 << 2, MODE3_PACKET_ANT = 0x01 << 3, MODE3_PACKET_PCT1 = 0x01 << 4, MODE3_PACKET_PCT2 = 0x01 << 5, MODE3_TOD_TOA = 0x01 << 6, MODE3_ANT_PERM_IDX = 0x01 << 7, MODE3_TONE_PCT = 0x01 << 8, MODE3_TON_QUALITY_IND = 0x01 << 9, MODE3_ANT_PATH_1 = 0x01 << 10, MODE3_ANT_PATH_2 = 0x01 << 11, MODE3_ANT_PATH_3 = 0x01 << 12, MODE3_ANT_PATH_4 = 0x01 << 13 }
enum | ras_ctrl_pt_cmd_opd_t { RAS_OP_GET_RA_DATA = 0x00, RAS_OP_ACK_RA_DATA = 0x01, RAS_OP_RETR_LOST_RA_DATA_SEGMENTS = 0x02, RAS_OP_ABORT_OPERATION = 0x03, RAS_OP_FILTER = 0x04 }
enum | ras_ctrl_pt_rsp_opd_t { RAS_OP_CMP_RA_DATA_RSP = 0x00, RAS_OP_CMP_LOST_RA_DATA_SEG_RSP = 0x01, RAS_OP_RSP_CODE = 0x02 }
enum | ras_rsp_code_val_t { RAS_RSP_SUCCESS = 0x01, RAS_RSP_OPCODE_NOT_SUPPORTED = 0x02, RAS_RSP_INVALID_PARAM = 0x03, RAS_RSP_PARAM_NOT_SUPPORTED = 0x04, RAS_RSP_ABORT_UNSUCCESSFUL = 0x05, RAS_RSP_PROCEDURE_NOT_COMPLETED = 0x06, RAS_RSP_SERVER_BUSY = 0x07, RAS_RSP_NO_RECORDS_FOUND = 0x08 }

## Macro Definition Documentation

## ◆ OPEN_RAS_LOG

#define OPEN_RAS_LOG 0

Definition at line 7 of file ras_common.h.

## ◆ RAS_ANT_PATH_BIT_MASK

#define RAS_ANT_PATH_BIT_MASK (0x0F)

Definition at line 22 of file ras_common.h.

## ◆ RAS_ANTENNA_PATH_1_MASK

#define RAS_ANTENNA_PATH_1_MASK (0x01)

Definition at line 53 of file ras_common.h.

## ◆ RAS_ANTENNA_PATH_2_MASK

#define RAS_ANTENNA_PATH_2_MASK (0x02)

Definition at line 54 of file ras_common.h.

## ◆ RAS_ANTENNA_PATH_3_MASK

#define RAS_ANTENNA_PATH_3_MASK (0x04)

Definition at line 55 of file ras_common.h.

## ◆ RAS_ANTENNA_PATH_4_MASK

#define RAS_ANTENNA_PATH_4_MASK (0x08)

Definition at line 56 of file ras_common.h.

## ◆ RAS_CCCD_LEN

#define RAS_CCCD_LEN (0x02)

Definition at line 17 of file ras_common.h.

## ◆ RAS_CFG_ID_BIT_MASK

#define RAS_CFG_ID_BIT_MASK (0xF000)

Definition at line 21 of file ras_common.h.

## ◆ RAS_CONNECTION_MAX

#define RAS_CONNECTION_MAX (4)

Definition at line 15 of file ras_common.h.

## ◆ RAS_CTRL_PT_CHAR_MAX_LEN

#define RAS_CTRL_PT_CHAR_MAX_LEN (RAS_CTRL_PT_OPCODE_LEN + RAS_CTRL_PT_OPERAND_MAX_LEN)

Definition at line 27 of file ras_common.h.

## ◆ RAS_CTRL_PT_OPCODE_LEN

#define RAS_CTRL_PT_OPCODE_LEN (1)

Definition at line 25 of file ras_common.h.

## ◆ RAS_CTRL_PT_OPCODE_OFFSET

#define RAS_CTRL_PT_OPCODE_OFFSET (0)

Definition at line 29 of file ras_common.h.

## ◆ RAS_CTRL_PT_OPERAND_MAX_LEN

#define RAS_CTRL_PT_OPERAND_MAX_LEN (4)

Definition at line 26 of file ras_common.h.

## ◆ RAS_CTRL_PT_OPERAND_OFFSET

#define RAS_CTRL_PT_OPERAND_OFFSET (1)

Definition at line 30 of file ras_common.h.

## ◆ RAS_ERROR_PROC_ALREADY_IN_PROGRESS

#define RAS_ERROR_PROC_ALREADY_IN_PROGRESS (0xFE)

Definition at line 42 of file ras_common.h.

## ◆ RAS_FEATURE_CHAR_LEN

#define RAS_FEATURE_CHAR_LEN (4)

Definition at line 18 of file ras_common.h.

## ◆ RAS_LOG_INFO

#define RAS_LOG_INFO | ( |  | ... | ) |

Definition at line 12 of file ras_common.h.

## ◆ RAS_MAX_PROC_NUM_PER_LINK

#define RAS_MAX_PROC_NUM_PER_LINK (2)

Definition at line 16 of file ras_common.h.

## ◆ RAS_MODE0_DATA_BIT_MASK

#define RAS_MODE0_DATA_BIT_MASK (0x000F)

Definition at line 35 of file ras_common.h.

## ◆ RAS_MODE1_DATA_BIT_MASK

#define RAS_MODE1_DATA_BIT_MASK (0x007F)

Definition at line 36 of file ras_common.h.

## ◆ RAS_MODE2_DATA_BIT_MASK

#define RAS_MODE2_DATA_BIT_MASK (0x007F)

Definition at line 37 of file ras_common.h.

## ◆ RAS_MODE3_DATA_BIT_MASK

#define RAS_MODE3_DATA_BIT_MASK (0x3FFF)

Definition at line 38 of file ras_common.h.

## ◆ RAS_MODE_TYPE_BIT_MASK

#define RAS_MODE_TYPE_BIT_MASK (0xC000)

Definition at line 32 of file ras_common.h.

## ◆ RAS_MODE_TYPE_BIT_OFFSET

#define RAS_MODE_TYPE_BIT_OFFSET (14)

Definition at line 33 of file ras_common.h.

## ◆ RAS_PCT_FORMAT_BIT_MASK

#define RAS_PCT_FORMAT_BIT_MASK (0x01)

Definition at line 40 of file ras_common.h.

## ◆ RAS_PCT_FORMAT_MASK

#define RAS_PCT_FORMAT_MASK (0x40)

Definition at line 57 of file ras_common.h.

## ◆ RAS_RANGING_COUNTER_BIT_MASK

#define RAS_RANGING_COUNTER_BIT_MASK (0x0FFF)

Definition at line 20 of file ras_common.h.

## ◆ RAS_RANGING_HEADER_LEN

#define RAS_RANGING_HEADER_LEN (4)

Definition at line 52 of file ras_common.h.

## ◆ RAS_ROLLING_SEGMENT_COUNTER_MAX

#define RAS_ROLLING_SEGMENT_COUNTER_MAX (0x3F)

Definition at line 50 of file ras_common.h.

## ◆ RAS_ROLLING_SEGMENT_COUNTER_MIN

#define RAS_ROLLING_SEGMENT_COUNTER_MIN (0x00)

Definition at line 49 of file ras_common.h.

## ◆ RAS_SEGMENT_HEADER_FIRST_SEG_BITMASK

#define RAS_SEGMENT_HEADER_FIRST_SEG_BITMASK (0x01)

Definition at line 46 of file ras_common.h.

## ◆ RAS_SEGMENT_HEADER_LAST_SEG_BITMASK

#define RAS_SEGMENT_HEADER_LAST_SEG_BITMASK (0x02)

Definition at line 47 of file ras_common.h.

## ◆ RAS_SEGMENT_HEADER_LEN

#define RAS_SEGMENT_HEADER_LEN (1)

Definition at line 45 of file ras_common.h.

## ◆ RAS_SEGMENT_HEADER_ROLL_SEG_COUNT_BITMASK

#define RAS_SEGMENT_HEADER_ROLL_SEG_COUNT_BITMASK (0xFC)

Definition at line 48 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_FREQ_COMPENSATION_OFFSET

#define RAS_SUBEVENT_HEADER_FREQ_COMPENSATION_OFFSET (2)

Definition at line 61 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_LEN

#define RAS_SUBEVENT_HEADER_LEN (8)

Definition at line 59 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_NUM_STEPS_REPORTED_OFFSET

#define RAS_SUBEVENT_HEADER_NUM_STEPS_REPORTED_OFFSET (7)

Definition at line 65 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_RANGING_DONE_STATUS_OFFSET

#define RAS_SUBEVENT_HEADER_RANGING_DONE_STATUS_OFFSET (4)

Definition at line 62 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_REF_POWER_LEVEL_OFFSET

#define RAS_SUBEVENT_HEADER_REF_POWER_LEVEL_OFFSET (6)

Definition at line 64 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_START_ACL_CON_EVENT_OFFSET

#define RAS_SUBEVENT_HEADER_START_ACL_CON_EVENT_OFFSET (0)

Definition at line 60 of file ras_common.h.

## ◆ RAS_SUBEVENT_HEADER_SUBEVENT_DONE_STATUS_OFFSET

#define RAS_SUBEVENT_HEADER_SUBEVENT_DONE_STATUS_OFFSET (5)

Definition at line 63 of file ras_common.h.

## Typedef Documentation

## ◆ ras_subevt_data_t

typedef cs_subevent_result_all_t ras_subevt_data_t

Definition at line 185 of file ras_common.h.

## Enumeration Type Documentation

## ◆ ras_ctrl_pt_cmd_opd_t

enum ras_ctrl_pt_cmd_opd_t

Enumerator
RAS_OP_GET_RA_DATA |
RAS_OP_ACK_RA_DATA |
RAS_OP_RETR_LOST_RA_DATA_SEGMENTS |
RAS_OP_ABORT_OPERATION |
RAS_OP_FILTER |

Definition at line 133 of file ras_common.h.

## ◆ ras_ctrl_pt_rsp_opd_t

enum ras_ctrl_pt_rsp_opd_t

Enumerator
RAS_OP_CMP_RA_DATA_RSP |
RAS_OP_CMP_LOST_RA_DATA_SEG_RSP |
RAS_OP_RSP_CODE |

Definition at line 142 of file ras_common.h.

## ◆ ras_fea_bit_mask_t

enum ras_fea_bit_mask_t

Enumerator
RAS_FEA_RT_RA_DATA_BIT_MASK |
RAS_FEA_RETR_LOST_RA_DATA_SEG_BIT_MASK |
RAS_FEA_ABORT_OPERATION_BIT_MASK |
RAS_FEA_FILTER_RA_DATA_BIT_MASK |
RAS_FEA_ALL_BIT_MASK |

Definition at line 67 of file ras_common.h.

## ◆ ras_mode0_data_bit_t

enum ras_mode0_data_bit_t

Enumerator
MODE0_PACKET_QUALITY |
MODE0_PACKET_RSSI |
MODE0_PACKET_ANT |
MODE0_MEA_FREQ_OFFSET |

Definition at line 85 of file ras_common.h.

## ◆ ras_mode1_data_bit_t

enum ras_mode1_data_bit_t

Enumerator
MODE1_PACKET_QUALITY |
MODE1_PACKET_NADM |
MODE1_PACKET_RSSI |
MODE1_TOD_TOA |
MODE1_PACKET_ANT |
MODE1_PACKET_PCT1 |
MODE1_PACKET_PCT2 |

Definition at line 93 of file ras_common.h.

## ◆ ras_mode2_data_bit_t

enum ras_mode2_data_bit_t

Enumerator
MODE2_ANT_PERM_IDX |
MODE2_TON_PCT |
MODE2_TON_QUALITY_IND |
MODE2_ANT_PATH_1 |
MODE2_ANT_PATH_2 |
MODE2_ANT_PATH_3 |
MODE2_ANT_PATH_4 |

Definition at line 104 of file ras_common.h.

## ◆ ras_mode3_data_bit_t

enum ras_mode3_data_bit_t

Enumerator
MODE3_PACKET_QUALITY |
MODE3_PACKET_NADM |
MODE3_PACKET_RSSI |
MODE3_PACKET_ANT |
MODE3_PACKET_PCT1 |
MODE3_PACKET_PCT2 |
MODE3_TOD_TOA |
MODE3_ANT_PERM_IDX |
MODE3_TONE_PCT |
MODE3_TON_QUALITY_IND |
MODE3_ANT_PATH_1 |
MODE3_ANT_PATH_2 |
MODE3_ANT_PATH_3 |
MODE3_ANT_PATH_4 |

Definition at line 115 of file ras_common.h.

## ◆ ras_mode_type_t

enum ras_mode_type_t

Enumerator
RAS_MODE_0 |
RAS_MODE_1 |
RAS_MODE_2 |
RAS_MODE_3 |
RAS_MODE_NUM |

Definition at line 76 of file ras_common.h.

## ◆ ras_rsp_code_val_t

enum ras_rsp_code_val_t

Enumerator
RAS_RSP_SUCCESS |
RAS_RSP_OPCODE_NOT_SUPPORTED |
RAS_RSP_INVALID_PARAM |
RAS_RSP_PARAM_NOT_SUPPORTED |
RAS_RSP_ABORT_UNSUCCESSFUL |
RAS_RSP_PROCEDURE_NOT_COMPLETED |
RAS_RSP_SERVER_BUSY |
RAS_RSP_NO_RECORDS_FOUND |

Definition at line 173 of file ras_common.h.