Hood
State
Position
Declaration
getPosition()
Example
val state:Hood.State
assertTrue(state.position.value == Hood.Position.OPEN)
// Hood is open
Lock
Declaration
getLock()
Discussion
Includes the lock state of the hood.
Example
val state:Hood.State
assertTrue(state.lock.value == LockState.LOCKED)
// The hood is locked.
Lock safety
Declaration
getLockSafety()
Discussion
Indicates the safe-state of the hood.
Example
val state:Hood.State
assertTrue(state.lockSafety.value == LockSafety.SAFE)
// Trunk lock is safely locked.
Getters
Get Hood property availability information
Declaration
public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetStateAvailability()
// get position and lock property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)
Get Hood properties
Declaration
public GetState()
public GetState(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetState()
// get position and lock properties
val getStateProperties = GetState(0x01, 0x02)