PROTOCOLS
Light
Defined in fuchsia.hardware.light/light.fidl
GetCurrentBrightnessValue
Returns the current brightness value (0.0 - 1.0) of the light indicated by index, where 0.0 is minimum brightness and 1.0 is maximum. If the capability 'BRIGHTNESS' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetCurrentBrightnessValue_Result
|
GetCurrentRgbValue
Returns the current RGB value for the single light. If the capability 'RGB' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetCurrentRgbValue_Result
|
GetCurrentSimpleValue
Returns the current value. If the light is ON, the value is True. If the light is OFF, the value is False. If the capability 'SIMPLE' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetCurrentSimpleValue_Result
|
GetGroupCurrentBrightnessValue
Returns an array of the current brightness values (0.0 - 1.0) for the light group, where 0.0 is minimum brightness and 1.0 is maximum. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'BRIGHTNESS' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetGroupCurrentBrightnessValue_Result
|
GetGroupCurrentRgbValue
Returns an array of the current RGB values for the light group. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'RGB' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetGroupCurrentRgbValue_Result
|
GetGroupCurrentSimpleValue
Returns an array of the current values.If the light is ON, the value is True. If the light is OFF, the value is False. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'SIMPLE' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetGroupCurrentSimpleValue_Result
|
GetGroupInfo
Returns group info for the light group. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetGroupInfo_Result
|
GetInfo
Returns info for the single light. index: Index of the light defined by board. Must be less than value returned by GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
Response
| Name | Type |
|---|---|
payload |
Light_GetInfo_Result
|
GetNumLightGroups
Returns the total number of light groups (does not count single lights). The light groups are addressed using "group_id" parameter in the calls below.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
count |
uint32
|
GetNumLights
Returns the total number of physical lights. This will typically be 1 for a simple LED light, but may be greater than one for an array of lights or a more complicated lighting device. The multiple lights are addressed using "index" parameter in the calls below.
Request
<EMPTY>
Response
| Name | Type |
|---|---|
count |
uint32
|
SetBrightnessValue
Sets the current brightness value (0.0 - 1.0), where 0.0 is minimum brightness and 1.0 is maximum. If the capability 'BRIGHTNESS' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
value |
float64
|
Response
| Name | Type |
|---|---|
payload |
Light_SetBrightnessValue_Result
|
SetGroupBrightnessValue
Sets the current brightness values (0.0 - 1.0) for the light group through the values array, where 0.0 is minimum brightness and 1.0 is maximum. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'BRIGHTNESS' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
values |
vector<float64>
|
Response
| Name | Type |
|---|---|
payload |
Light_SetGroupBrightnessValue_Result
|
SetGroupRgbValue
Sets the current RGB value for the light group. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'RGB' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
values |
vector<Rgb>
|
Response
| Name | Type |
|---|---|
payload |
Light_SetGroupRgbValue_Result
|
SetGroupSimpleValue
Sets the current values through the values array. Value should be set to 'TRUE' to turn on the light. Value should be set to 'FALSE' to turn off the light. If group_id is invalid, INVALID_INDEX will be returned. If the capability 'SIMPLE' is not supported by this group, returns NOT_SUPPORTED. Use GetGroupInfo to check if group supports this operation. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
Request
| Name | Type |
|---|---|
group_id |
uint32
|
values |
vector<bool>
|
Response
| Name | Type |
|---|---|
payload |
Light_SetGroupSimpleValue_Result
|
SetRgbValue
Sets the current RGB value. If the capability 'RGB' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
value |
Rgb
|
Response
| Name | Type |
|---|---|
payload |
Light_SetRgbValue_Result
|
SetSimpleValue
Sets the current value. Value should be set to 'TRUE' to turn on the light. Value should be set to 'FALSE' to turn off the light. If the capability 'SIMPLE' is not supported by this light, returns NOT_SUPPORTED. Use GetInfo to check if light supports this operation. index: a number between 0 inclusive and the count received from GetNumLights.
Request
| Name | Type |
|---|---|
index |
uint32
|
value |
bool
|
Response
| Name | Type |
|---|---|
payload |
Light_SetSimpleValue_Result
|
STRUCTS
GroupInfo
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
name |
string:32
|
No default | |
count |
uint32
|
No default | |
capability |
Capability
|
No default |
Info
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
name |
string:32
|
No default | |
capability |
Capability
|
No default |
Light_GetCurrentBrightnessValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
value |
float64
|
No default |
Light_GetCurrentRgbValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
value |
Rgb
|
No default |
Light_GetCurrentSimpleValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
value |
bool
|
No default |
Light_GetGroupCurrentBrightnessValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
values |
vector<float64>?
|
No default |
Light_GetGroupCurrentRgbValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
values |
vector<Rgb>?
|
No default |
Light_GetGroupCurrentSimpleValue_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
values |
vector<bool>?
|
No default |
Light_GetGroupInfo_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
info |
GroupInfo
|
No default |
Light_GetInfo_Response
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
info |
Info
|
No default |
Light_SetBrightnessValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Light_SetGroupBrightnessValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Light_SetGroupRgbValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Light_SetGroupSimpleValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Light_SetRgbValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Light_SetSimpleValue_Response
Defined in fuchsia.hardware.light/light.fidl
<EMPTY>
Rgb
Defined in fuchsia.hardware.light/light.fidl
| Field | Type | Description | Default |
|---|---|---|---|
red |
float64
|
No default | |
green |
float64
|
No default | |
blue |
float64
|
No default |
ENUMS
Capability strict
Type: uint32
Defined in fuchsia.hardware.light/light.fidl
| Name | Value | Description |
|---|---|---|
BRIGHTNESS |
1 |
This capability indicates that the light supports setting brightness to a uint8_t value. If this capability is not supported, the light only supports off and on state. |
RGB |
2 |
This capability indicates that the light supports setting an RGB value. |
SIMPLE |
3 |
No capabilities |
LightError strict
Type: uint32
Defined in fuchsia.hardware.light/light.fidl
| Name | Value | Description |
|---|---|---|
OK |
0 |
|
NOT_SUPPORTED |
1 |
|
INVALID_INDEX |
2 |
|
FAILED |
3 |
TABLES
Config
Defined in fuchsia.hardware.light/metadata.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
name |
string
|
|
2 |
brightness |
bool
|
|
3 |
rgb |
bool
|
|
4 |
init_on |
bool
|
|
5 |
group_id |
int32
|
Metadata
Defined in fuchsia.hardware.light/metadata.fidl
| Ordinal | Field | Type | Description |
|---|---|---|---|
1 |
configs |
vector<Config>
|
UNIONS
Light_GetCurrentBrightnessValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetCurrentBrightnessValue_Response
|
|
2 |
err |
LightError
|
Light_GetCurrentRgbValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetCurrentRgbValue_Response
|
|
2 |
err |
LightError
|
Light_GetCurrentSimpleValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetCurrentSimpleValue_Response
|
|
2 |
err |
LightError
|
Light_GetGroupCurrentBrightnessValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetGroupCurrentBrightnessValue_Response
|
|
2 |
err |
LightError
|
Light_GetGroupCurrentRgbValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetGroupCurrentRgbValue_Response
|
|
2 |
err |
LightError
|
Light_GetGroupCurrentSimpleValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetGroupCurrentSimpleValue_Response
|
|
2 |
err |
LightError
|
Light_GetGroupInfo_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetGroupInfo_Response
|
|
2 |
err |
LightError
|
Light_GetInfo_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_GetInfo_Response
|
|
2 |
err |
LightError
|
Light_SetBrightnessValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetBrightnessValue_Response
|
|
2 |
err |
LightError
|
Light_SetGroupBrightnessValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetGroupBrightnessValue_Response
|
|
2 |
err |
LightError
|
Light_SetGroupRgbValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetGroupRgbValue_Response
|
|
2 |
err |
LightError
|
Light_SetGroupSimpleValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetGroupSimpleValue_Response
|
|
2 |
err |
LightError
|
Light_SetRgbValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetRgbValue_Response
|
|
2 |
err |
LightError
|
Light_SetSimpleValue_Result strict
Defined in fuchsia.hardware.light/light.fidl
| Ordinal | Variant | Type | Description |
|---|---|---|---|
1 |
response |
Light_SetSimpleValue_Response
|
|
2 |
err |
LightError
|
CONSTANTS
| Name | Value | Type | Description |
|---|---|---|---|
| LIGHT_NAME_LEN |
32
|
uint8 |
SERVICES
LightService
Defined in fuchsia.hardware.light/light.fidl
| Name | Type | Transport |
|---|---|---|
| light |
fuchsia.hardware.light/Light
|
Channel |