Table of Contents

Class DataToComponentContent

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

true Message that can deliver data to a component of a GO device.

public abstract class DataToComponentContent : TextMessageContentType, IBinaryPayload
Inheritance
DataToComponentContent
Implements
Derived
Inherited Members

Constructors

DataToComponentContent(int, DeviceComponentType, int, bool, MessageContentType?)

Initializes a new instance of the DataToComponentContent class.Creates a new DataToComponentContent instance.

protected DataToComponentContent(int deviceIndex, DeviceComponentType componentType, int componentIndex, bool isAcknowledgeRequired, MessageContentType? messageContentType)

Parameters

deviceIndex int

The tethered device index. GO devices are always index 0.

componentType DeviceComponentType

The component type being addressed.

componentIndex int

The component type's index, for example, AUX 5 on an auxiliary expansion port.

isAcknowledgeRequired bool

true if the recipient device must ack the receipt of this message, false otherwise.

messageContentType MessageContentType?

The type of message.

Properties

DeviceIndex

Gets or sets the device index. Analogous to Channel in IoxAddOn.

protected int DeviceIndex { get; set; }

Property Value

int

The device index. Analogous to Channel in IoxAddOn.

IsAcknowledgeRequired

Gets a value indicating whether the recipient device is required to respond with an acknowledgement.

public bool? IsAcknowledgeRequired { get; }

Property Value

bool?

true if the recipient device is required to respond with an acknowledgement, false otherwise.

Payload

Gets method to get raw binary. NOTE: The endianness of IDs and other numbers inside of the payload are reversed to keep the C# format.

public byte[]? Payload { get; }

Property Value

byte[]

Method to get raw binary. NOTE: The endianness of IDs and other numbers inside of the payload are reversed to keep the C# format.

Methods

Clone()

Create a copy.

public abstract IBinaryPayload Clone()

Returns

IBinaryPayload

The cloned instance.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetData()

Gets the data for the payload.

protected abstract byte[]? GetData()

Returns

byte[]

The data.

GetHashCode()

public override int GetHashCode()

Returns

int

WrapData(byte[]?, int, int, int, bool, bool)

Wraps the provided data in the data to component 'envelope'. NOTE: The endianness of IDs and other numbers inside of the payload are reversed to keep the C# format.

public static byte[]? WrapData(byte[]? data, int channel, int componentType, int componentIndex, bool isAcknowledgeRequired, bool isExtended = false)

Parameters

data byte[]

The data to be wrapped.

channel int

The channel to send the data to.

componentType int

The component type being addressed.

componentIndex int

The component type's index, for example, AUX 5 on an auxiliary expansion port.

isAcknowledgeRequired bool

true if the recipient device must ack the receipt of this message, false otherwise.

isExtended bool

Flag to indicate message requires two length bytes.

Returns

byte[]

byte array