Table of Contents

Class CustomData

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

Generic Custom Data from a GO unit that was sent through from a third-party device that is attached to the serial port.

public class CustomData : Entity, IEntity, IComparable, IIdentifiable, IDateTimeProvider, IDeviceProvider, IDefaultable
Inheritance
CustomData
Implements
Inherited Members

Constructors

CustomData()

Initializes a new instance of the CustomData class.

public CustomData()

CustomData(Id?, Device?, DateTime?, byte[]?, int?, CustomDataSections)

Initializes a new instance of the CustomData class.false Initializes a new instance of this class.

public CustomData(Id? id, Device? device, DateTime? dateTime, byte[]? data, int? dataLength, CustomDataSections loadedSections = CustomDataSections.None)

Parameters

id Id

The Id.

device Device

The vehicle.

dateTime DateTime?

The log DateTime.

data byte[]

The data.

dataLength int?

Length of the data.

loadedSections CustomDataSections

Loaded section flag (see CustomDataSections).

Fields

DataSectionLengthGo3

The maximum length of each section in a GO3.

public const int DataSectionLengthGo3 = 9

Field Value

int

Properties

Data

Gets or sets the custom data in base64 encoded string format. Default [empty].

public byte[]? Data { get; set; }

Property Value

byte[]

Array of byte

DateTime

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

public DateTime? DateTime { get; set; }

Property Value

DateTime?

DateTime

Device

Gets or sets the Device for which the data was recorded.

public Device? Device { get; set; }

Property Value

Device

Device

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.

GetDataLength()

The length of the field.

public int? GetDataLength()

Returns

int?

int

GetInnerData()

Gets the inner data.

public byte[]? GetInnerData()

Returns

byte[]

data.

GetIsDataComplete()

Whether or not all the custom data for this log has been read. Incomplete data should be discarded.

public bool GetIsDataComplete()

Returns

bool

bool

GetLoadedSections()

Whether the loaded sections. Used for serialization only.

public CustomDataSections? GetLoadedSections()

Returns

CustomDataSections?

Byte array.

MergeData(CustomData, CustomDataSections, byte[], bool)

false Merges the custom data sections into a custom data.

public static void MergeData(CustomData customData, CustomDataSections sections, byte[] data, bool isSingleSectionData)

Parameters

customData CustomData

The custom data.

sections CustomDataSections

The sections.

data byte[]

The data.

isSingleSectionData bool

if set to true if a single section data.

PopulateDefaults()

Populate non-required empty (null) properties with default values.

public void PopulateDefaults()

SaveData(CustomDataSections, byte[], int)

Saves the data.

public void SaveData(CustomDataSections section, byte[] bytes, int start)

Parameters

section CustomDataSections

The section.

bytes byte[]

The bytes.

start int

Offset where to start in bytes array.

SetDataLength(int)

The length of the field.

public void SetDataLength(int value)

Parameters

value int

int

SetLoadedSections(CustomDataSections)

Whether the loaded sections. Used for serialization only.

public void SetLoadedSections(CustomDataSections value)

Parameters

value CustomDataSections

Byte array