Table of Contents

Class DVIRLog

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

A DVIRLog is a Driver Vehicle Inspection Report which is prepared by a driver regarding defects in parts of a vehicle associated with a Device or Trailer. Once the report is completed with optional driver remarks, the DVIR log will be acted upon, and marked as repairs made or not necessary (usually by another User). The driver then will mark the log as certified for being safe or unsafe to operate based on the effectiveness of any repairs made or comments for repairs not performed.

[ReportClass]
public class DVIRLog : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IHosLog, IDeviceProvider, ITrailerProvider, IDateTimeProvider, IDefaultable
Inheritance
DVIRLog
Implements
Inherited Members

Constructors

DVIRLog()

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

public DVIRLog()

DVIRLog(DateTime?, User?, Device?, Trailer?, string?, IList<DVIRDefect>?, DateTime?, User?, string?, DateTime?, User?, string?, bool?, DVIRLogType?, Group?, string?, string?, double?, float?, float?, bool?, bool?, Id?, long?, AddressLookupData?, TimeSpan?)

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

public DVIRLog(DateTime? dateTime, User? driver, Device? device, Trailer? trailer, string? driverRemark, IList<DVIRDefect>? dvirDefects, DateTime? repairDate, User? repairedBy, string? repairRemark, DateTime? certifyDate, User? certifiedBy, string? certifyRemark, bool? isSafeToOperate, DVIRLogType? type, Group? defectList, string? authorityName, string? authorityAddress, double? odometer, float? loadHeight, float? loadWidth, bool? isInspectedByDriver, bool? isRejected, Id? id, long? version, AddressLookupData? location = null, TimeSpan? duration = null)

Parameters

dateTime DateTime?

The DateTime the log was created.

driver User

The User who created this log.

device Device

The Device associated with this log. Either only a Device or only a Trailer may be defined for a log.

trailer Trailer

The Trailer associated with this log. Either only a Device or only a Trailer may be defined for a log.

driverRemark string

The remark recorded by the driver for this log.

dvirDefects IList<DVIRDefect>

The list of DVIRDefect DVIRDefect(s) for this log.

repairDate DateTime?

The DateTime the Device or Trailer was repaired.

repairedBy User

The User who repaired the Device or. Trailer

repairRemark string

The remark recorded by the User who repaired the Device or Trailer.

certifyDate DateTime?

The DateTime the repairs (if necessary) to the Device or Trailer were certified.

certifiedBy User

The User who certified the repairs (if necessary) to the Device or Trailer.

certifyRemark string

The remark recorded by the User who certified the repairs (if necessary) to the Device or Trailer.

isSafeToOperate bool?

Whether or not the Device or Trailer was certified as safe to operate.

type DVIRLogType?

The DVIRLogType of this log.

defectList Group

The defect list Group used to create this log.

authorityName string

The authority name for the driver at the time of this log.

authorityAddress string

The authority address for the driver at the time of this log.

odometer double?

The odometer or hubometer of the vehicle or trailer, respectively, if it was manually recorded by the driver.

loadHeight float?

The load height, if it was manually recorded by the driver.

loadWidth float?

The load width, if it was manually recorded by the driver.

isInspectedByDriver bool?

If true, the DVIR log was inspected by the driver. Otherwise, the log was inspected by an inspector.

isRejected bool?

If true, the DVIR log was marked as rejected by the driver.

id Id

The unique Id of the log.

version long?

The version of the entity.

location AddressLookupData

The AddressLookupData (location) of this log.

duration TimeSpan?

The TimeSpan it takes to complete this dvir

DVIRLog(DateTime?, User?, Device?, Trailer?, string?, IList<Group>?, DateTime?, User?, string?, DateTime?, User?, string?, bool?, DVIRLogType?, Group?, string?, string?, double?, float?, float?, bool?, bool?, Id?, long?, AddressLookupData?, TimeSpan?)

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

