private void writeData(string[] str, statistics st) { byte header = byte.Parse(str[1]); fitstream.writeValue(header); byte fields = localMesgDefs[header].Fields; localField[] fd = localMesgDefs[header].localFields; int globalMesgIndex = localMesgDefs[header].globalMesgIndex; if (globalMesgIndex == FIT.FIT_MESG_NUM_SESSION) { st.calcSession(); } if (globalMesgIndex == FIT.FIT_MESG_NUM_LAP) { st.calcLap(); } for (int i = 0; i < fields; i++) { fitstream.writeValue(fd[i], str[i + 2], st, globalMesgIndex); } if (globalMesgIndex == FIT.FIT_MESG_NUM_RECORD) { st.update(); } if (globalMesgIndex == FIT.FIT_MESG_NUM_SESSION) { st.resetSession(); } if (globalMesgIndex == FIT.FIT_MESG_NUM_LAP) { st.resetLap(); } }
private void writeData(string[] str, statistics st) { byte header = byte.Parse(str[1]); fitstream.writeValue(header); byte fields = localMesgDefs[header].Fields; localField[] fd = localMesgDefs[header].localFields; int globalMesgIndex = localMesgDefs[header].globalMesgIndex; if (globalMesgIndex == FIT.FIT_MESG_NUM_SESSION) st.calcSession(); if (globalMesgIndex == FIT.FIT_MESG_NUM_LAP) st.calcLap(); for (int i = 0; i < fields; i++) { fitstream.writeValue(fd[i], str[i + 2], st, globalMesgIndex); } if (globalMesgIndex == FIT.FIT_MESG_NUM_RECORD) st.update(); if (globalMesgIndex == FIT.FIT_MESG_NUM_SESSION) st.resetSession(); if (globalMesgIndex == FIT.FIT_MESG_NUM_LAP) st.resetLap(); }