Class DeviceHelper
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
This class contains helper methods related to encoding and parsing device serial numbers and hardware IDs.
public static class DeviceHelper
- Inheritance
-
DeviceHelper
- Inherited Members
Properties
CvaasDeviceTypes
Gets the CVAAS device types. (OEMShared)
public static IReadOnlyDictionary<int, string> CvaasDeviceTypes { get; }
Property Value
- IReadOnlyDictionary<int, string>
The third-party device types.
Methods
EncodeSerialNumber(int, int)
Encodes the serial number.
public static string EncodeSerialNumber(int productId, int hardwareId)
Parameters
Returns
- string
The serial number.
GetEffectiveMaxNoLogDuration(float?)
Returns the device maximum time interval between log points incremented by 2 seconds.
public static TimeSpan GetEffectiveMaxNoLogDuration(float? maxNoLogSeconds)
Parameters
maxNoLogSecondsfloat?The max no log seconds.
Returns
- TimeSpan
The maximum time interval in milliseconds.
IsCvaasDeviceType(int)
Checks if a product ID is a supported CVAAS (OEMShared) device type.
public static bool IsCvaasDeviceType(int productId)
Parameters
productIdintThe product ID.
Returns
- bool
True if the product ID is a supported CVAAS device type, false otherwise.
ParseSerialNumber(string)
Parses the serial number.
public static int ParseSerialNumber(string serialNumber)
Parameters
serialNumberstringThe serial number.
Returns
- int
The hardware ID.
PrefixFromGoDeviceType(DeviceType)
Gets GO device prefix for a device type.
public static string PrefixFromGoDeviceType(DeviceType deviceType)
Parameters
deviceTypeDeviceTypeThe DeviceType.
Returns
TryParseSerialNumber(string)
Tries to parse the serial number.
public static int? TryParseSerialNumber(string serialNumber)
Parameters
serialNumberstringThe serial number to parse.
Returns
- int?
True if successful, false otherwise.