[Obsolete("Incorrect parameter for DVIR Constructor. Use dvirDefects instead of defects")]
public DVIRLog(DateTime? dateTime, User? driver, Device? device, Trailer? trailer, string? driverRemark, IList<Group>? defects, DateTime? repairDate, User? repairedBy, string? repairRemark, DateTime? certifyDate, User? certifiedBy, string? certifyRemark, bool? isSafeToOperate, DVIRLogType? type, Group? defectList, string? authorityName, string? authorityAddress, double? odometer, float? loadHeight, float? loadWidth, bool? isInspectedByDriver, bool? isRejected, Id? id, long? version, AddressLookupData? location = null, TimeSpan? duration = null)

Parameters

dateTime DateTime?

The DateTime the log was created.

driver User

The User who created this log.

device Device

The Device associated with this log. Either only a Device or only a Trailer may be defined for a log.

trailer Trailer

The Trailer associated with this log. Either only a Device or only a Trailer may be defined for a log.

driverRemark string

The remark recorded by the driver for this log.

defects IList<Group>

The list of defect Group(s) for this log.

repairDate DateTime?

The DateTime the Device or Trailer was repaired.

repairedBy User

The User who repaired the Device or. Trailer

repairRemark string

The remark recorded by the User who repaired the Device or Trailer.

certifyDate DateTime?

The DateTime the repairs (if necessary) to the Device or Trailer were certified.

certifiedBy User

The User who certified the repairs (if necessary) to the Device or Trailer.

certifyRemark string

The remark recorded by the User who certified the repairs (if necessary) to the Device or Trailer.

isSafeToOperate bool?

Whether or not the Device or Trailer was certified as safe to operate.

type DVIRLogType?

The DVIRLogType of this log.

defectList Group

The defect list Group used to create this log.

authorityName string

The authority name for the driver at the time of this log.

authorityAddress string

The authority address for the driver at the time of this log.

odometer double?

The odometer or hubometer of the vehicle or trailer, respectively, if it was manually recorded by the driver.

loadHeight float?

The load height, if it was manually recorded by the driver.

loadWidth float?

The load width, if it was manually recorded by the driver.

isInspectedByDriver bool?

If true, the DVIR log was inspected by the driver. Otherwise, the log was inspected by an inspector.

isRejected bool?

If true, the DVIR log was marked as rejected by the driver.

id Id

The unique Id of the log.

version long?

The version of the entity.

location AddressLookupData

The AddressLookupData (location) of this log.

duration TimeSpan?

The TimeSpan it takes to complete this dvir

Properties

AuthorityAddress

Gets or sets the authority address for the driver at the time of this log. Maximum length [255] Default [""].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogAuthorityAddress })]
public string? AuthorityAddress { get; set; }

Property Value

string

string

AuthorityName

Gets or sets the authority name for the driver at the time of this log. Maximum length [255] Default [""].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogAuthorityName })]
public string? AuthorityName { get; set; }

Property Value

string

string

CertifiedBy

Gets or sets the User who certified the repairs (or comments if no repairs were made) to the Device or Trailer.

public User? CertifiedBy { get; set; }

Property Value

User

User

CertifyDate

Gets or sets the date the Device or Trailer was certified.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogCertifyDate })]
public DateTime? CertifyDate { get; set; }

Property Value

DateTime?

DateTime

CertifyRemark

Gets or sets the remark recorded by the User who certified the repairs (or no repairs made) to the Device or Trailer.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogCertifyRemark })]
public string? CertifyRemark { get; set; }

Property Value

string

string

DVIRDefects

Gets or sets the list of DVIRDefects DVIRDefect(s) for this log.

public IList<DVIRDefect>? DVIRDefects { get; set; }

Property Value

IList<DVIRDefect>

DVIRDefect

DateTime

Gets or sets the date and time the log was created.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogDateTimeCreated })]
public DateTime? DateTime { get; set; }

Property Value

DateTime?

DateTime

DefectList

Gets or sets the defect list Group of the log.

public Group? DefectList { get; set; }

