Table of Contents

Class DutyStatusLog

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

A DutyStatusLog is a record of duty status for Hours of Service regulations. The log is first required to have a driver, dateTime, status, and device. Location is not required and will be calculated from the device's data.

[ReportClass]
public class DutyStatusLog : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IHosLog, IDeviceProvider, IDateTimeProvider, IOdometerProvider, IEngineHoursProvider
Inheritance
DutyStatusLog
Implements
Inherited Members

Constructors

DutyStatusLog()

Initializes a new instance of the DutyStatusLog class.

public DutyStatusLog()

DutyStatusLog(Id?)

Initializes a new instance of the DutyStatusLog class.

public DutyStatusLog(Id? id)

Parameters

id Id

The log Id.

DutyStatusLog(DateTime?, DutyStatusLogType?, DateTime?, DateTime?, Device?, User?, List<User>?, List<AnnotationLog>?, AddressLookupData?, DutyStatusOrigin?, Id?, long?, Id?, DutyStatusState?, long?, DutyStatusMalfunctionTypes?, double?, double?, float?, DutyStatusDeferralType?, int?, bool?, long?, User?, bool?, UserHosRuleSet?, bool?)

Initializes a new instance of the DutyStatusLog class.

public DutyStatusLog(DateTime? dateTime, DutyStatusLogType? status, DateTime? verifyDateTime, DateTime? editDateTime, Device? device, User? driver, List<User>? codrivers, List<AnnotationLog>? annotations, AddressLookupData? location = null, DutyStatusOrigin? origin = null, Id? id = null, long? version = null, Id? parentId = null, DutyStatusState? state = null, long? sequence = null, DutyStatusMalfunctionTypes? malfunction = DutyStatusMalfunctionTypes.None, double? enginehours = null, double? odometer = null, float? distancesincevalidcoords = null, DutyStatusDeferralType? deferralStatus = null, int? deferralMinutes = null, bool? isIgnored = null, long? eventCheckSum = null, User? editRequestedByUser = null, bool? isHidden = null, UserHosRuleSet? userHosRuleSet = null, bool? isTransitioning = null)

Parameters

dateTime DateTime?

The DateTime the log was created.

status DutyStatusLogType?

The DutyStatusLogType representing the driver's duty status.

verifyDateTime DateTime?

The DateTime the log was verified.

editDateTime DateTime?

The DateTime the log was edited.

device Device

The Device associated with this log.

driver User

The User who created this log.

codrivers List<User>

The list of the co-driver User(s) for this log.

annotations List<AnnotationLog>

The list of AnnotationLog(s) which are associated with this log.

location AddressLookupData

The AddressLookupData location data for this log.

origin DutyStatusOrigin?

The DutyStatusOrigin data for this log.

id Id

The unique Id of the log.

version long?

The version of the entity.

parentId Id

The id of the first version of this DutyStatusLog.

state DutyStatusState?

The record status of the log record.

sequence long?

The sequence number the log record.

malfunction DutyStatusMalfunctionTypes?

The DutyStatusMalfunctionTypes of this log.

enginehours double?

The engine hours at the time of the log record.

odometer double?

The vehicle's odometer at the time of the log record.

distancesincevalidcoords float?

The distance travelled since the last valid coordinate before the log's datetime.

deferralStatus DutyStatusDeferralType?

The deferral status.

deferralMinutes int?

The deferral minutes.

isIgnored bool?

Is the log ignored.

eventCheckSum long?

Event checksum of a duty status log according to ELD specifications.

editRequestedByUser User

The User that requested an edit to this log.

isHidden bool?

Hides the logs from the drivers on the drive app

userHosRuleSet UserHosRuleSet

The linked ruleset for canadian compliance logs

isTransitioning bool?

If log is in the Transitioning state

DutyStatusLog(DateTime?, DutyStatusLogType?, DateTime?, DateTime?, Device?, User?, List<User>?, List<AnnotationLog>?, DutyStatusOrigin?)

Initializes a new instance of the DutyStatusLog class.

public DutyStatusLog(DateTime? dateTime, DutyStatusLogType? status, DateTime? verifyDateTime, DateTime? editDateTime, Device? device, User? driver, List<User>? codrivers, List<AnnotationLog>? annotations, DutyStatusOrigin? origin)

Parameters

dateTime DateTime?

The DateTime the log was created.

status DutyStatusLogType?

The DutyStatusLogType representing the driver's duty status.

verifyDateTime DateTime?

The DateTime the log was verified.

editDateTime DateTime?

The DateTime the log was edited.

device Device

The Device associated with this log.

driver User

The User who created this log.

codrivers List<User>

The list of the co-driver User(s) for this log.

annotations List<AnnotationLog>

The list of AnnotationLog(s) which are associated with this log.

origin DutyStatusOrigin?

The DutyStatusOrigin of the log.

Properties

Annotations

Gets or sets the list of AnnotationLog(s) which are associated with this log.

public List<AnnotationLog>? Annotations { get; set; }

Property Value

List<AnnotationLog>

IList<T>

CoDrivers

Gets or sets the list of the co-driver User(s) for this log.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusCoDrivers }, IsList = true)]
public List<User>? CoDrivers { get; set; }

Property Value

List<User>

User

DateTime

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

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

Property Value

DateTime?

DateTime

DeferralMinutes

Gets or sets the deferral minutes.

public int? DeferralMinutes { get; set; }

Property Value

int?

int

DeferralStatus

