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.getPayload()); // Add a message payload 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 bytes 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 bursts contained in the payload.

Returns:

Since:

API Level 2.2.0

initialize()

Constructor

Since:

API Level 2.2.0


Generated Sep 23, 2024, 3:32:48 PM