Class: Toybox.Ant.BurstPayload

Inherits:
Toybox.Lang.Object show all

Overview

A class containing Burst payload data.

The payload data is provided in the form of Ant.Message objects. The default max size of a BurstPayload is 8192 bytes, or 1024 Message objects. However, this can vary by device.

Example:

using Toybox.Ant;
var burst = Ant.BurstPayload(); // Initialize the payload

burst.add(message); // Add a message to payload
burst.getSize();    // The number of messages

Since:

API Level 2.2.0

Instance Method Summary collapse

Instance Method Details

add(message as Lang.Array<Lang.Number> or Lang.ByteArray) as Void

Add a Message object to the end of the burst data.

Note:

ByteArray is supported with ConnectIQ 4.2.0 and later.

Parameters:

Since:

API Level 2.2.0

getSize() as Lang.Number

Return the number of burst Message objects contained in the payload.

Returns:

Since:

API Level 2.2.0

initialize()

Constructor

Since:

API Level 2.2.0


Generated Sep 25, 2023 12:31:44 PM