rust/bt-ascs: Add presentation delay range helpers A client has to request one Presentation_Delay per direction for all the ASEs in a CIG (BAP v1.0.2 Section 7.1.3), but each ASE publishes its own range. Add helpers on PresentationDelayRange that combine those ranges and pick a delay from the result. BAP v1.0.2 Section 5.6.2 makes the supported range a shall and the preferred range only a should, so the helpers treat them differently. If the supported ranges have no value in common, combining fails. Preferred bounds never cause a failure. A bound outside the supported range moves to the nearest supported bound, preferred bounds that cross are dropped, and a zero bound (ASCS v1.0.1 Table 4.3) means no preference. Combining normalizes the preferred bounds once, after merging every range, because normalizing pair by pair gives an answer that depends on the order of the ASEs. Decoding now rejects a range whose min is above its max, since no value in it can satisfy the shall. Test: cargo test -p bt-ascs Change-Id: I01e07e74ecac123bf3f4aa25d455f8136a6a6964 Reviewed-on: https://bluetooth-review.googlesource.com/c/bluetooth/+/4123
This is a repository for shared libraries and tools that can be useful for multiple Bluetooth stacks.
These tools and libraries are meant to be:
It has been started as a repository for developing Rust crates but can be easily expanded to include libraries and tools written in other languages.
It is not a full Bluetooth stack. Google has two officially open-source Bluetooth stacks: