Module: Toybox::Ant

Overview

This module provide the interface for the ANT wireless protocol.

The ANT wireless protocol is a low level communications protocol that provides very efficient transfer of data by directly controlling the radio on the device. The ANT module provides a list of constants to be used with different Class objects and Methods provided within the module. These include:

ANT resources and documentation can be found at the links below.

See Also:

Since:

  • 1.0.0

Supported Devices:

  • All devices

App Types:

  • Data Field

  • Widget

  • App

  • Audio Content Provider App

  • Glance Support

  • Background Services

Requires Permission:

  • Ant

Defined Under Namespace

Classes: BurstListener, BurstPayload, BurstPayloadIterator, ChannelAssignment, CryptoConfig, DeviceConfig, EncryptionInvalidSettingsException, GenericChannel, Message, UnableToAcquireChannelException, UnableToAcquireEncryptedChannelException

Constant Summary

MSG_ID_RF_EVENT = 0x01

Since:

  • 1.0.0

MSG_ID_UNASSIGN_CHANNEL = 0x41

Since:

  • 1.0.0

MSG_ID_ASSIGN_CHANNEL = 0x42

Since:

  • 1.0.0

MSG_ID_CHANNEL_ID = 0x51

Since:

  • 1.0.0

MSG_ID_CHANNEL_PERIOD = 0x43

Since:

  • 1.0.0

MSG_ID_SEARCH_TIMEOUT = 0x44

Since:

  • 1.0.0

MSG_ID_CHANNEL_RF_FREQUENCY = 0x45

Since:

  • 1.0.0

MSG_ID_NETWORK_KEY = 0x46

Since:

  • 1.0.0

MSG_ID_TRANSMIT_POWER = 0x47

Since:

  • 1.0.0

MSG_ID_CHANNEL_TRANSMIT_POWER = 0x60

Since:

  • 1.0.0

MSG_ID_LOW_PRIORITY_SEARCH_TIMEOUT = 0x63

Since:

  • 1.0.0

MSG_ID_LIB_CONFIG = 0x6E

Since:

  • 1.0.0

MSG_ID_PROXIMITY_SEARCH = 0x71

Since:

  • 1.0.0

MSG_ID_RESET_SYSTEM = 0x4A

Since:

  • 1.0.0

MSG_ID_OPEN_CHANNEL = 0x4B

Since:

  • 1.0.0

MSG_ID_CLOSE_CHANNEL = 0x4C

Since:

  • 1.0.0

MSG_ID_BROADCAST_DATA = 0x4E

Since:

  • 1.0.0

MSG_ID_ACKNOWLEDGED_DATA = 0x4F

Since:

  • 1.0.0

MSG_ID_CHANNEL_RESPONSE_EVENT = 0x40

Since:

  • 1.0.0

MSG_CODE_RESPONSE_NO_ERROR = 0x00

Since:

  • 1.0.0

MSG_CODE_EVENT_RX_SEARCH_TIMEOUT = 0x01

Since:

  • 1.0.0

MSG_CODE_EVENT_RX_FAIL = 0x02

Since:

  • 1.0.0

MSG_CODE_EVENT_TX = 0x03

Since:

  • 1.0.0

MSG_CODE_EVENT_TRANSFER_RX_FAILED = 0x04

Since:

  • 1.0.0

MSG_CODE_EVENT_TRANSFER_TX_COMPLETED = 0x05

Since:

  • 1.0.0

MSG_CODE_EVENT_TRANSFER_TX_FAILED = 0x06

Since:

  • 1.0.0

MSG_CODE_EVENT_CHANNEL_CLOSED = 0x07

Since:

  • 1.0.0

MSG_CODE_EVENT_RX_FAIL_GO_TO_SEARCH = 0x08

Since:

  • 1.0.0

MSG_CODE_CHANNEL_IN_WRONG_STATE = 0x15

Since:

  • 1.0.0

MSG_CODE_CHANNEL_ID_NOT_SET = 0x18

Since:

  • 1.0.0

MSG_CODE_TRANSFER_IN_PROGRESS = 0x1F

Since:

  • 1.0.0

MSG_CODE_INVALID_MESSAGE = 0x28

Since:

  • 1.0.0

MSG_CODE_EVENT_QUE_OVERFLOW = 0x35

Since:

  • 1.0.0

MSG_CODE_EVENT_CRYPTO_NEGOTIATION_SUCCESS = 0x38

Since:

  • 2.3.0

MSG_CODE_EVENT_CRYPTO_NEGOTIATION_FAIL = 0x39

Since:

  • 2.3.0

NETWORK_PUBLIC = 0

Since:

  • 1.0.0

NETWORK_PLUS = 1

Since:

  • 1.0.0

NETWORK_PRIVATE = 2

Since:

  • 1.2.0

CHANNEL_TYPE_TX_NOT_RX = 0x10

Bidirectional Transmit (Master)

Since:

  • 1.0.0

CHANNEL_TYPE_RX_NOT_TX = 0x00

Bidirectional Receive (Slave)

Since:

  • 1.0.0

CHANNEL_TYPE_RX_ONLY = 0x40

Receive Only (Slave)

Since:

  • 1.2.0

CHANNEL_TYPE_SHARED_BIDIRECTIONAL_RECEIVE = 0x20

Shared Bidirectional Receive (Slave)

Since:

  • 3.1.0

CHANNEL_TYPE_SHARED_BIDIRECTIONAL_TRANSMIT = 0x30

Shared Bidirectional Transmit (Master)

Since:

  • 3.1.0

BURST_ERROR_OUT_OF_MEMORY = 0

Error codes passed to the failure functions in the BurstListener

There was not enough memory available to send/receive a burst message

Since:

  • 2.2.0

BURST_ERROR_SEQUENCE_NUMBER_FAIL = 1

A burst packet was received out of order and the entire message was dropped

Since:

  • 2.2.0

BURST_ERROR_RF_FAIL = 2

A burst failed over the air

Since:

  • 2.2.0

BURST_ERROR_TRANSFER_IN_PROGRESS = 3

Burst was blocked by another burst from the native system code

Since:

  • 2.2.0