Class: $.AntModule.AntSensor

Inherits:
Ant.GenericChannel show all

Overview

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var _cryptoConfig as Ant.CryptoConfig

var _data as Lang.String

var _deviceCfg as Ant.DeviceConfig

var _encrypted as Lang.Boolean

var _index as Lang.Number

var _isMaster as Lang.Boolean

var _searching as Lang.Boolean

Instance Method Details

DecodeByteToASCII(bytes as Lang.Array<Lang.Number>) as Lang.String

Decode an array and return its ascii string equivalent

Parameters:

  • bytes —

    Array of integers representing the bytes to decode

Returns:

  • an ascii string equivalent to the given array

disableEncryption() as Lang.Boolean

Disables encryption for master and decryption for slave

Returns:

  • True on success, otherwise false

enableChannelEncryption() as Void

Enables encryption for master and decryption for slave

getData() as Lang.String

Get the sensor data

Returns:

  • The data

getDeviceConfig() as Ant.DeviceConfig

Get the device configuration

Returns:

  • The device configuration

initialize(isChannelTypeMaster as Lang.Boolean)

Constructor, initializes AntSensor and configures and opens channel

Parameters:

  • isChannelTypeMaster —

    Boolean that indicates if the channel should be a master or a slave

isEncrypted() as Lang.Boolean

Get whether the sensor is encrypted

Returns:

  • true if encrypted, false otherwise

isMaster() as Lang.Boolean

Get whether the channel is master

Returns:

  • true if master, false otherwise

isSearching() as Lang.Boolean

Get whether the sensor is searching

Returns:

  • true if searching, false otherwise

onMessage(msg as Ant.Message) as Void

On Ant Message, parses message

Parameters:

  • msg —

    Ant.Message object

open() as Lang.Boolean

Opens the generic channel

Returns:

  • true if channel is successfully opened, false otherwise

updateData(bArray as Lang.Array<Lang.Number>) as Void

Adds the new message to data Maintains data stays within MAX_DATA_LENGTH

Parameters:

  • bArray —

    Array with the message you want to add to data


Generated Jun 9, 2026, 8:45:39 AM