Appearance
traits/emergency.proto
Table of Contents
traits/emergency.proto
DescribeEmergencyRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
Emergency
An emergency is a life threatening event.
Field | Type | Label | Description |
---|---|---|---|
level | Emergency.Level | The level of emergency that is active. | |
reason | string | A textual description of the reason for the emergency. For example "Fire alarm triggered", "Excessive pressure" | |
level_change_time | google.protobuf.Timestamp | The time the emergency level was changed. When writing and absent, and the level has changed, then server time will be used. | |
silent | bool | Silent emergencies are ongoing but don't require continued or excessive user feedback. | |
drill | bool | The emergency being fabricated, typically for testing. |
EmergencySupport
EmergencySupport describes the capabilities of devices implementing this trait
Field | Type | Label | Description |
---|---|---|---|
resource_support | smartcore.types.ResourceSupport | How a named device supports read/write/pull apis |
GetEmergencyRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
read_mask | google.protobuf.FieldMask | The state fields to fetch |
PullEmergencyRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
read_mask | google.protobuf.FieldMask | The state fields to fetch | |
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. |
PullEmergencyResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullEmergencyResponse.Change | repeated |
PullEmergencyResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | name for the device that issued the change | |
change_time | google.protobuf.Timestamp | when the change occurred | |
emergency | Emergency | The new value for the emergency. |
UpdateEmergencyRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
emergency | Emergency | ||
update_mask | google.protobuf.FieldMask | The fields relative to state we intend to update |
Emergency.Level
Levels of emergency
Name | Number | Description |
---|---|---|
LEVEL_UNSPECIFIED | 0 | The level is unknown, applications may choose to be cautious or care-free with this lack of information. |
OK | 1 | There is no emergency. |
WARNING | 2 | There is a chance of an emergency soon. This might be reported by a smoke detector that has detected some particles but not enough to trigger the alarm yet. |
EMERGENCY | 3 | There is an emergency. Please protect yourself and follow emergency procedures. |
EmergencyApi
Report and manages emergencies. Typically not associated with a single device, more suited to buildings or spaces. It's likely that some implementation will not allow write of emergency state.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetEmergency | GetEmergencyRequest | Emergency | Get the current emergency state |
UpdateEmergency | UpdateEmergencyRequest | Emergency | Update the current emergency state |
PullEmergency | PullEmergencyRequest | PullEmergencyResponse stream | Be notified of changes to the emergency state |
EmergencyInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeEmergency | DescribeEmergencyRequest | EmergencySupport | Get information about how a named device implements Emergency features |