Dc09MessageCreateEventMessage Method

Generates a DC-09 message representing a device event.

Definition

Namespace: MobileTrack.Common.Models
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
public static Dc09Message CreateEventMessage(
	int sequence,
	string deviceId,
	string? deviceAccount,
	EventCodeDto? eventCode,
	double? latitude = null,
	double? longitude = null,
	string? alarmUrl = null,
	string? text = null
)

Parameters

sequence  Int32
The sequence number for the message. Must be incremented from the previously sent message.
deviceId  String
The MobileTrack identifier of the device.
deviceAccount  String
The account identifier that matches the device.
eventCode  EventCodeDto
The event code to be transmitted.
latitude  NullableDouble  (Optional)
Latitude component of the alert location.
longitude  NullableDouble  (Optional)
Longitude component of the alert location.
alarmUrl  String  (Optional)
The URL to be sent along with the alert
text  String  (Optional)
Additional free text to be transmitted.

Return Value

Dc09Message
A fully initialized instance of Dc09Message representing a device event.

Exceptions

ArgumentExceptionThrown if the device ID or device event are empty.
ArgumentNullExceptionThrown if the device account is null, empty or whitespace.
ArgumentOutOfRangeExceptionThrown if the sequence number is not between 1 and 9999.

See Also