getCombinedAnalysis method

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

Get an analysis constructed from all analysis from the specified time period.

Parameters

  • IN startTime The start time of the period.
  • IN endTime The end time of the period.

Returns

The combined analysis. Use DriverBehaviourAnalysis.isValid to check if the analysis is valid.

Throws

  • An exception if it fails.

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']);
}