Class DeviceStatusInfo
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
Represents the current state of a vehicle by providing information such as the vehicle bearing location and speed, active exception events and whether the device is currently communicating.
public class DeviceStatusInfo : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDateTimeProvider, IDeviceProvider, IDriverProvider, IGroupLinked, IDefaultable
- Inheritance
-
DeviceStatusInfo
- Implements
- Inherited Members
Constructors
DeviceStatusInfo()
Initializes a new instance of the DeviceStatusInfo class.Constructor.
public DeviceStatusInfo()
DeviceStatusInfo(Id, long, Device, Driver, IList<ExceptionEvent>, int?, bool, in TimeSpan, double?, double?, float?, DateTime?, bool, Dictionary<Id, IDeviceStatusInfoDiagnostic>?)
Initializes a new instance of the DeviceStatusInfo class.Constructor.
public DeviceStatusInfo(Id id, long version, Device device, Driver driver, IList<ExceptionEvent> exceptionEvents, int? bearing, bool isDriving, in TimeSpan currentStateDuration, double? latitude, double? longitude, float? speed, DateTime? dateTime, bool isHistoricLastDriver, Dictionary<Id, IDeviceStatusInfoDiagnostic>? diagnostics)
Parameters
id
Idid.
version
longThe version.
device
DeviceThe Device that received the message.
driver
DriverThe Driver of the vehicle.
exceptionEvents
IList<ExceptionEvent>Exception events which occured during most recent status update.
bearing
int?Device bearing.
isDriving
boolVehicle is being operated by a Driver.
currentStateDuration
TimeSpanAmount of time in current state.
latitude
double?Latitude.
longitude
double?Longitude.
speed
float?Speed of the vehicle.
dateTime
DateTime?Date of the status.
isHistoricLastDriver
boolDriver is last operator of vehicle.
diagnostics
Dictionary<Id, IDeviceStatusInfoDiagnostic>Dictionary of all latest diagnostics
Properties
Bearing
Gets or sets the bearing (heading) in integer degrees.
public int? Bearing { get; set; }
Property Value
CurrentStateDuration
Gets or sets the duration between the last Trip state change (i.e. driving or stop), and the most recent date of location information.
public TimeSpan? CurrentStateDuration { get; set; }
Property Value
DateTime
Gets or sets the most recent DateTime of the latest piece of status, gps or fault data.
public DateTime? DateTime { get; set; }
Property Value
Device
Gets or sets the Device this DeviceStatusInfo belongs to.
public Device? Device { get; set; }
Property Value
Diagnostics
Gets or sets a dictionary for latest IDeviceStatusInfoDiagnostic(s) of current Device.
public Dictionary<Id, IDeviceStatusInfoDiagnostic>? Diagnostics { get; set; }
Property Value
- Dictionary<Id, IDeviceStatusInfoDiagnostic>
dictionary for IDeviceStatusInfoDiagnostic
Driver
public Driver? Driver { get; set; }
Property Value
ExceptionEvents
Gets or sets the ExceptionEvent(s) that are currently active.
public IList<ExceptionEvent>? ExceptionEvents { get; set; }
Property Value
Groups
public IList<Group>? Groups { get; set; }
Property Value
IsDeviceCommunicating
Gets or sets a value indicating whether the Device is communicating.
public bool? IsDeviceCommunicating { get; set; }
Property Value
IsDriving
Gets or sets a value indicating whether the current Device state. If set true, is driving. Otherwise, it is stopped.
public bool? IsDriving { get; set; }
Property Value
IsHistoricLastDriver
Gets or sets a value indicating whether the Device has been assigned to "UnknownDriver" and the last TripDriver is returned.
public bool? IsHistoricLastDriver { get; set; }
Property Value
Remarks
[true] while the Device is assigned to "UnknownDriver" and no other trip had been made in the vehicle and/or the last TripDriver has not made a trip in another vehicle, otherwise [false].
Latitude
Gets or sets the current latitude of the Device.
public double? Latitude { get; set; }
Property Value
Longitude
Gets or sets the current longitude of the Device.
public double? Longitude { get; set; }
Property Value
Speed
Gets or sets the current vehicle speed.
public float? Speed { get; set; }
Property Value
Remarks
NaN represents an invalid speed.
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override IEntity Clone()
Returns
- IEntity
A new object that is a copy of this instance.
Exceptions
- NotSupportedException
We should not clone DeviceStatusInfo.
PopulateDefaults()
Populate non-required empty (null) properties with default values.
public void PopulateDefaults()