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


16562
16563
# File 'Monkeybrains.rb', line 16562

def initialize()
end

Instance Attribute Details

serialToybox::Lang::Number

The serial number.

Returns:

Since:

  • 2.2.0


16546
16547
16548
# File 'Monkeybrains.rb', line 16546

def serial
  @serial
end

swRevisionMainToybox::Lang::Number

The main software revision.

Returns:

Since:

  • 2.2.0


16552
16553
16554
# File 'Monkeybrains.rb', line 16552

def swRevisionMain
  @swRevisionMain
end

swRevisionSupplementalToybox::Lang::Number

The supplemental software revision.

Returns:

Since:

  • 2.2.0


16558
16559
16560
# File 'Monkeybrains.rb', line 16558

def swRevisionSupplemental
  @swRevisionSupplemental
end