Class: Toybox.Sensor.SensorInfo

Overview

A class describing a Sensor

The SensorInfo provides access to the attributes of a Sensor.

Since:

API Level 3.2.0

Instance Member Summary collapse

Instance Attribute Details

var data as Lang.Dictionary or Null

The Sensor-specific data

A dictionary of sensor-specific attributes. Currently supported attributes include:

  • :bleAddress - The mac address of the BLE sensor (e.g., 01:02:03:04:05:06) as a ByteArray, if available.

  • :antSerialNumber - The 20-bit ANT sensor serial number as a Number

Since:

API Level 3.2.0

Returns:

var enabled as Lang.Boolean

The Sensor enabled flag.

An indicator of whether or not the sensor is enabled for pairing.

Since:

API Level 3.2.0

Returns:

var manufacturerId as Lang.Number

The Sensor manufacturer.

The manufacturer id of the sensor. May be null.

Since:

API Level 3.2.0

Returns:

var name as Lang.String

The Sensor name.

The name of the sensor.

Since:

API Level 3.2.0

Returns:

var partNumber as Lang.Number

The Sensor part number.

The part number the sensor. May be null.

Since:

API Level 3.2.0

Returns:

var softwareVersion as Lang.Number

The Sensor software version.

The software version of the sensor. May be null.

Since:

API Level 3.2.0

Returns:

var technology as Sensor.SensorTechnology

The Sensor technology

The technology used to communicate with this sensor.

Since:

API Level 3.2.0

Returns:

  • Lang.Number

    The sensor type as a Sensor.SENSOR_TECHNOLOGY_*

var type as Sensor.SensorType

The Sensor type.

The type of the sensor.

Since:

API Level 3.2.0

Returns:


Generated Apr 17, 2024 9:40:38 AM