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.
[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
DiagnosticThe 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
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
IdThe identifier.
version
long?The version.
name
stringThe name.
code
int?The code.
engineType
EngineTypeType of the engine.
source
SourceThe source.
controller
ControllerThe controller.
faultResetMode
FaultResetMode?The fault reset mode.
unitOfMeasure
UnitOfMeasureThe unit of measure.
validLoggingPeriod
ValidLoggingPeriod?The ValidLoggingPeriod of this diagnostic.
Exceptions
- ArgumentException
controller.
Fields
FuelUsedDiagnosticCode
public const int FuelUsedDiagnosticCode = 14
Field Value
IdleFuelUsedDiagnosticCode
public const int IdleFuelUsedDiagnosticCode = 15
Field Value
TotalFuelUsedDiagnosticCode
public const int TotalFuelUsedDiagnosticCode = 2187
Field Value
Properties
Code
Gets or sets the diagnostic parameter code number.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DiagnosticCode })]
public int? Code { get; set; }
Property Value
Controller
Gets or sets the applicable Controller for the diagnostic parameter.
public Controller? Controller { get; set; }
Property Value
DiagnosticType
Gets or sets the DiagnosticType (source) of the diagnostic parameter.
public DiagnosticType? DiagnosticType { get; set; }
Property Value
EngineType
Gets or sets the EngineType for this diagnostic if applicable, otherwise null.
public virtual EngineType? EngineType { get; set; }
Property Value
FaultResetMode
Gets or sets the FaultResetMode of the diagnostic (whether the fault resets automatically or manually).
public FaultResetMode? FaultResetMode { get; set; }
Property Value
Id
Gets or sets the unique identifier for this entity.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DiagnosticId })]
public override Id? Id { get; set; }
Property Value
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
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
Source
Gets or sets the Source for the diagnostic (the type of diagnostic code).
public Source? Source { get; set; }
Property Value
TamperingDiagnostics
Gets the tampering diagnostic codes.
public static Diagnostic[] TamperingDiagnostics { get; }
Property Value
UnitOfMeasure
Gets or sets the UnitOfMeasure applicable to the diagnostic parameter.
public UnitOfMeasure? UnitOfMeasure { get; set; }
Property Value
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
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.