Class: $.EnvironmentProfileModel

Inherits:
Toybox.Lang.Object show all

Overview

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _eco2 as Lang.Numeric or Null

var _humidity as Lang.Numeric or Null

var _pendingNotifies as Lang.Array<BluetoothLowEnergy.Characteristic>

var _pressure as Lang.Numeric or Null

var _profileManager as $.ProfileManager

var _service as BluetoothLowEnergy.Service or Null

var _temperature as Lang.Numeric or Null

var _tvoc as Lang.Numeric or Null

Instance Method Details

activateNextNotification() as Void

Write the next notification to the descriptor

getEco2() as Lang.Numeric or Null

Get the ECO2 value

Returns:

  • The ECO2 value

getHumidity() as Lang.Numeric or Null

Get the humidity

Returns:

  • The humidity

getPressure() as Lang.Numeric or Null

Get the pressure

Returns:

  • The pressure

getTemperature() as Lang.Numeric or Null

Get the temperature

Returns:

  • The temperature

getTvoc() as Lang.Numeric or Null

Get the TVOC value

Returns:

  • The TVOC value

initialize(delegate as $.ThingyDelegate, profileManager as $.ProfileManager, device as BluetoothLowEnergy.Device)

Constructor

Parameters:

  • delegate —

    The BLE delegate for the model

  • profileManager —

    The profile manager for this model

  • device —

    The current device

onCharacteristicChanged(char as BluetoothLowEnergy.Characteristic, value as Lang.ByteArray) as Void

Handle a characteristic being changed

Parameters:

  • char —

    The characteristic that changed

  • value —

    The updated value of the characteristic

onDescriptorWrite(descriptor as BluetoothLowEnergy.Descriptor, status as BluetoothLowEnergy.Status) as Void

Handle the completion of a write operation on a descriptor

Parameters:

  • descriptor —

    The descriptor that was written

  • status —

    The BluetoothLowEnergy status indicating the result of the operation

processAirQualityValue(value as Lang.ByteArray) as Void

Process and set the air quality values

Parameters:

  • value —

    The new air quality value

processCccdWrite() as Void

Process a CCCD write operation

processHumidityValue(value as Lang.ByteArray) as Void

Process and set the humidity value

Parameters:

  • value —

    The new humidity value

processPressureValue(value as Lang.ByteArray) as Void

Process and set the pressure value

Parameters:

  • value —

    The new pressure value

processTemperatureValue(value as Lang.ByteArray) as Void

Process and set the temperature value

Parameters:

  • value —

    The new temperature value


Generated Oct 20, 2026, 8:20:50 AM