//MLBluetoothSDK/com.masterlock.mlbluetoothsdk.lockstate/MechanismState
MechanismState¶
sealed class MechanismState
Represents the state of a locking mechanism on a lock
Inheritors¶
| Unknown |
| Locked |
| PendingUnlock |
| PendingRelock |
| Open |
| OpenLocked |
| Unlocked |
Types¶
| Name | Summary |
|---|---|
| Locked | [androidJvm] object Locked : MechanismState The mechanism is reporting a ‘Locked’ state |
| Open | [androidJvm] object Open : MechanismState This locking mechanism has returned an open state. The mechanism is also reading as unlocked in this state. |
| OpenLocked | [androidJvm] object OpenLocked : MechanismState This locking mechanism has returned an open state while the locking mechanism is also locked. |
| PendingRelock | [androidJvm] object PendingRelock : MechanismState A BLE relock command has been sent to this lock (deadbolt), but has not yet completed You may want to show progress for this state and prevent the user from sending additional relock commands |
| PendingUnlock | [androidJvm] object PendingUnlock : MechanismState A BLE unlock command has been sent to this lock, but has not yet completed You may want to show progress for this state and prevent the user from sending additional unlock commands |
| Unknown | [androidJvm] object Unknown : MechanismState Indicates that no reading has been made on this mechanism, or it may not exist |
| Unlocked | [androidJvm] class Unlocked(val countdown: Int) : MechanismState The mechanism is reading as Unlocked. The mechanism is not Open in this state. Devices that support automatic re-lock will also update with a countdown of seconds before re-lock |
Properties¶
| Name | Summary |
|---|---|
| value | [androidJvm] abstract val value: MechanismStateOptions |
Functions¶
| Name | Summary |
|---|---|
| countdown | [androidJvm] fun countdown(): Int If in an Unlocked state, returns the current countdown or else always returns 0 |
| equals | [androidJvm] open operator override fun equals(other: Any?): Boolean |
| hashCode | [androidJvm] open override fun hashCode(): Int |
| toString | [androidJvm] open override fun toString(): String |