Appearance
traits/channel.proto
Table of Contents
traits/channel.proto
AdjustChannelRequest
AdjustChannelRequest describes how to change the channel relative to the current channel.
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device | |
amount | int32 | How many channels to skip, use negative numbers to select previous channels. See ChannelApiAttributes.adjust_max. |
Channel
Channel describes a single channel that can be chosen on the device.
During read all known properties will be populated, id and title will always be present. On write either id or number must be present.
Field | Type | Label | Description |
---|---|---|---|
id | string | Id uniquely identifies the channel and can be used to select it explicitly. | |
channel_number | string | A numeric identifier for the channel, such as 17 or 712.11-14. Not always parsable as a number. | |
title | string | A human readable name for the channel. |
ChooseChannelRequest
ChooseChannelRequest describes which channel to select.
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device | |
channel | Channel | The channel to select. Must contain either id or number. |
ChosenChannelSupport
ChosenChannelSupport 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 | |
adjust_max | int32 | The max number of channels away from the current that are supported when adjusting channels. Defaults to 1. |
todo: support for [choose,adjust,return], not sure what the defaults should be |
DescribeChosenChannelRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
GetChosenChannelRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device | |
read_mask | google.protobuf.FieldMask | The state fields to fetch |
PullChosenChannelRequest
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device | |
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. |
PullChosenChannelResponse
Field | Type | Label | Description |
---|---|---|---|
changes | PullChosenChannelResponse.Change | repeated |
PullChosenChannelResponse.Change
Field | Type | Label | Description |
---|---|---|---|
name | string | name for the device that issued the change | |
change_time | google.protobuf.Timestamp | when the change occurred | |
chosen_channel | Channel | The new chosen channel |
ReturnChannelRequest
Select the last channel to be selected before the current one.
Field | Type | Label | Description |
---|---|---|---|
name | string | The name of the device |
ChannelApi
ChannelApi allows for querying and updating the chosen channel on a device like a TV.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
GetChosenChannel | GetChosenChannelRequest | Channel | GetChosenChannel returns the currently chosen channel for the device. |
ChooseChannel | ChooseChannelRequest | Channel | ChooseChannel will set the currently chosen channel to the one specified. Returns the chosen channel |
AdjustChannel | AdjustChannelRequest | Channel | AdjustChannel will choose a channel based on the current channel, i.e. 'next channel'. Returns the chosen channel |
ReturnChannel | ReturnChannelRequest | Channel | ReturnChannel will choose the previously chosen channel. Returns the chosen channel |
PullChosenChannel | PullChosenChannelRequest | PullChosenChannelResponse stream | PullChosenChannel subscribes to chosen channel changes |
ChannelInfo
Describes the capabilities of a specific named device with respect to this trait.
Method Name | Request Type | Response Type | Description |
---|---|---|---|
DescribeChosenChannel | DescribeChosenChannelRequest | ChosenChannelSupport | Get information about how a named device implements channel choosing and adjustment |