Theft alarm

State

Status

Declaration

getStatus()

Example

val state:TheftAlarm.State
assertTrue(state.status.value == TheftAlarm.Status.ARMED)
// Theft alarm is armed

Interior protection status

Declaration

getInteriorProtectionStatus()

Discussion

Interior protection sensor status

Example

val state:TheftAlarm.State
assertTrue(state.interiorProtectionStatus.value == ActiveSelectedState.ACTIVE)
// Interior protection sensor is active

Tow protection status

Declaration

getTowProtectionStatus()

Discussion

Tow protection sensor status

Example

val state:TheftAlarm.State
assertTrue(state.towProtectionStatus.value == ActiveSelectedState.ACTIVE)
// Tow protection sensor is active

Last warning reason

Declaration

getLastWarningReason()

Example

val state:TheftAlarm.State
assertTrue(state.lastWarningReason.value == TheftAlarm.LastWarningReason.HOOD)
// Last warning is for the hood

Last event

Declaration

getLastEvent()

Discussion

Last event happening date

Example

val state:TheftAlarm.State
assertTrue(dateIsSame(state.lastEvent.value, "2020-06-16T11:10:02.000Z"))
// Last trip happened at 16. June 2020 at 11:10:02 GMT

Last event level

Declaration

getLastEventLevel()

Discussion

Level of impact for the last event

Example

val state:TheftAlarm.State
assertTrue(state.lastEventLevel.value == TheftAlarm.LastEventLevel.LOW)
// Last event had a low impact

Event type

Declaration

getEventType()

Discussion

Position of the last even relative to the vehicle

Example

val state:TheftAlarm.State
assertTrue(state.eventType.value == TheftAlarm.EventType.REAR_RIGHT)
// Last event happened to rear right position

Setters

Set theft alarm

Declaration

public SetTheftAlarm(Status status)

Example

val setTheftAlarm = TheftAlarm.SetTheftAlarm(TheftAlarm.Status.ARMED)    

Getters

Get Theft Alarm property availability information

Declaration

public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)

Example

// get all property availabilities
val getAvailability = GetStateAvailability()
// get status and interiorProtectionStatus property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)

Get Theft Alarm properties

Declaration

public GetState()
public GetState(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetState()
// get status and interiorProtectionStatus properties
val getStateProperties = GetState(0x01, 0x02)