Class: Toybox.AntPlus.DeviceListener

Overview

Listener class for Device.

Since:

API Level 2.2.0

Direct Known Subclasses

AntPlus.BikeCadenceListener, AntPlus.BikePowerListener, AntPlus.BikeRadarListener, AntPlus.BikeSpeedCadenceListener, AntPlus.BikeSpeedListener, AntPlus.FitnessEquipmentListener, AntPlus.LightNetworkListener, AntPlus.RunningDynamicsListener, AntPlus.ShiftingListener

Instance Method Summary collapse

Instance Method Details

onBatteryStatusUpdate(data as AntPlus.BatteryStatus) as Void

Callback when battery status is received.

Parameters:

Since:

API Level 2.2.0

onDeviceStateUpdate(data as AntPlus.DeviceState) as Void

Callback when device state is updated.

Parameters:

Since:

API Level 2.2.0

onManufacturerInfoUpdate(data as AntPlus.ManufacturerInfo) as Void

Callback when manufacturer's information is received.

Parameters:

Since:

API Level 2.2.0

onMessage(msg as Ant.Message) as Void

Callback when ANT message is received.

Parameters:

Since:

API Level 3.1.0

onProductInfoUpdate(data as AntPlus.ProductInfo) as Void

Callback when product information is received.

Parameters:

Since:

API Level 2.2.0

onSentMessage(status as AntPlus.MessageSendStatus, sentMesgData as { :messageType as AntPlus.MessageType, :pageNumber as Lang.Number }) as Void

After sending a manufacturer message or page request this will be called to indicate message sent status.

Parameters:

  • status(AntPlus.MessageSendStatus)

    The status of the sent message as a SENT_MESSAGE_* enum value

  • sentMesgData(Lang.Dictionary)

    The dictionary will have keys for message type and page number. The message type is a AntPlus.MESSAGE_TYPE_*. The page number is byte 0 of the manufacturer specific message or the requested page number.

Since:

API Level 3.1.0


Generated Jun 26, 2024 1:13:54 PM