Class: Toybox::AntPlus::ProductInfo

Inherits:
CommonData show all

Overview

Class containing information from the Product Information ANT+ common page.

Fields may return null so you should null check values before using them.

Examples:

using Toybox.AntPlus;
using Toybox.System;

// Assumes AntPlus.Device.getProductInfo(); already called
var serial = ProductInfo.serial;
var swRevisionMain = ProductInfo.swRevisionMain;
var swRevisionSupplemental = ProductInfo.swRevisionSupplemental;

System.println("Current serial is: " + serial);
System.println("Current swRevisionMain is: " + swRevisionMain);
System.println("Current swRevisionSupplemental is: " + swRevisionSupplemental);

Since:

  • 2.2.0

Instance Attribute Summary collapse

Attributes inherited from CommonData

identifier, numComponents

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initializeProductInfo

Constructor.

Since:

  • 2.2.0


16589
16590
# File 'Monkeybrains.rb', line 16589

def initialize()
end

Instance Attribute Details

serialToybox::Lang::Number

The serial number.

Returns:

Since:

  • 2.2.0


16573
16574
16575
# File 'Monkeybrains.rb', line 16573

def serial
  @serial
end

swRevisionMainToybox::Lang::Number

The main software revision.

Returns:

Since:

  • 2.2.0


16579
16580
16581
# File 'Monkeybrains.rb', line 16579

def swRevisionMain
  @swRevisionMain
end

swRevisionSupplementalToybox::Lang::Number

The supplemental software revision.

Returns:

Since:

  • 2.2.0


16585
16586
16587
# File 'Monkeybrains.rb', line 16585

def swRevisionSupplemental
  @swRevisionSupplemental
end