Class Route
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
A connected sequence of zones which create a path for the vehicle to follow.
[ReportClass]
public class Route : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDeviceProvider, IDefaultable
- Inheritance
-
Route
- Implements
- Inherited Members
Constructors
Route()
Initializes a new instance of the Route class.
public Route()
Route(Id?)
Initializes a new instance of the Route class.
public Route(Id? id)
Parameters
Route(Id?, long?, string?, string?, IList<RoutePlanItem>?)
Initializes a new instance of the Route class.
public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection)
Parameters
id
IdThe Id.
version
long?The version.
name
stringThe route name.
comment
stringThe comment.
routePlanCollection
IList<RoutePlanItem>The route plan collection.
Route(Id?, long?, string?, string?, IList<RoutePlanItem>?, Device?, Schedule?, string?, bool?, DateTime?, DateTime?)
Initializes a new instance of the Route class.
public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection, Device? device, Schedule? schedule, string? timezoneId, bool? isRepeatable, DateTime? resourceShiftStartTime, DateTime? resourceShiftEndTime)
Parameters
id
IdThe Id.
version
long?The version.
name
stringThe route name.
comment
stringThe comment.
routePlanCollection
IList<RoutePlanItem>The route plan collection.
device
DeviceThe route device.
schedule
ScheduleThe route schedule.
timezoneId
stringThe route timezone id.
isRepeatable
bool?The route is repeatable or not.
resourceShiftStartTime
DateTime?The Start time of the driver's shift time
resourceShiftEndTime
DateTime?The End time of the driver's shift time
Route(Id?, long?, string?, string?, IList<RoutePlanItem>?, DateTime?, DateTime?)
Initializes a new instance of the Route class.
public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection, DateTime? resourceShiftStartTime, DateTime? resourceShiftEndTime)
Parameters
id
IdThe Id.
version
long?The version.
name
stringThe route name.
comment
stringThe comment.
routePlanCollection
IList<RoutePlanItem>The route plan collection.
resourceShiftStartTime
DateTime?The Start time of the driver's shift time
resourceShiftEndTime
DateTime?The End time of the driver's shift time
Route(Id, string, string, IList<RoutePlanItem>)
Initializes a new instance of the Route class.
[Obsolete("Use constructor with version", false)]
public Route(Id id, string name, string comment, IList<RoutePlanItem> routePlanCollection)
Parameters
id
IdThe Id.
name
stringThe route name.
comment
stringThe comment.
routePlanCollection
IList<RoutePlanItem>The route plan collection.
Properties
Comment
Gets or sets free text field where any user information can be stored and referenced for this entity. Default [""].
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteComment })]
public string? Comment { get; set; }
Property Value
Device
Gets or sets the Device linked to the route. Only applies to "Plan" type routes.
public Device? Device { get; set; }
Property Value
EndTime
Gets the end date and time of the route which is the arrival time of the last stop.
public DateTime? EndTime { get; }
Property Value
Id
Gets or sets the unique identifier for this entity.
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteId })]
public override Id? Id { get; set; }
Property Value
IsRepeatable
Gets or sets a value indicating whether the route is repeatable or not.
public bool? IsRepeatable { get; set; }
Property Value
Name
Gets or sets the name of this entity which identifies it and is used when displaying this entity. Maximum length [255].
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteName })]
public override string? Name { get; set; }
Property Value
ResourceShiftEndTime
Gets or sets the end of a driver's shift hours
public DateTime? ResourceShiftEndTime { get; set; }
Property Value
ResourceShiftStartTime
Gets or sets the start of a driver's shift hours
public DateTime? ResourceShiftStartTime { get; set; }
Property Value
RoutePlanItemCollection
Gets or sets the RoutePlanItem item collection (sequence of stops which make up the route).
public IList<RoutePlanItem>? RoutePlanItemCollection { get; set; }
Property Value
RouteType
Gets or sets the RouteType. Default [Basic].
public RouteType? RouteType { get; set; }
Property Value
Schedule
Gets or sets the Schedule.
public Schedule? Schedule { get; set; }
Property Value
StartTime
Gets the start date and time or the route which is the arrival time of the 1st stop.
public DateTime? StartTime { get; }
Property Value
Status
Gets or sets the RouteStatus.
public RouteStatus? Status { get; set; }
Property Value
TimezoneId
Gets or sets the timezone id.
public string? TimezoneId { get; set; }
Property Value
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.
CorrectStopsSequence()
Corrects the sequence of RoutePlanItems (stops) if they're incorrect.
public void CorrectStopsSequence()
PopulateDefaults()
Populate non-required empty (null) properties with default values.
public void PopulateDefaults()
SortStops(Comparison<RoutePlanItem>?)
Sorts the RoutePlanItems (stops) based on the provided comparer.
public void SortStops(Comparison<RoutePlanItem>? comparer = null)
Parameters
comparer
Comparison<RoutePlanItem>Comparison<T> of type RoutePlanItem
ToString()
public override string ToString()
Returns
UpdateStatus()
Update route status based on stop status values
public void UpdateStatus()