Class TelematicManager
Support operations to interact with the simplic telematic system
Inheritance
Inherited Members
Namespace: Simplic.PlugIn.Logistics.Telematic
Assembly: Simplic.PlugIn.Logistics.dll
Syntax
public class TelematicManager
Constructors
| Improve this Doc View SourceTelematicManager()
Initialize new telematic manager
Declaration
public TelematicManager()
Properties
| Improve this Doc View SourceSingleton
Singleton access to the TelematicManager
Declaration
public static TelematicManager Singleton { get; }
Property Value
Type | Description |
---|---|
TelematicManager |
Methods
| Improve this Doc View SourceAddTrip(TelematicTripSnapshot)
Add a single trip
Declaration
public void AddTrip(TelematicTripSnapshot trip)
Parameters
Type | Name | Description |
---|---|---|
TelematicTripSnapshot | trip | Trip instance |
AddTrips(IList<TelematicTripSnapshot>)
Add a list of trips
Declaration
public void AddTrips(IList<TelematicTripSnapshot> trips)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<TelematicTripSnapshot> | trips | List of trips |
DeleteTelematicCard(TelematicCard)
Delete telematic card information
Declaration
public void DeleteTelematicCard(TelematicCard obj)
Parameters
Type | Name | Description |
---|---|---|
TelematicCard | obj | telematic card for an employment to delete |
DeleteTelematicSystem(TelematicSystem)
Deletes the passed TelematicSystem
Declaration
public void DeleteTelematicSystem(TelematicSystem system)
Parameters
Type | Name | Description |
---|---|---|
TelematicSystem | system |
GetLastTrips(Guid, Int32)
Get the last trips of the vehicle
Declaration
public IEnumerable<TelematicTripSnapshot> GetLastTrips(Guid vehicleId, int amount)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleId | Unique vehicle id |
System.Int32 | amount | Amount of trips to return |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TelematicTripSnapshot> | Return the last trips |
GetTelematicCardsForEmployment(Guid)
Gets all TelematicCards for an employment
Declaration
public IEnumerable<TelematicCard> GetTelematicCardsForEmployment(Guid employmentId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | employmentId | The Id of the employment |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TelematicCard> | An enumerable of Telematic Cards |
GetTelematicSystem(Guid)
Get a telemtaic system by its id
Declaration
public TelematicSystem GetTelematicSystem(Guid id)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | Unique telematic system id |
Returns
Type | Description |
---|---|
TelematicSystem | Return an instance of a telematic system |
GetTrip(Int64)
Get a single trip by its unique id
Declaration
public TelematicTripSnapshot GetTrip(long id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | id | Unique trip id |
Returns
Type | Description |
---|---|
TelematicTripSnapshot | Return a single trip |
GetTrips(IList<Guid>, DateTime, DateTime)
Get a set of trips for a list of vehicles, within a period of time. If vehicle is null or empty, data vor any vehicle will be queried
Declaration
public IEnumerable<TelematicTripSnapshot> GetTrips(IList<Guid> vehicles, DateTime from = default(DateTime), DateTime to = default(DateTime))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Guid> | vehicles | |
System.DateTime | from | Values from |
System.DateTime | to | Value to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TelematicTripSnapshot> | Return a list of trips snapshots |
GetTrips(Guid, DateTime, DateTime)
Get a set of trips for a single verhicle, within a period of time
Declaration
public IEnumerable<TelematicTripSnapshot> GetTrips(Guid vehicleId, DateTime from = default(DateTime), DateTime to = default(DateTime))
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleId | Unique vehicle id |
System.DateTime | from | Values from |
System.DateTime | to | Value to |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TelematicTripSnapshot> | Return a list of trips snapshots |
HasVehicleTelematicData(Guid)
Gets whether a vehicle has any telematic data
Declaration
public bool HasVehicleTelematicData(Guid vehicleId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | vehicleId | Unique vehicle id |
Returns
Type | Description |
---|---|
System.Boolean | True if the vehicle has telematic data |
RemoveTrip(Int32)
Remvoe a single trip from the database
Declaration
public void RemoveTrip(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | Unique trip id |
RemoveTrips(IList<Int32>)
Remove a list of trips from the database
Declaration
public void RemoveTrips(IList<int> ids)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<System.Int32> | ids | List of unique trip ids |
SaveTelematicCard(TelematicCard)
Save telematic card information
Declaration
public void SaveTelematicCard(TelematicCard obj)
Parameters
Type | Name | Description |
---|---|---|
TelematicCard | obj | telematic card for an employment to save |
SetTelematicSystem(TelematicSystem)
Add or update a telematic system in the database. If the system has no id, a new will be generated.
Declaration
public TelematicSystem SetTelematicSystem(TelematicSystem system)
Parameters
Type | Name | Description |
---|---|---|
TelematicSystem | system | Instance of telematic system |
Returns
Type | Description |
---|---|
TelematicSystem | Passed system with a valid system id |
UpdateTrip(TelematicTripSnapshot)
Update a single trip
Declaration
public void UpdateTrip(TelematicTripSnapshot trip)
Parameters
Type | Name | Description |
---|---|---|
TelematicTripSnapshot | trip | Unique trip |
UpdateTrips(IList<TelematicTripSnapshot>)
Update a list of trips
Declaration
public void UpdateTrips(IList<TelematicTripSnapshot> trips)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<TelematicTripSnapshot> | trips | Trip list |