Class BinaryData
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
This is binary data representing anything that can be stored. BinaryData can use this to store images but the data can be any custom data, including custom engine information types. The type of the data is defined by the BinaryDataType.
public class BinaryData : EntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDeviceProvider, IDateTimeProvider
- Inheritance
-
BinaryData
- Implements
- Inherited Members
Constructors
BinaryData()
Initializes a new instance of the BinaryData class.
public BinaryData()
BinaryData(Id?, byte[]?, BinaryDataType?, Device?, DateTime?, Controller?)
Initializes a new instance of the BinaryData class.
public BinaryData(Id? id, byte[]? data, BinaryDataType? binaryType, Device? device, DateTime? dateTime, Controller? controller)
Parameters
id
IdThe id.
data
byte[]The data.
binaryType
BinaryDataType?The type.
device
DeviceThe device.
dateTime
DateTime?The date time.
controller
ControllerThe source controller.
Properties
BinaryType
Gets or sets the BinaryDataType.
public BinaryDataType? BinaryType { get; set; }
Property Value
Controller
Gets or sets the Controller for the BinaryData specified.
public Controller? Controller { get; set; }
Property Value
Data
Gets the binary data for the BinaryData object.
public byte[]? Data { get; }
Property Value
DateTime
Gets or sets the date and time of the logging of the data.
public DateTime? DateTime { get; set; }
Property Value
Device
Gets or sets the Device on which the binary data was recorded.
public Device? Device { 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.
CompressBinary(byte[])
Compresses binary data of engine serial number, software version, and calibration ID types. See 7-bit compression in: https://docs.google.com/document/d/1D8P-j-0Aa6unXBhN-EETlCaWK7K_OFMRGoq2H-_2G64/edit#.
public static byte[] CompressBinary(byte[] uncompressedData)
Parameters
uncompressedData
byte[]The uncompressed data.
Returns
- byte[]
The compressed byte array.
DecompressBinary(byte[])
Decompresses binary data of engine serial number, software version, and calibration ID types. See 7-bit compression in: https://docs.google.com/document/d/1D8P-j-0Aa6unXBhN-EETlCaWK7K_OFMRGoq2H-_2G64/edit#.
public static byte[] DecompressBinary(byte[] compressedData)
Parameters
compressedData
byte[]The compressed data.
Returns
- byte[]
byte array.