Appearance
traits/lock_unlock.proto
Table of Contents
traits/lock_unlock.proto
GetLockUnlockRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type |
LockUnlock
LockUnlock models the possible states of a lockable device.
Field | Type | Label | Description |
---|---|---|---|
position | LockUnlock.Position | Position reports whether the device is locked or unlocked, or transitioning. | |
jammed | bool | Jammed reports whether the lock has jammed and is unable to reach it's position. Output only. |
PullLockUnlockRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
read_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type | |
updates_only | bool | When true the device will only send changes to the resource value. The default behaviour is to send the current value immediately followed by any updates as they happen. |
PullLockUnlockResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullLockUnlockResponse.Change | repeated | Changes since the last message. |
PullLockUnlockResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device that issued the change. | |
change_time | google.protobuf.Timestamp | When the change occurred | |
lock_unlock | LockUnlock | The new value for the lock. |
UpdateLockUnlockRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the device to fetch the state for | |
lock_unlock | LockUnlock | The new value | |
update_mask | google.protobuf.FieldMask | Fields to fetch relative to the LockUnlock type |
LockUnlock.Position
Position defines the possible lock positions. Note that only LOCKED and UNLOCKED can be used during a write.
Name | Number | Description |
---|---|---|
POSITION_UNSPECIFIED | 0 | The lock position is unspecified. |
LOCKED | 1 | The device is locked. |
UNLOCKED | 2 | The device is unlocked. |
LOCKING | 3 | The device is in the process of locking. Optional. Output only. |
UNLOCKING | 4 | The device is in the process of unlocking. Optional. Output only. |
LockUnlockApi
LockUnlockApi describes devices that can be locked and unlocked, and/or report a locked state. The concept is encoded in the LockUnlock.position, a device may be locked, unlocked, or transitioning into one of these positions.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetLockUnlock | GetLockUnlockRequest | LockUnlock | Get the current lock position for the device. |
UpdateLockUnlock | UpdateLockUnlockRequest | LockUnlock | Update the lock position of the device. |
PullLockUnlock | PullLockUnlockRequest | PullLockUnlockResponse stream | Subscribe to changes in the lock position for the device. |
LockUnlockInfo
todo: define LockUnlockInfo
Method Name | Request Type | Response Type | Description |
---|