BLE SDK#

Note

For more information about the used integer types, refer to the source code instead.

Model Structs#

class oralb.blesdk.model.BatteryLevel(level: int, seconds_left: int = None, milli_volts: int = None, milli_amperes: int = None, temperature: int = None, avail_soc: int = None, dcmas: int = None, rcmas: int = None, soc_state: int = None)[source]#
class oralb.blesdk.model.Button(state: oralb.blesdk.model.Button.State)[source]#
class State(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.CalibrationData(calibration_x: int, calibration_y: int, calibration_z: int)[source]#
class oralb.blesdk.model.Color(red: int, green: int, blue: int, identifier: int)[source]#

Characteristic representing a color.

blue: int#

The blue component of the color.

green: int#

The green component of the color.

identifier: int#

The identifier of the color.

red: int#

The red component of the color.

class oralb.blesdk.model.Control(command: int, parameter: int = None)[source]#
class DataRead(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class METADATA(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.DashboardConfig(session_id: int, divider: oralb.blesdk.model.DashboardConfig.Divider)[source]#
class Divider(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.DashboardData(status: oralb.blesdk.model.DashboardData.Status, timestamp: int, gyro_x: int, gyro_y: int, gyro_z: int, motion_x: int, motion_y: int, motion_z: int)[source]#
class Status(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.DeviceName(text: str)[source]#
class oralb.blesdk.model.DeviceState(state: State, sub_state: SubState)[source]#

Represents the state of a device.

class State(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Enumeration representing the main states of the device.

class SubState(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#

Enumeration representing the sub-states of the device.

state: State#

The main state of the device.

sub_state: SubState#

The sub-state of the device.

class oralb.blesdk.model.GyroMotionData(timestamp: int, gyro_x: int, gyro_y: int, gyro_z: int, motion_x: int, motion_y: int, motion_z: int)[source]#
class oralb.blesdk.model.HighResolutionMotionData(motion_x: int, motion_y: int, motion_z: int)[source]#
class oralb.blesdk.model.MotionData(timestamp: int, motion_x: int, motion_y: int, motion_z: int)[source]#
class oralb.blesdk.model.OTACommand(command: oralb.blesdk.model.OTACommand.Command)[source]#
class Command(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.OTAPayload(payload: memoryview)[source]#
class oralb.blesdk.model.OTAState(state: oralb.blesdk.model.OTAState.State)[source]#
class State(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.OTATransferSize(value: int)[source]#
class oralb.blesdk.model.Pressure(state: oralb.blesdk.model.Pressure.State, timestamp_a: int, record_a: int, timestamp_b: int, record_b: int, identifier: int)[source]#
class State(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.RTC(epochMillis: int = 946684800000)[source]#
class oralb.blesdk.model.RefillRemainder(state: oralb.blesdk.model.RefillRemainder.State, days_left: int, brushing_seconds_left: int)[source]#
class State(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.SensorData[source]#
class Data(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
decode(parsed: bytes, context) None[source]#

Decode data using the wrapped _StructLike object.

Parameters:
  • parsed – The parsed data to be decoded.

  • context – The current context.

Returns:

The decoded data.

encode(obj, context) bytes[source]#

Encode data using the wrapped _StructLike object.

Parameters:
  • obj – The original data to be encoded.

  • context – The current context.

Returns:

The encoded data.

class oralb.blesdk.model.Smiley(face: oralb.blesdk.model.Smiley.Face)[source]#
class Face(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.model.Timezone(zone: int)[source]#
class oralb.blesdk.model.TongueTime(duration: int)[source]#
class oralb.blesdk.model.UserID(id_: int)[source]#

Characteristic representing a user ID.

id_: int#

The user ID.

oralb.blesdk.model.make_uuid(cid: str) str[source]#

Generates a uuid from the given short uuid

oralb.blesdk.model.register(cid: str, model) None[source]#

Registers a new struct type to the given uuid

Metadata Structs#

class oralb.blesdk.metadata.BLEProfile(*, magic: int = 6, prefix_bootloader: str, num_bootloader: int, build_bootloader: int, prefix_sec_program: str, num_sec_program: int, build_sec_program: int)[source]#
class oralb.blesdk.metadata.DeviceUUID(id: uuid.UUID)[source]#
class oralb.blesdk.metadata.ServiceDataA(ideal_full_capacity: int, average_motor_current: int, total_monitor_runtime: int, total_pressure: int, total_charge_time: int)[source]#
class oralb.blesdk.metadata.ServiceDataB(total_charge_events: int, total_full_charge_events: int, total_over_temp_Events: int, total_low_temp_events: int, total_brushing_cycles: int, short_term_motor_current: int, total_recharging_hours: int)[source]#
class oralb.blesdk.metadata.SonosMetadata(*, magic: int = 255, model: oralb.blesdk.metadata.SonosMetadata.Model, color: oralb.blesdk.metadata.SonosMetadata.Color, language: oralb.blesdk.metadata.SonosMetadata.Language, brush_modes: List[int], gum_guard: oralb.blesdk.metadata.SonosMetadata.GumGuard)[source]#
class Color(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class GumGuard(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class Language(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class Model(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
class oralb.blesdk.metadata.SystemController1(*, magic: int = 7, media_content_version: int, hardware_config: int, mmap_version: int, info_sector_version: int)[source]#
class oralb.blesdk.metadata.SystemController2(*, magic: int = 7, version: int)[source]#

Client#