createTrainingFileMesg static method
Mesg
createTrainingFileMesg(
)
Implementation
static Mesg createTrainingFileMesg() {
int fieldIndex, subfieldIndex;
Mesg newMesg = Mesg("TrainingFile", MesgNum.trainingFile);
fieldIndex = 0;
newMesg.setField(
Field("Timestamp", 253, 134, 1.0, 0.0, "", false, ProfileType.dateTime),
);
fieldIndex++;
newMesg.setField(
Field("Type", 0, 0, 1.0, 0.0, "", false, ProfileType.file),
);
fieldIndex++;
newMesg.setField(
Field(
"Manufacturer",
1,
132,
1.0,
0.0,
"",
false,
ProfileType.manufacturer,
),
);
fieldIndex++;
Field productField = Field(
"Product",
2,
132,
1.0,
0.0,
"",
false,
ProfileType.uint16,
);
subfieldIndex = 0;
productField.subfields.add(Subfield("FaveroProduct", 132, 1.0, 0.0, ""));
productField.subfields[subfieldIndex].addMap(1, 263);
subfieldIndex++;
productField.subfields.add(Subfield("GarminProduct", 132, 1.0, 0.0, ""));
productField.subfields[subfieldIndex].addMap(1, 1);
productField.subfields[subfieldIndex].addMap(1, 15);
productField.subfields[subfieldIndex].addMap(1, 13);
productField.subfields[subfieldIndex].addMap(1, 89);
subfieldIndex++;
newMesg.setField(productField);
fieldIndex++;
newMesg.setField(
Field("SerialNumber", 3, 140, 1.0, 0.0, "", false, ProfileType.uint32z),
);
fieldIndex++;
newMesg.setField(
Field("TimeCreated", 4, 134, 1.0, 0.0, "", false, ProfileType.dateTime),
);
fieldIndex++;
return newMesg;
}