Appearance
info/info.proto
Table of Contents
info/info.proto
Device
Describes basic information about a device. Device hierarchy is loosely defined via the owner property
Field | Type | Label | Description |
---|---|---|---|
name | string | the relative resource name for the device | |
traits | Trait | repeated | List of traits the device has. |
owner | Device | Owner of the device. This is the the device, supervisor, or area controller that is directly responsible for communication with the device, i.e. service requests should go through the owner. | |
client | GrpcClientOptions | Information used to connect to the device directly via gRPC. This must not be present if we are supposed to connect via the owner device. This may be present if direct communication is possible, even if owner is also set. Prefer Connecting via owner if possible. | |
title | string | Official name for the device | |
display_name | string | Readable name for the device | |
description | string | One or more paragraphs of text describing the device | |
labels | Device.LabelsEntry | repeated | arbitrary flags that can be applied to the device to encode additional information |
Device.LabelsEntry
Field | Type | Label | Description |
---|---|---|---|
key | string | ||
value | string |
GrpcClientOptions
describes options relating to client connections
Field | Type | Label | Description |
---|---|---|---|
authority | string | The host:port for the server | |
clientCert | bytes | PEM encoded client certificate for use with gRPC transport security | |
clientKey | bytes | PEM encoded client private key for use with gRPC transport security | |
clientCa | bytes | PEM encoded certificate chan representing the certificate authority for use with gRPC transport security |
ListDevicesRequest
Field | Type | Label | Description |
---|---|---|---|
depth | int32 | Only return devices this deep in the device -> device -> device tree. Default is unlimited depth, 1 means only return devices owned by the enclosing service. | |
page_size | int32 | How many items should be returned. Default is 10, max is 100. | |
page_token | string | The next_page_token from the previous response |
ListDevicesResponse
Field | Type | Label | Description |
---|---|---|---|
devices | Device | repeated | The current page of devices to satisfy the request |
next_page_token | string | Use in page_token to retrieve the next page | |
total_size | int32 | Total number of devices that would be returned if not splitting the response into pages. |
PullDevicesRequest
Field | Type | Label | Description |
---|---|---|---|
depth | int32 | Only return devices this deep in the device -> device -> device tree. Default is unlimited depth, 1 means only return devices owned by the enclosing service. | |
sync | bool | if true, all existing devices will be sent down the stream before any updates. |
PullDevicesResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullDevicesResponse.Change | repeated |
PullDevicesResponse.Change
Field | Type | Label | Description |
---|---|---|---|
type | smartcore.types.ChangeType | ||
new_value | Device | ||
old_value | Device |
Trait
describes a trait for the api. See the devices/traits apis for details of these.
Field | Type | Label | Description |
---|---|---|---|
name | string | Name of the trait service that is implemented. In the format package.Service excluding Api or other type suffix. |
Info
Allow exposing information about an endpoint related to devices.
Deprecated: use the Parent trait for listing devices, use Metadata trait for display name.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
ListDevices | ListDevicesRequest | ListDevicesResponse | Get devices that this service knows about |
PullDevices | PullDevicesRequest | PullDevicesResponse stream | Open a server stream that responds with changes to the set of devices described in the request |