createTimeInZoneMesg static method

Mesg createTimeInZoneMesg()

Implementation

static Mesg createTimeInZoneMesg() {
  int fieldIndex, subfieldIndex;
  Mesg newMesg = Mesg("TimeInZone", MesgNum.timeInZone);
  fieldIndex = 0;
  newMesg.setField(
    Field("Timestamp", 253, 134, 1.0, 0.0, "s", false, ProfileType.dateTime),
  );
  fieldIndex++;
  newMesg.setField(
    Field("ReferenceMesg", 0, 132, 1.0, 0.0, "", false, ProfileType.mesgNum),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "ReferenceIndex",
      1,
      132,
      1.0,
      0.0,
      "",
      false,
      ProfileType.messageIndex,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "TimeInHrZone",
      2,
      134,
      1000.0,
      0.0,
      "s",
      false,
      ProfileType.uint32,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "TimeInSpeedZone",
      3,
      134,
      1000.0,
      0.0,
      "s",
      false,
      ProfileType.uint32,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "TimeInCadenceZone",
      4,
      134,
      1000.0,
      0.0,
      "s",
      false,
      ProfileType.uint32,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "TimeInPowerZone",
      5,
      134,
      1000.0,
      0.0,
      "s",
      false,
      ProfileType.uint32,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "HrZoneHighBoundary",
      6,
      2,
      1.0,
      0.0,
      "bpm",
      false,
      ProfileType.uint8,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "SpeedZoneHighBoundary",
      7,
      132,
      1000.0,
      0.0,
      "m/s",
      false,
      ProfileType.uint16,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "CadenceZoneHighBondary",
      8,
      2,
      1.0,
      0.0,
      "rpm",
      false,
      ProfileType.uint8,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "PowerZoneHighBoundary",
      9,
      132,
      1.0,
      0.0,
      "watts",
      false,
      ProfileType.uint16,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field("HrCalcType", 10, 0, 1.0, 0.0, "", false, ProfileType.hrZoneCalc),
  );
  fieldIndex++;
  newMesg.setField(
    Field("MaxHeartRate", 11, 2, 1.0, 0.0, "", false, ProfileType.uint8),
  );
  fieldIndex++;
  newMesg.setField(
    Field("RestingHeartRate", 12, 2, 1.0, 0.0, "", false, ProfileType.uint8),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "ThresholdHeartRate",
      13,
      2,
      1.0,
      0.0,
      "",
      false,
      ProfileType.uint8,
    ),
  );
  fieldIndex++;
  newMesg.setField(
    Field("PwrCalcType", 14, 0, 1.0, 0.0, "", false, ProfileType.pwrZoneCalc),
  );
  fieldIndex++;
  newMesg.setField(
    Field(
      "FunctionalThresholdPower",
      15,
      132,
      1.0,
      0.0,
      "",
      false,
      ProfileType.uint16,
    ),
  );
  fieldIndex++;

  return newMesg;
}