Table of Contents

Class Diagnostic

Namespace
Geotab.Checkmate.ObjectModel.Engine
Assembly
Geotab.Checkmate.ObjectModel.dll

Vehicle diagnostic information from the engine computer that can either be measurement data or fault code data. Note: Diagnostics cannot be added, set or removed via the API.

[ReportClass]
public abstract class Diagnostic : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion
Inheritance
Diagnostic
Implements
Derived
Inherited Members

Constructors

Diagnostic()

Initializes a new instance of the Diagnostic class.Initializes a new instance of the Diagnostic class.

protected Diagnostic()

Diagnostic(Diagnostic)

Initializes a new instance of the Diagnostic class.Initializes a new instance of the Diagnostic class.

protected Diagnostic(Diagnostic diagnostic)

Parameters

diagnostic Diagnostic

The diagnostic.

Diagnostic(Id?, long?)

Initializes a new instance of the Diagnostic class. Initializes a new instance of Diagnostic object, only with Id.

protected Diagnostic(Id? identity, long? version)

Parameters

identity Id

The id.

version long?

The version.

Diagnostic(Id?, long?, string?, int?, EngineType?, Source?, Controller?, FaultResetMode?, UnitOfMeasure?, ValidLoggingPeriod?)

Initializes a new instance of the Diagnostic class.

protected Diagnostic(Id? id, long? version, string? name, int? code, EngineType? engineType, Source? source, Controller? controller, FaultResetMode? faultResetMode, UnitOfMeasure? unitOfMeasure, ValidLoggingPeriod? validLoggingPeriod)

Parameters

id Id

The identifier.

version long?

The version.

name string

The name.

code int?

The code.

engineType EngineType

Type of the engine.

source Source

The source.

controller Controller

The controller.

faultResetMode FaultResetMode?

The fault reset mode.

unitOfMeasure UnitOfMeasure

The unit of measure.

validLoggingPeriod ValidLoggingPeriod?

The ValidLoggingPeriod of this diagnostic.

Exceptions

ArgumentException

controller.

Fields

FuelUsedDiagnosticCode

false The code for fuel used.

public const int FuelUsedDiagnosticCode = 14

Field Value

int

IdleFuelUsedDiagnosticCode

false The code for idle fuel used.

public const int IdleFuelUsedDiagnosticCode = 15

Field Value

int

TotalFuelUsedDiagnosticCode

false The code for total fuel used @return. int

public const int TotalFuelUsedDiagnosticCode = 2187

Field Value

int

Properties

Code

Gets or sets the diagnostic parameter code number.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DiagnosticCode })]
public int? Code { get; set; }

Property Value

int?

int

Controller

Gets or sets the applicable Controller for the diagnostic parameter.

public Controller? Controller { get; set; }

Property Value

Controller

Controller

DiagnosticType

Gets or sets the DiagnosticType (source) of the diagnostic parameter.

public DiagnosticType? DiagnosticType { get; set; }

Property Value

DiagnosticType?

DiagnosticType

EngineType

Gets or sets the EngineType for this diagnostic if applicable, otherwise null.

public virtual EngineType? EngineType { get; set; }

Property Value

EngineType

EngineType

FaultResetMode

Gets or sets the FaultResetMode of the diagnostic (whether the fault resets automatically or manually).

public FaultResetMode? FaultResetMode { get; set; }

Property Value

FaultResetMode?

FaultResetMode

Id

Gets or sets the unique identifier for this entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DiagnosticId })]
public override Id? Id { get; set; }

Property Value

Id

Id

IsLogGuaranteedOnEstimateError

Gets or sets the value which describes if the diagnostic guarantees it will log when estimate error is exceeded.

public bool? IsLogGuaranteedOnEstimateError { get; set; }

Property Value

bool?

bool

Name

Gets or sets the name of this entity which identifies it and is used when displaying this entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DiagnosticName })]
public override string? Name { get; set; }

Property Value

string

string

Source

Gets or sets the Source for the diagnostic (the type of diagnostic code).

public Source? Source { get; set; }

Property Value

Source

Source

TamperingDiagnostics

Gets the tampering diagnostic codes.

public static Diagnostic[] TamperingDiagnostics { get; }

Property Value

Diagnostic[]

byte

UnitOfMeasure

Gets or sets the UnitOfMeasure applicable to the diagnostic parameter.

public UnitOfMeasure? UnitOfMeasure { get; set; }

Property Value

UnitOfMeasure

UnitOfMeasure

ValidLoggingPeriod

Gets or sets the ValidLoggingPeriod. The diagnostic should only be interpolated within the range of the given type.

public ValidLoggingPeriod? ValidLoggingPeriod { get; set; }

Property Value

ValidLoggingPeriod?

string

Methods

EnforceReadOnlyInline()

Must be called by every setter to guarantee the object is not mutated.

protected void EnforceReadOnlyInline()

MakeReadOnly()

Makes this object read only. Modifying any property after it is readonly will generate an invalid operation exception.

public void MakeReadOnly()

SeparateByDiagnostic<T>(IEnumerable<T>)

Separates collection of IDeviceProvider interface objects into individual collections by Diagnostic objects.

public static Dictionary<Diagnostic, IList<T>> SeparateByDiagnostic<T>(IEnumerable<T> collection) where T : IDiagnosticProvider

Parameters

collection IEnumerable<T>

The collection.

Returns

Dictionary<Diagnostic, IList<T>>

The separated IDiagnosticProviders.

Type Parameters

T

IDiagnosticProvider