src.bluetooth_sig.gatt.characteristics.location_and_speed¶
Location and Speed characteristic implementation.
Classes¶
Name | Description |
|---|---|
Elevation source enumeration. |
|
Heading source enumeration. |
|
Location and Speed characteristic. |
|
Parsed data from Location and Speed characteristic. |
|
Location and Speed flags as per Bluetooth SIG specification. |
|
Speed and distance format enumeration. |
Module Contents¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.ElevationSource¶
Bases:
enum.IntEnumElevation source enumeration.
- BAROMETRIC_AIR_PRESSURE = 1¶
- DATABASE_SERVICE = 2¶
- OTHER = 3¶
- POSITIONING_SYSTEM = 0¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.HeadingSource¶
Bases:
enum.IntEnumHeading source enumeration.
- HEADING_BASED_ON_MAGNETIC_COMPASS = 1¶
- HEADING_BASED_ON_MOVEMENT = 0¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.LocationAndSpeedCharacteristic¶
Bases:
src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[LocationAndSpeedData]Location and Speed characteristic.
Used to represent data related to a location and speed sensor. Note that it is possible for this characteristic to exceed the default LE ATT_MTU size.
- ELEVATION_SOURCE_MASK = 6144¶
- ELEVATION_SOURCE_SHIFT = 11¶
- HEADING_SOURCE_MASK = 8192¶
- HEADING_SOURCE_SHIFT = 13¶
- POSITION_STATUS_MASK = 768¶
- POSITION_STATUS_SHIFT = 8¶
- SPEED_DISTANCE_FORMAT_MASK = 1024¶
- SPEED_DISTANCE_FORMAT_SHIFT = 10¶
- max_length = 28¶
- min_length = 2¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.LocationAndSpeedData¶
Bases:
msgspec.StructParsed data from Location and Speed characteristic.
- elevation_source: ElevationSource | None = None¶
- flags: LocationAndSpeedFlags¶
- heading_source: HeadingSource | None = None¶
- position_status: src.bluetooth_sig.types.location.PositionStatus | None = None¶
- speed_and_distance_format: SpeedAndDistanceFormat | None = None¶
- utc_time: datetime.datetime | None = None¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.LocationAndSpeedFlags¶
Bases:
enum.IntFlagLocation and Speed flags as per Bluetooth SIG specification.
- ELEVATION_PRESENT = 8¶
- HEADING_PRESENT = 16¶
- INSTANTANEOUS_SPEED_PRESENT = 1¶
- LOCATION_PRESENT = 4¶
- ROLLING_TIME_PRESENT = 32¶
- TOTAL_DISTANCE_PRESENT = 2¶
- UTC_TIME_PRESENT = 64¶
- class src.bluetooth_sig.gatt.characteristics.location_and_speed.SpeedAndDistanceFormat¶
Bases:
enum.IntEnumSpeed and distance format enumeration.
- FORMAT_2D = 0¶
- FORMAT_3D = 1¶