1little_endian_packets
2
3// Ranging Service
4
5enum PctFormat : 2 {
6  IQ = 0,
7  PHASE = 1,
8}
9
10enum RangingDoneStatus : 4 {
11  ALL_RESULTS_COMPLETE = 0x0,
12  PARTIAL_RESULTS = 0x1,
13  ABORTED = 0xF,
14}
15
16enum SubeventDoneStatus : 4 {
17  ALL_RESULTS_COMPLETE = 0x0,
18  ABORTED = 0xF,
19}
20
21enum RangingAbortReason : 4 {
22  NO_ABORT = 0x0,
23  LOCAL_HOST_OR_REMOTE = 0x1,
24  INSUFFICIENT_FILTERED_CHANNELS = 0x2,
25  INSTANT_HAS_PASSED = 0x3,
26  UNSPECIFIED = 0xF,
27}
28
29enum SubeventAbortReason : 4 {
30  NO_ABORT = 0x0,
31  LOCAL_HOST_OR_REMOTE = 0x1,
32  NO_CS_SYNC_RECEIVED = 0x2,
33  SCHEDULING_CONFLICTS_OR_LIMITED_RESOURCES = 0x3,
34  UNSPECIFIED = 0xF,
35}
36
37struct StepMode {
38  mode_type : 2,
39  _reserved_ : 5,
40  aborted : 1,
41}
42
43struct RasSubeventHeader {
44  start_acl_conn_event : 16,
45  frequency_compensation : 16,
46  ranging_done_status : RangingDoneStatus,
47  subevent_done_status : SubeventDoneStatus,
48  ranging_abort_reason : RangingAbortReason,
49  subevent_abort_reason : SubeventAbortReason,
50  reference_power_level : 8,
51  num_steps_reported : 8,
52}
53
54packet RasSubevent {
55  subevent_header : RasSubeventHeader,
56  subevent_data : 8[],
57}
58
59struct RangingHeader {
60  ranging_counter : 12,
61  configuration_id : 4,
62  selected_tx_power : 8,
63  antenna_paths_mask : 4,
64  _reserved_ : 2,
65  pct_format : PctFormat,
66}
67
68struct SegmentationHeader {
69  first_segment : 1,
70  last_segment : 1,
71  rolling_segment_counter: 6,
72}
73
74packet FirstRangingDataSegment {
75  segmentation_header : SegmentationHeader,
76  ranging_header : RangingHeader,
77  data : 8[],
78}
79
80packet RangingDataSegment {
81  segmentation_header : SegmentationHeader,
82  data : 8[],
83}
84