rust/bt-common: Encapsulate AdvertisingSetId and validate bounds

Encapsulate the internal AdvertisingSetId u8 value and enforce valid
SID bounds (0x00..=0x0F) per Core Spec v5.3 Vol 6, Part B, Section 2.3.4
and BASS v1.0.1 Section 3.1.1.4 Table 3.5.

Bug: 539983871
Test: cargo test
Change-Id: I2cf2073f4dbcf4910bbc154a6a044bc5f9db1adc
Reviewed-on: https://bluetooth-review.googlesource.com/c/bluetooth/+/3300
8 files changed
tree: 6456c70227ae5e97068bdf3564b28045ec0c36c4
  1. .agents/
  2. docs/
  3. infra/
  4. rust/
  5. .gitignore
  6. AUTHORS
  7. CONTRIBUTING.md
  8. GEMINI.md
  9. LICENSE
  10. OWNERS
  11. PATENTS
  12. presubmit.sh
  13. README.md
README.md

Bluetooth Shared Libraries

What is this?

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:

  • Stack-agnostic and platform-agnostic
  • Implement a useful subset of a published Bluetooth specification.

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.

What is this not?

It is not a full Bluetooth stack. Google has two officially open-source Bluetooth stacks:

Structure

  • rust - Rust Crates
  • docs - General documentation (documentation for each library/tool is included in their directories)