public static void TripStart(string inTripName, string inDataMode, int inMaxTime) { TripBookRecordDataMode tmpDataMode = TripBookRecordDataMode.tbdmNoData; switch (inDataMode) { case "tbdmNoData": tmpDataMode = TripBookRecordDataMode.tbdmNoData; break; case "tbdmFullData": tmpDataMode = TripBookRecordDataMode.tbdmFullData; break; case "tbdmFullNMEA": tmpDataMode = TripBookRecordDataMode.tbdmFullNMEA; break; default: break; } int ret = CApplicationAPI.TripStart(out _mySError, inTripName, (int)tmpDataMode, inMaxTime); O("TripStart returns: " + ret.ToString()); }