Gets or sets the DutyStatusDeferralType.

public DutyStatusDeferralType? DeferralStatus { get; set; }

Property Value

DutyStatusDeferralType?

DutyStatusDeferralType

Device

Gets or sets the Device associated with this log.

public Device? Device { get; set; }

Property Value

Device

Device

DistanceSinceValidCoordinates

Gets or sets the distance since last valid coordinate measurement.

public float? DistanceSinceValidCoordinates { get; set; }

Property Value

float?

byte

Driver

Gets or sets the User who created this log.

public User? Driver { get; set; }

Property Value

User

User

EditDateTime

Gets or sets the date and time the log was edited. If the log has not been edited, this will not be set.

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

Property Value

DateTime?

DateTime

EditRequestedByUser

Gets or sets the User that requested an edit to this log.

public User? EditRequestedByUser { get; set; }

Property Value

User

User

EngineHours

Gets or sets the engine hours for the Device at the DateTime of this log. The unit is seconds (not hours).

public double? EngineHours { get; set; }

Property Value

double?

double

EventCheckSum

Gets or sets the event checksum of this log.

public long? EventCheckSum { get; set; }

Property Value

long?

long

EventCode

Gets or sets the event code of this log (Table 6; 7.20 of the ELD Final Rule).

public byte? EventCode { get; set; }

Property Value

byte?

byte

EventRecordStatus

Gets the record status number of this log 1 = active 2 = inactive - changed 3 = inactive - change requested 4 = inactive - change rejected.

public byte? EventRecordStatus { get; }

Property Value

byte?

byte

EventType

Gets or sets the event type number of this log 1 = A change in driver's duty-status 2 = An intermediate log 3 = A change in driver's indication of authorized personal use of CMV or yard moves 4 = A driver's certification/re-certification of records 5 = A driver's login/logout activity 6 = CMV's engine power up / shut down activity 7 = A malfunction or data diagnostic detection occurrence (Table 6; 7.25 of the ELD Final Rule).

public byte? EventType { get; set; }

Property Value

byte?

byte

Id

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

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

Property Value

Id

Id

IsHidden

Gets or sets if the log is hidden.

public bool? IsHidden { get; set; }

Property Value

bool?

bool

IsIgnored

Gets or sets if the log is ignored. True means it will not affect the Driver's HOS availability.

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

Property Value

bool?

bool

IsTransitioning

Gets or sets a value indicating whether the log is in transitioning state.

public bool? IsTransitioning { get; set; }

Property Value

bool?

bool

Location

Gets or sets an object with the location information for the log data.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusLocation })]
public AddressLookupData? Location { get; set; }

Property Value

AddressLookupData

AddressLookupData

Malfunction

Gets or sets the DutyStatusMalfunctionTypes of the DutyStatusLog record. As a flag it can be both a diagnostic and malfunction state which is used to mark status based records (e.g. "D", "SB") as having a diagnostic or malfunction present at time of recording.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusMalfunctionType })]
public DutyStatusMalfunctionTypes? Malfunction { get; set; }

Property Value

DutyStatusMalfunctionTypes?

DutyStatusMalfunctionTypes

Odometer

Gets or sets the odometer in meters for the Device at the DateTime of this log.

public double? Odometer { get; set; }

Property Value

double?

double

Origin

Gets or sets the DutyStatusOrigin from where this log originated.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusOrigin })]
public DutyStatusOrigin? Origin { get; set; }

Property Value

DutyStatusOrigin?

DutyStatusOrigin

ParentId

Gets or sets the Id of the parent DutyStatusLog. Used when a DutyStatusLog is edited. When returning history, this field will be populated.

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

Property Value

Id

Id

Sequence

Gets or sets the sequence number, which is used to generate the sequence ID.

public long? Sequence { get; set; }

Property Value

long?

long

State

Gets or sets the DutyStatusState of the DutyStatusLog record.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusState })]
public DutyStatusState? State { get; set; }

Property Value

DutyStatusState?

DutyStatusState

Status

Gets or sets the DutyStatusLogType representing the driver's duty status.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusStatus })]
public DutyStatusLogType? Status { get; set; }

Property Value

DutyStatusLogType?

DutyStatusLogType

UserHosRuleSet

Gets or sets the linked UserHosRuleSet. This property is only used to link rulesets to log events that affect the driver's operating zone and/or cycle. (Canadian ELD)

public UserHosRuleSet? UserHosRuleSet { get; set; }

Property Value

UserHosRuleSet

UserHosRuleSet

VerifyDateTime

Gets or sets the date and time the log was verified. If the log is unverified, this will not be set.

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

Property Value

DateTime?

DateTime

Version

Gets or sets the version of the entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.DutyStatusVersion })]
public override long? Version { get; set; }

Property Value

long?

The long version.

Methods

Clone()

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

public override IEntity Clone()

Returns

IEntity

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

IsAutoHosLog()

Checks if this log is an Automatic log

public bool IsAutoHosLog()

Returns

bool

bool

IsInactive()

Checks if this log is inactive

public bool IsInactive()

Returns

bool

bool

IsMalfunctionLog()

Checks if the log is a Malfunction log.

public bool IsMalfunctionLog()

Returns

bool

boolTrue if it is a malfunction log.

IsUnassignedLog()

Checks if this log is an Unassigned Log

public bool IsUnassignedLog()

Returns

bool

bool

ToString()

Returns a string representation of a. DutyStatusLog

public override string ToString()

Returns

string

string