Property Value

Group

Group

Defects

Gets or sets the list of defect Group(s) for this log.

[Obsolete("FB/289474 Need to support it at least for 1805, will be removing this after 1805", false)]
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRDefects }, IsList = true)]
public IList<Group>? Defects { get; set; }

Property Value

IList<Group>

Group

Device

Gets or sets the Device associated with this log. Either a Device or a Trailer is defined for a log, not both (if the device is set, trailer must be null).

public Device? Device { get; set; }

Property Value

Device

Device

Driver

Gets or sets the User who created the log.

public User? Driver { get; set; }

Property Value

User

User

DriverRemark

Gets or sets the remark recorded by the driver for this log.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogDriverRemark })]
public string? DriverRemark { get; set; }

Property Value

string

string

Duration

Gets or sets the total time spent to complete this dvir. Default [null].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogDuration })]
public TimeSpan? Duration { get; set; }

Property Value

TimeSpan?

TimeSpan

Id

Gets or sets the unique identifier for this entity. See Id.

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

Property Value

Id

Id

IsInspectedByDriver

Gets or sets a value indicating whether the DVIR log was inspected by the driver. If false, the log was inspected by an inspector. Default [true].

public bool? IsInspectedByDriver { get; set; }

Property Value

bool?

bool

IsRejected

Gets or sets a value indicating whether the DVIR log was marked as rejected by the driver. Default [false].

public bool? IsRejected { get; set; }

Property Value

bool?

bool

IsSafeToOperate

Gets or sets identifier for whether or not the Device or Trailer was certified as safe to operate.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogIsSafeToOperate })]
public bool? IsSafeToOperate { get; set; }

Property Value

bool?

bool

LoadHeight

Gets or sets the load height, if it was manually recorded by the driver. Default [null].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogLoadHeight })]
public float? LoadHeight { get; set; }

Property Value

float?

float

LoadWidth

Gets or sets the load width, if it was manually recorded by the driver. Default [null].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogLoadWidth })]
public float? LoadWidth { get; set; }

Property Value

float?

float

Location

Gets or sets an object with the location information of the log.

public AddressLookupData? Location { get; set; }

Property Value

AddressLookupData

AddressLookupData

LogType

Gets or sets the DVIRLogType of the log. Default [Unknown].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogLogType })]
public DVIRLogType? LogType { get; set; }

Property Value

DVIRLogType?

DVIRLogType

Odometer

Gets or sets the odometer or hubometer of the vehicle or trailer, respectively, if it was manually recorded by the driver. Default [null].

public double? Odometer { get; set; }

Property Value

double?

double

RepairDate

Gets or sets the date the Device or Trailer was repaired.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogRepairDate })]
public DateTime? RepairDate { get; set; }

Property Value

DateTime?

DateTime

RepairRemark

Gets or sets the remark recorded by the User who repaired the Device or Trailer.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DVIRLogRepairRemark })]
public string? RepairRemark { get; set; }

Property Value

string

string

RepairedBy

Gets or sets the User who repaired the Device or Trailer.

public User? RepairedBy { get; set; }

Property Value

User

User

Trailer

Gets or sets the Trailer associated with this log. Either a Device or a Trailer is defined for a log, not both (if the trailer is set, device must be null).

public Trailer? Trailer { get; set; }

Property Value

Trailer

Trailer

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

DVIRLog A new object that is a copy of this instance.

GetFilteredDefects(DefectSeverity)

false Filters the Defect list attached to this DVIRLog instance with a minimum DefectSeverity level. Will also check child Defects of any Groups if applicable.

public IEnumerable<Defect> GetFilteredDefects(DefectSeverity severityFilter)

Parameters

severityFilter DefectSeverity

The minimum severity to allow past the filter.

Returns

IEnumerable<Defect>

Returns Enumerable of all Defect entries that passed the filter.

PopulateDefaults()

Populate non-required empty (null) properties with default values.

public void PopulateDefaults()