Class: Toybox.AntPlus.Device
- Inherits:
-
Toybox.Lang.Object
Overview
The Device object represents an ANT+ Device instance.
Direct Known Subclasses
AntPlus.BikeCadence, AntPlus.BikePower, AntPlus.BikeRadar, AntPlus.BikeSpeed, AntPlus.BikeSpeedCadence, AntPlus.FitnessEquipment, AntPlus.LightNetwork, AntPlus.RunningDynamics, AntPlus.Shifting
Instance Method Summary collapse
-
getBatteryStatus(identifier as Lang.Number) as AntPlus.BatteryStatus or Null
Retrieve battery status for provided component identifier.
-
getComponentIdentifiers() as Lang.Array<Lang.Number> or Null
Retrieve a list of known component identifiers for this Device.
-
getDeviceState() as AntPlus.DeviceState
Retrieve the state of the device.
-
getManufacturerInfo(identifier as Lang.Number) as AntPlus.ManufacturerInfo or Null
Retrieve manufacturer information for provided component identifier.
-
getProductInfo(identifier as Lang.Number) as AntPlus.ProductInfo or Null
Retrieve product information for provided component identifier.
-
sendManufacturerMessage(message as Ant.Message) as Void
Send Manufacturer Message.
-
sendPageRequest(pageNumber as Lang.Number) as Void
Send Page request Request 2 broadcast pages from connected sensor.
Instance Method Details
getBatteryStatus(identifier as Lang.Number) as AntPlus.BatteryStatus or Null
Retrieve battery status for provided component identifier.
getComponentIdentifiers() as Lang.Array<Lang.Number> or Null
Retrieve a list of known component identifiers for this Device.
This list may update over time as ANT+ devices with >1 component periodically send information about each of their components. The device reports its total number of components in CommonData.numComponents. The returned Array will only contain entries for components that the ANT+ device has provided a component identifier for.
getDeviceState() as AntPlus.DeviceState
Retrieve the state of the device.
getManufacturerInfo(identifier as Lang.Number) as AntPlus.ManufacturerInfo or Null
Retrieve manufacturer information for provided component identifier.
getProductInfo(identifier as Lang.Number) as AntPlus.ProductInfo or Null
Retrieve product information for provided component identifier.
sendManufacturerMessage(message as Ant.Message) as Void
Send Manufacturer Message
sendPageRequest(pageNumber as Lang.Number) as Void
Send Page request Request 2 broadcast pages from connected sensor. Use onMessage() to process requested page broadcasts from the sensor.