getCombinedAnalysis method

DriverBehaviourAnalysis? getCombinedAnalysis(
  1. DateTime startTime,
  2. DateTime endTime
)

Combine analyses from multiple sessions within a time range into a single aggregated DriverBehaviourAnalysis.

Parameters

  • startTime: The start of the time range (inclusive).
  • endTime: The end of the time range (inclusive).

Returns

  • A combined DriverBehaviourAnalysis summarizing all analyses in the interval, or null if the operation failed or no valid data is available.

Also see:

Implementation

DriverBehaviourAnalysis? getCombinedAnalysis(
  DateTime startTime,
  DateTime endTime,
) {
  final OperationResult resultString = objectMethod(
    pointerId,
    'DriverBehaviour',
    'getCombinedAnalysis',
    args: <String, dynamic>{
      'first': startTime.millisecondsSinceEpoch,
      'second': endTime.millisecondsSinceEpoch,
    },
  );

  if (resultString['result'] == -1 || resultString['gemApiError'] != 0) {
    return null;
  }

  return DriverBehaviourAnalysis.init(resultString['result']);
}