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